RACE_leaderboard / utils.py
Jason Zheng
first commit
6906870
raw
history blame
1.29 kB
from dataclasses import dataclass
@dataclass
class ColumnContent:
name: str
type: str
displayed_by_default: bool
hidden: bool = False
def fields(raw_class):
return [
v for k, v in raw_class.__dict__.items() if k[:2] != "__" and k[-2:] != "__"
]
@dataclass(frozen=True)
class AutoEvalColumn: # Auto evals column
model = ColumnContent("model", "markdown", True)
score = ColumnContent("πŸ’― RACE Score", "number", True)
c_0 = ColumnContent("βœ… Correctness", "number", True)
r_0 = ColumnContent("πŸ“– Readability", "number", True)
r_1 = ColumnContent("πŸ“– R*", "number", False)
r_2 = ColumnContent("πŸ“– RN", "number", False)
r_3 = ColumnContent("πŸ“– RL", "number", False)
r_4 = ColumnContent("πŸ“– RC", "number", False)
m_0 = ColumnContent("πŸ”¨ Maintainability", "number", True)
m_1 = ColumnContent("πŸ”¨ MI*", "number", False)
m_2 = ColumnContent("πŸ”¨ MI", "number", False)
m_3 = ColumnContent("πŸ”¨ MC*", "number", False)
m_4 = ColumnContent("πŸ”¨ MC", "number", False)
e_0 = ColumnContent("πŸš€ Efficiency", "number", True)
e_1 = ColumnContent("πŸš€ E*", "number", False)
e_2 = ColumnContent("πŸš€ E_NI_T", "number", False)
e_3 = ColumnContent("πŸš€ E_NI_S", "number", False)