File size: 1,289 Bytes
6906870
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
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)