MCPcopy Create free account
hub / github.com/Eladlev/AutoPrompt / eval_score

Method eval_score

eval/evaluator.py:43–53  ·  view source on GitHub ↗

Calculate the score on each row and return the mean score. :return: The mean score

(self)

Source from the content-addressed store, hash-verified

41 raise NotImplementedError("Eval function not implemented")
42
43 def eval_score(self) -> float:
44 """
45 Calculate the score on each row and return the mean score.
46 :return: The mean score
47 """
48 # filter out the discarded samples
49 self.dataset = self.dataset[(self.dataset['prediction'] != 'Discarded') &
50 (self.dataset['annotation'] != 'Discarded')]
51 self.dataset = self.score_func(self.dataset)
52 self.mean_score = self.dataset['score'].mean()
53 return self.mean_score
54
55 def get_max_score(self, warmup=0):
56 """

Callers 1

stepMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected