We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b95c576 commit ba7bb77Copy full SHA for ba7bb77
src/common.py
@@ -3,6 +3,7 @@
3
4
5
def compute_metrics(eval_pred: EvalPrediction) -> dict[str, any]:
6
+ """Compute various metrics and return a dict of metric name to values."""
7
logits, labels = eval_pred
8
predictions = np.argmax(logits, axis=-1)
9
return {"accuracy": np.mean(predictions == labels)}
0 commit comments