Skip to content

Commit ba7bb77

Browse files
committed
Add documentation to compute_metrics.
1 parent b95c576 commit ba7bb77

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/common.py

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44

55
def compute_metrics(eval_pred: EvalPrediction) -> dict[str, any]:
6+
"""Compute various metrics and return a dict of metric name to values."""
67
logits, labels = eval_pred
78
predictions = np.argmax(logits, axis=-1)
89
return {"accuracy": np.mean(predictions == labels)}

0 commit comments

Comments
 (0)