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)