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

Method get_max_score

eval/evaluator.py:55–62  ·  view source on GitHub ↗

Return the maximum 'mean score' (with respect to all history epochs, starting form warmup, up to last) and the epoch index of the maximum score :return: The epoch index of the maximum score, and the maximum score

(self, warmup=0)

Source from the content-addressed store, hash-verified

53 return self.mean_score
54
55 def get_max_score(self, warmup=0):
56 """
57 Return the maximum 'mean score' (with respect to all history epochs, starting form warmup, up to last) and the epoch index of the maximum score
58 :return: The epoch index of the maximum score, and the maximum score
59 """
60 max_idx = np.argmax([epoch['score'] for epoch in self.history[warmup:-1]])
61 max_idx += warmup
62 return max_idx, self.history[max_idx]['score']
63
64
65 def large_error_to_str(self, error_df: pd.DataFrame, num_large_errors_per_label: int) -> str:

Callers 1

stop_criteriaMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected