romb-leaderboard / src /eval /metrics.py
d0rj's picture
style: code blacked
3e35a01
raw
history blame contribute delete
178 Bytes
import numpy as np
def grade_to_weight(g: str) -> float:
"""Convert a grade string to a weight value."""
parts = list(map(int, g.split("-")))
return np.mean(parts)