Update metrics
Browse files- backend/app/services/leaderboard.py +56 -21
- frontend/src/pages/LeaderboardPage/components/Leaderboard/constants/defaults.js +190 -148
- frontend/src/pages/LeaderboardPage/components/Leaderboard/constants/tooltips.js +272 -192
- frontend/src/pages/LeaderboardPage/components/Leaderboard/utils/columnUtils.js +743 -600
backend/app/services/leaderboard.py
CHANGED
@@ -104,32 +104,67 @@ class LeaderboardService:
|
|
104 |
|
105 |
# Create unique ID combining model name, precision, sha and chat template status
|
106 |
unique_id = f"{data.get('fullname', 'Unknown')}_{data.get('Precision', 'Unknown')}_{data.get('Model sha', 'Unknown')}_{str(data.get('Chat Template', False))}"
|
107 |
-
|
108 |
evaluations = {
|
109 |
-
"
|
110 |
-
"name": "
|
111 |
-
"value": data.get("
|
112 |
-
"normalized_score": data.get("
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
113 |
},
|
114 |
-
"
|
115 |
-
"name": "
|
116 |
-
"value": data.get("
|
117 |
-
"normalized_score": data.get("
|
118 |
},
|
119 |
-
"
|
120 |
-
"name": "
|
121 |
-
"value": data.get("
|
122 |
-
"normalized_score": data.get("
|
123 |
},
|
124 |
-
"
|
125 |
-
"name": "
|
126 |
-
"value": data.get("
|
127 |
-
"normalized_score": data.get("
|
128 |
},
|
129 |
-
"
|
130 |
-
"name": "
|
131 |
-
"value": data.get("
|
132 |
-
"normalized_score": data.get("
|
133 |
},
|
134 |
}
|
135 |
|
|
|
104 |
|
105 |
# Create unique ID combining model name, precision, sha and chat template status
|
106 |
unique_id = f"{data.get('fullname', 'Unknown')}_{data.get('Precision', 'Unknown')}_{data.get('Model sha', 'Unknown')}_{str(data.get('Chat Template', False))}"
|
107 |
+
|
108 |
evaluations = {
|
109 |
+
"bc5cdr_chemical": {
|
110 |
+
"name": "BC5CDR-chemical",
|
111 |
+
"value": data.get("BC5CDR-chemical", 0),
|
112 |
+
"normalized_score": data.get("BC5CDR-chemical", 0),
|
113 |
+
},
|
114 |
+
"ncbi_disease": {
|
115 |
+
"name": "NCBI Disease",
|
116 |
+
"value": data.get("NCBI Disease", 0),
|
117 |
+
"normalized_score": data.get("NCBI Disease", 0),
|
118 |
+
},
|
119 |
+
"chemprot": {
|
120 |
+
"name": "ChemProt",
|
121 |
+
"value": data.get("ChemProt", 0),
|
122 |
+
"normalized_score": data.get("ChemProt", 0),
|
123 |
+
},
|
124 |
+
"ddi2013": {
|
125 |
+
"name": "DDI2013",
|
126 |
+
"value": data.get("DDI2013", 0),
|
127 |
+
"normalized_score": data.get("DDI2013", 0),
|
128 |
+
},
|
129 |
+
"hoc": {
|
130 |
+
"name": "HoC",
|
131 |
+
"value": data.get("HoC", 0),
|
132 |
+
"normalized_score": data.get("HoC", 0),
|
133 |
+
},
|
134 |
+
"litcovid": {
|
135 |
+
"name": "LitCovid",
|
136 |
+
"value": data.get("LitCovid", 0),
|
137 |
+
"normalized_score": data.get("LitCovid", 0),
|
138 |
+
},
|
139 |
+
"medqa": {
|
140 |
+
"name": "MedQA (5-Option)",
|
141 |
+
"value": data.get("MedQA (5-Option)", 0),
|
142 |
+
"normalized_score": data.get("MedQA (5-Option)", 0),
|
143 |
+
},
|
144 |
+
"pubmedqa": {
|
145 |
+
"name": "PubMedQA",
|
146 |
+
"value": data.get("PubMedQA", 0),
|
147 |
+
"normalized_score": data.get("PubMedQA", 0),
|
148 |
},
|
149 |
+
"pubmed": {
|
150 |
+
"name": "PubMed",
|
151 |
+
"value": data.get("PubMed", 0),
|
152 |
+
"normalized_score": data.get("PubMed", 0),
|
153 |
},
|
154 |
+
"ms2": {
|
155 |
+
"name": "MS^2",
|
156 |
+
"value": data.get("MS^2", 0),
|
157 |
+
"normalized_score": data.get("MS^2", 0),
|
158 |
},
|
159 |
+
"cochrane_pls": {
|
160 |
+
"name": "Cochrane PLS",
|
161 |
+
"value": data.get("Cochrane PLS", 0),
|
162 |
+
"normalized_score": data.get("Cochrane PLS", 0),
|
163 |
},
|
164 |
+
"plos": {
|
165 |
+
"name": "PLOS",
|
166 |
+
"value": data.get("PLOS", 0),
|
167 |
+
"normalized_score": data.get("PLOS", 0),
|
168 |
},
|
169 |
}
|
170 |
|
frontend/src/pages/LeaderboardPage/components/Leaderboard/constants/defaults.js
CHANGED
@@ -98,158 +98,200 @@ const COLUMN_SIZES = {
|
|
98 |
|
99 |
// Column definitions with organized structure
|
100 |
const COLUMNS = {
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
107 |
},
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
113 |
},
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
119 |
},
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
125 |
},
|
126 |
-
},
|
127 |
-
EVALUATION: {
|
128 |
-
"evaluations.multifin.normalized_score": {
|
129 |
-
group: "evaluation",
|
130 |
-
size: COLUMN_SIZES.BENCHMARK,
|
131 |
-
defaultVisible: true,
|
132 |
-
label: "MultiFin",
|
133 |
-
},
|
134 |
-
"evaluations.qa.normalized_score": {
|
135 |
-
group: "evaluation",
|
136 |
-
size: COLUMN_SIZES.BENCHMARK,
|
137 |
-
defaultVisible: true,
|
138 |
-
label: "QA",
|
139 |
-
},
|
140 |
-
"evaluations.fns.normalized_score": {
|
141 |
-
group: "evaluation",
|
142 |
-
size: COLUMN_SIZES.BENCHMARK,
|
143 |
-
defaultVisible: true,
|
144 |
-
label: "FNS",
|
145 |
-
},
|
146 |
-
"evaluations.finnum.normalized_score": {
|
147 |
-
group: "evaluation",
|
148 |
-
size: COLUMN_SIZES.BENCHMARK,
|
149 |
-
defaultVisible: true,
|
150 |
-
label: "FinNum",
|
151 |
-
},
|
152 |
-
"evaluations.fintext.normalized_score": {
|
153 |
-
group: "evaluation",
|
154 |
-
size: COLUMN_SIZES.BENCHMARK,
|
155 |
-
defaultVisible: true,
|
156 |
-
label: "FinText",
|
157 |
-
},
|
158 |
-
},
|
159 |
-
MODEL_INFO: {
|
160 |
-
"metadata.co2_cost": {
|
161 |
-
group: "model_info",
|
162 |
-
size: COLUMN_SIZES.CO2_COST,
|
163 |
-
defaultVisible: true,
|
164 |
-
label: "CO₂ Cost (kg)",
|
165 |
-
},
|
166 |
-
"metadata.hub_hearts": {
|
167 |
-
group: "model_info",
|
168 |
-
size: COLUMN_SIZES.HUB_HEARTS,
|
169 |
-
defaultVisible: false,
|
170 |
-
label: "Hub ❤️",
|
171 |
-
},
|
172 |
-
"model.architecture": {
|
173 |
-
group: "model_info",
|
174 |
-
size: COLUMN_SIZES.ARCHITECTURE,
|
175 |
-
defaultVisible: false,
|
176 |
-
label: "Architecture",
|
177 |
-
},
|
178 |
-
"model.precision": {
|
179 |
-
group: "model_info",
|
180 |
-
size: COLUMN_SIZES.PRECISION,
|
181 |
-
defaultVisible: false,
|
182 |
-
label: "Precision",
|
183 |
-
},
|
184 |
-
"metadata.params_billions": {
|
185 |
-
group: "model_info",
|
186 |
-
size: COLUMN_SIZES.PARAMS,
|
187 |
-
defaultVisible: false,
|
188 |
-
label: "Parameters (B)",
|
189 |
-
},
|
190 |
-
"metadata.hub_license": {
|
191 |
-
group: "model_info",
|
192 |
-
size: COLUMN_SIZES.LICENSE,
|
193 |
-
defaultVisible: false,
|
194 |
-
label: "License",
|
195 |
-
},
|
196 |
-
"model.has_chat_template": {
|
197 |
-
group: "model_info",
|
198 |
-
size: COLUMN_SIZES.CHAT_TEMPLATE,
|
199 |
-
defaultVisible: false,
|
200 |
-
label: "Chat Template",
|
201 |
-
},
|
202 |
-
},
|
203 |
-
ADDITIONAL_INFO: {
|
204 |
-
"metadata.upload_date": {
|
205 |
-
group: "additional_info",
|
206 |
-
size: COLUMN_SIZES.UPLOAD_DATE,
|
207 |
-
defaultVisible: false,
|
208 |
-
label: "Upload Date",
|
209 |
-
},
|
210 |
-
"metadata.submission_date": {
|
211 |
-
group: "additional_info",
|
212 |
-
size: COLUMN_SIZES.SUBMISSION_DATE,
|
213 |
-
defaultVisible: false,
|
214 |
-
label: "Submission Date",
|
215 |
-
},
|
216 |
-
"metadata.generation": {
|
217 |
-
group: "additional_info",
|
218 |
-
size: COLUMN_SIZES.GENERATION,
|
219 |
-
defaultVisible: false,
|
220 |
-
label: "Generation",
|
221 |
-
},
|
222 |
-
"metadata.base_model": {
|
223 |
-
group: "additional_info",
|
224 |
-
size: COLUMN_SIZES.BASE_MODEL,
|
225 |
-
defaultVisible: false,
|
226 |
-
label: "Base Model",
|
227 |
-
},
|
228 |
-
"features.is_not_available_on_hub": {
|
229 |
-
group: "additional_info",
|
230 |
-
size: COLUMN_SIZES.HUB_AVAILABILITY,
|
231 |
-
defaultVisible: false,
|
232 |
-
label: "Hub Availability",
|
233 |
-
},
|
234 |
-
"features.is_highlighted_by_maintainer": {
|
235 |
-
group: "additional_info",
|
236 |
-
size: COLUMN_SIZES.OFFICIAL_PROVIDER,
|
237 |
-
defaultVisible: false,
|
238 |
-
label: "Only Official Providers",
|
239 |
-
},
|
240 |
-
"features.is_moe": {
|
241 |
-
group: "additional_info",
|
242 |
-
size: COLUMN_SIZES.MOE,
|
243 |
-
defaultVisible: false,
|
244 |
-
label: "Mixture of Experts",
|
245 |
-
},
|
246 |
-
"features.is_flagged": {
|
247 |
-
group: "additional_info",
|
248 |
-
size: COLUMN_SIZES.FLAG_STATUS,
|
249 |
-
defaultVisible: false,
|
250 |
-
label: "Flag Status",
|
251 |
-
},
|
252 |
-
},
|
253 |
};
|
254 |
|
255 |
// Combine all columns for backward compatibility
|
|
|
98 |
|
99 |
// Column definitions with organized structure
|
100 |
const COLUMNS = {
|
101 |
+
FIXED: {
|
102 |
+
rank: {
|
103 |
+
group: "fixed",
|
104 |
+
size: COLUMN_SIZES.RANK,
|
105 |
+
defaultVisible: true,
|
106 |
+
label: "Rank",
|
107 |
+
},
|
108 |
+
"model.type_icon": {
|
109 |
+
group: "fixed",
|
110 |
+
size: COLUMN_SIZES.TYPE_ICON,
|
111 |
+
defaultVisible: true,
|
112 |
+
label: "Type",
|
113 |
+
},
|
114 |
+
id: {
|
115 |
+
group: "fixed",
|
116 |
+
size: COLUMN_SIZES.MODEL,
|
117 |
+
defaultVisible: true,
|
118 |
+
label: "Model",
|
119 |
+
},
|
120 |
+
"model.average_score": {
|
121 |
+
group: "fixed",
|
122 |
+
size: COLUMN_SIZES.AVERAGE_SCORE,
|
123 |
+
defaultVisible: true,
|
124 |
+
label: "Average Score",
|
125 |
+
},
|
126 |
},
|
127 |
+
EVALUATION: {
|
128 |
+
"evaluations.bc5cdr_chemical.normalized_score": {
|
129 |
+
group: "evaluation",
|
130 |
+
size: COLUMN_SIZES.BENCHMARK,
|
131 |
+
defaultVisible: true,
|
132 |
+
label: "BC5CDR-chemical",
|
133 |
+
},
|
134 |
+
"evaluations.ncbi_disease.normalized_score": {
|
135 |
+
group: "evaluation",
|
136 |
+
size: COLUMN_SIZES.BENCHMARK,
|
137 |
+
defaultVisible: true,
|
138 |
+
label: "NCBI Disease",
|
139 |
+
},
|
140 |
+
"evaluations.chemprot.normalized_score": {
|
141 |
+
group: "evaluation",
|
142 |
+
size: COLUMN_SIZES.BENCHMARK,
|
143 |
+
defaultVisible: true,
|
144 |
+
label: "ChemProt",
|
145 |
+
},
|
146 |
+
"evaluations.ddi2013.normalized_score": {
|
147 |
+
group: "evaluation",
|
148 |
+
size: COLUMN_SIZES.BENCHMARK,
|
149 |
+
defaultVisible: true,
|
150 |
+
label: "DDI2013",
|
151 |
+
},
|
152 |
+
"evaluations.hoc.normalized_score": {
|
153 |
+
group: "evaluation",
|
154 |
+
size: COLUMN_SIZES.BENCHMARK,
|
155 |
+
defaultVisible: true,
|
156 |
+
label: "HoC",
|
157 |
+
},
|
158 |
+
"evaluations.litcovid.normalized_score": {
|
159 |
+
group: "evaluation",
|
160 |
+
size: COLUMN_SIZES.BENCHMARK,
|
161 |
+
defaultVisible: true,
|
162 |
+
label: "LitCovid",
|
163 |
+
},
|
164 |
+
"evaluations.medqa.normalized_score": {
|
165 |
+
group: "evaluation",
|
166 |
+
size: COLUMN_SIZES.BENCHMARK,
|
167 |
+
defaultVisible: true,
|
168 |
+
label: "MedQA (5-Option)",
|
169 |
+
},
|
170 |
+
"evaluations.pubmedqa.normalized_score": {
|
171 |
+
group: "evaluation",
|
172 |
+
size: COLUMN_SIZES.BENCHMARK,
|
173 |
+
defaultVisible: true,
|
174 |
+
label: "PubMedQA",
|
175 |
+
},
|
176 |
+
"evaluations.pubmed.normalized_score": {
|
177 |
+
group: "evaluation",
|
178 |
+
size: COLUMN_SIZES.BENCHMARK,
|
179 |
+
defaultVisible: true,
|
180 |
+
label: "PubMed",
|
181 |
+
},
|
182 |
+
"evaluations.ms2.normalized_score": {
|
183 |
+
group: "evaluation",
|
184 |
+
size: COLUMN_SIZES.BENCHMARK,
|
185 |
+
defaultVisible: true,
|
186 |
+
label: "MS^2",
|
187 |
+
},
|
188 |
+
"evaluations.cochrane_pls.normalized_score": {
|
189 |
+
group: "evaluation",
|
190 |
+
size: COLUMN_SIZES.BENCHMARK,
|
191 |
+
defaultVisible: true,
|
192 |
+
label: "Cochrane PLS",
|
193 |
+
},
|
194 |
+
"evaluations.plos.normalized_score": {
|
195 |
+
group: "evaluation",
|
196 |
+
size: COLUMN_SIZES.BENCHMARK,
|
197 |
+
defaultVisible: true,
|
198 |
+
label: "PLOS",
|
199 |
+
},
|
200 |
},
|
201 |
+
MODEL_INFO: {
|
202 |
+
"metadata.co2_cost": {
|
203 |
+
group: "model_info",
|
204 |
+
size: COLUMN_SIZES.CO2_COST,
|
205 |
+
defaultVisible: true,
|
206 |
+
label: "CO₂ Cost (kg)",
|
207 |
+
},
|
208 |
+
"metadata.hub_hearts": {
|
209 |
+
group: "model_info",
|
210 |
+
size: COLUMN_SIZES.HUB_HEARTS,
|
211 |
+
defaultVisible: false,
|
212 |
+
label: "Hub ❤️",
|
213 |
+
},
|
214 |
+
"model.architecture": {
|
215 |
+
group: "model_info",
|
216 |
+
size: COLUMN_SIZES.ARCHITECTURE,
|
217 |
+
defaultVisible: false,
|
218 |
+
label: "Architecture",
|
219 |
+
},
|
220 |
+
"model.precision": {
|
221 |
+
group: "model_info",
|
222 |
+
size: COLUMN_SIZES.PRECISION,
|
223 |
+
defaultVisible: false,
|
224 |
+
label: "Precision",
|
225 |
+
},
|
226 |
+
"metadata.params_billions": {
|
227 |
+
group: "model_info",
|
228 |
+
size: COLUMN_SIZES.PARAMS,
|
229 |
+
defaultVisible: false,
|
230 |
+
label: "Parameters (B)",
|
231 |
+
},
|
232 |
+
"metadata.hub_license": {
|
233 |
+
group: "model_info",
|
234 |
+
size: COLUMN_SIZES.LICENSE,
|
235 |
+
defaultVisible: false,
|
236 |
+
label: "License",
|
237 |
+
},
|
238 |
+
"model.has_chat_template": {
|
239 |
+
group: "model_info",
|
240 |
+
size: COLUMN_SIZES.CHAT_TEMPLATE,
|
241 |
+
defaultVisible: false,
|
242 |
+
label: "Chat Template",
|
243 |
+
},
|
244 |
},
|
245 |
+
ADDITIONAL_INFO: {
|
246 |
+
"metadata.upload_date": {
|
247 |
+
group: "additional_info",
|
248 |
+
size: COLUMN_SIZES.UPLOAD_DATE,
|
249 |
+
defaultVisible: false,
|
250 |
+
label: "Upload Date",
|
251 |
+
},
|
252 |
+
"metadata.submission_date": {
|
253 |
+
group: "additional_info",
|
254 |
+
size: COLUMN_SIZES.SUBMISSION_DATE,
|
255 |
+
defaultVisible: false,
|
256 |
+
label: "Submission Date",
|
257 |
+
},
|
258 |
+
"metadata.generation": {
|
259 |
+
group: "additional_info",
|
260 |
+
size: COLUMN_SIZES.GENERATION,
|
261 |
+
defaultVisible: false,
|
262 |
+
label: "Generation",
|
263 |
+
},
|
264 |
+
"metadata.base_model": {
|
265 |
+
group: "additional_info",
|
266 |
+
size: COLUMN_SIZES.BASE_MODEL,
|
267 |
+
defaultVisible: false,
|
268 |
+
label: "Base Model",
|
269 |
+
},
|
270 |
+
"features.is_not_available_on_hub": {
|
271 |
+
group: "additional_info",
|
272 |
+
size: COLUMN_SIZES.HUB_AVAILABILITY,
|
273 |
+
defaultVisible: false,
|
274 |
+
label: "Hub Availability",
|
275 |
+
},
|
276 |
+
"features.is_highlighted_by_maintainer": {
|
277 |
+
group: "additional_info",
|
278 |
+
size: COLUMN_SIZES.OFFICIAL_PROVIDER,
|
279 |
+
defaultVisible: false,
|
280 |
+
label: "Only Official Providers",
|
281 |
+
},
|
282 |
+
"features.is_moe": {
|
283 |
+
group: "additional_info",
|
284 |
+
size: COLUMN_SIZES.MOE,
|
285 |
+
defaultVisible: false,
|
286 |
+
label: "Mixture of Experts",
|
287 |
+
},
|
288 |
+
"features.is_flagged": {
|
289 |
+
group: "additional_info",
|
290 |
+
size: COLUMN_SIZES.FLAG_STATUS,
|
291 |
+
defaultVisible: false,
|
292 |
+
label: "Flag Status",
|
293 |
+
},
|
294 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
295 |
};
|
296 |
|
297 |
// Combine all columns for backward compatibility
|
frontend/src/pages/LeaderboardPage/components/Leaderboard/constants/tooltips.js
CHANGED
@@ -29,209 +29,289 @@ const createTooltipContent = (title, items) => (
|
|
29 |
);
|
30 |
|
31 |
export const COLUMN_TOOLTIPS = {
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
|
|
42 |
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
]),
|
55 |
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
]),
|
68 |
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
]),
|
81 |
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
]),
|
94 |
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
]),
|
107 |
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
],
|
120 |
-
},
|
121 |
-
{
|
122 |
-
label: "Impact",
|
123 |
-
description: "How architecture affects model capabilities",
|
124 |
-
subItems: [
|
125 |
-
"Base models are expected to perform less well on instruction following evaluations, like IFEval.",
|
126 |
-
"Fine-tuned and chat models can be more verbose and more chatty than base models.",
|
127 |
-
"Merged models tend to exhibit good performance on benchmarks, which do not translate to real-world situations.",
|
128 |
-
],
|
129 |
-
},
|
130 |
-
]),
|
131 |
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
},
|
144 |
-
{
|
145 |
-
label: "Impact",
|
146 |
-
description: "How precision affects model deployment",
|
147 |
-
subItems: [
|
148 |
-
"Higher precision = better accuracy but more memory usage",
|
149 |
-
"Lower precision = faster inference and smaller size",
|
150 |
-
"Trade-off between model quality and resource usage",
|
151 |
-
],
|
152 |
-
},
|
153 |
-
]),
|
154 |
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
label: "Purpose",
|
167 |
-
description: "Why do people want to hide these models?",
|
168 |
-
subItems: [
|
169 |
-
"Mixture of Experts: These models can be too parameter heavy",
|
170 |
-
"Merged models: Performance on benchmarks tend to be inflated compared to real life usage",
|
171 |
-
"Contaminated: Performance on benchmarks is inflated and not reflecting real life usage",
|
172 |
-
],
|
173 |
-
},
|
174 |
-
]),
|
175 |
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
]),
|
200 |
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
235 |
};
|
236 |
|
237 |
export const UI_TOOLTIPS = {
|
|
|
29 |
);
|
30 |
|
31 |
export const COLUMN_TOOLTIPS = {
|
32 |
+
AVERAGE: createTooltipContent("Average score across all benchmarks:", [
|
33 |
+
{
|
34 |
+
label: "Calculation",
|
35 |
+
description:
|
36 |
+
"Weighted average of normalized scores from all benchmarks",
|
37 |
+
subItems: [
|
38 |
+
"Each benchmark is normalized to a 0-100 scale",
|
39 |
+
"All normalised benchmarks are then averaged together",
|
40 |
+
],
|
41 |
+
},
|
42 |
+
]),
|
43 |
|
44 |
+
BC5CDR_CHEMICAL: createTooltipContent("Placeholder", [
|
45 |
+
{
|
46 |
+
label: "Purpose",
|
47 |
+
description: "Placeholder",
|
48 |
+
subItems: ["Placeholder", "Placeholder"],
|
49 |
+
},
|
50 |
+
{
|
51 |
+
label: "Scoring: Placeholder",
|
52 |
+
description: "Placeholder",
|
53 |
+
},
|
54 |
+
]),
|
|
|
55 |
|
56 |
+
NCBI_DISEASE: createTooltipContent("Placeholder", [
|
57 |
+
{
|
58 |
+
label: "Purpose",
|
59 |
+
description: "Placeholder",
|
60 |
+
subItems: ["Placeholder", "Placeholder"],
|
61 |
+
},
|
62 |
+
{
|
63 |
+
label: "Scoring: Placeholder",
|
64 |
+
description: "Placeholder",
|
65 |
+
},
|
66 |
+
]),
|
|
|
67 |
|
68 |
+
CHEMPROT: createTooltipContent("Placeholder", [
|
69 |
+
{
|
70 |
+
label: "Purpose",
|
71 |
+
description: "Placeholder",
|
72 |
+
subItems: ["Placeholder", "Placeholder"],
|
73 |
+
},
|
74 |
+
{
|
75 |
+
label: "Scoring: Placeholder",
|
76 |
+
description: "Placeholder",
|
77 |
+
},
|
78 |
+
]),
|
|
|
79 |
|
80 |
+
DDI2013: createTooltipContent("Placeholder", [
|
81 |
+
{
|
82 |
+
label: "Purpose",
|
83 |
+
description: "Placeholder",
|
84 |
+
subItems: ["Placeholder", "Placeholder"],
|
85 |
+
},
|
86 |
+
{
|
87 |
+
label: "Scoring: Placeholder",
|
88 |
+
description: "Placeholder",
|
89 |
+
},
|
90 |
+
]),
|
|
|
91 |
|
92 |
+
HOC: createTooltipContent("Placeholder", [
|
93 |
+
{
|
94 |
+
label: "Purpose",
|
95 |
+
description: "Placeholder",
|
96 |
+
subItems: ["Placeholder", "Placeholder"],
|
97 |
+
},
|
98 |
+
{
|
99 |
+
label: "Scoring: Placeholder",
|
100 |
+
description: "Placeholder",
|
101 |
+
},
|
102 |
+
]),
|
|
|
103 |
|
104 |
+
LITCOVID: createTooltipContent("Placeholder", [
|
105 |
+
{
|
106 |
+
label: "Purpose",
|
107 |
+
description: "Placeholder",
|
108 |
+
subItems: ["Placeholder", "Placeholder"],
|
109 |
+
},
|
110 |
+
{
|
111 |
+
label: "Scoring: Placeholder",
|
112 |
+
description: "Placeholder",
|
113 |
+
},
|
114 |
+
]),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
115 |
|
116 |
+
MEDQA: createTooltipContent("Placeholder", [
|
117 |
+
{
|
118 |
+
label: "Purpose",
|
119 |
+
description: "Placeholder",
|
120 |
+
subItems: ["Placeholder", "Placeholder"],
|
121 |
+
},
|
122 |
+
{
|
123 |
+
label: "Scoring: Placeholder",
|
124 |
+
description: "Placeholder",
|
125 |
+
},
|
126 |
+
]),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
127 |
|
128 |
+
PUBMEDQA: createTooltipContent("Placeholder", [
|
129 |
+
{
|
130 |
+
label: "Purpose",
|
131 |
+
description: "Placeholder",
|
132 |
+
subItems: ["Placeholder", "Placeholder"],
|
133 |
+
},
|
134 |
+
{
|
135 |
+
label: "Scoring: Placeholder",
|
136 |
+
description: "Placeholder",
|
137 |
+
},
|
138 |
+
]),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
139 |
|
140 |
+
PUBMED: createTooltipContent("Placeholder", [
|
141 |
+
{
|
142 |
+
label: "Purpose",
|
143 |
+
description: "Placeholder",
|
144 |
+
subItems: ["Placeholder", "Placeholder"],
|
145 |
+
},
|
146 |
+
{
|
147 |
+
label: "Scoring: Placeholder",
|
148 |
+
description: "Placeholder",
|
149 |
+
},
|
150 |
+
]),
|
151 |
|
152 |
+
MS2: createTooltipContent("Placeholder", [
|
153 |
+
{
|
154 |
+
label: "Purpose",
|
155 |
+
description: "Placeholder",
|
156 |
+
subItems: ["Placeholder", "Placeholder"],
|
157 |
+
},
|
158 |
+
{
|
159 |
+
label: "Scoring: Placeholder",
|
160 |
+
description: "Placeholder",
|
161 |
+
},
|
162 |
+
]),
|
|
|
163 |
|
164 |
+
COCHRANE_PLS: createTooltipContent("Placeholder", [
|
165 |
+
{
|
166 |
+
label: "Purpose",
|
167 |
+
description: "Placeholder",
|
168 |
+
subItems: ["Placeholder", "Placeholder"],
|
169 |
+
},
|
170 |
+
{
|
171 |
+
label: "Scoring: Placeholder",
|
172 |
+
description: "Placeholder",
|
173 |
+
},
|
174 |
+
]),
|
175 |
+
|
176 |
+
PLOS: createTooltipContent("Placeholder", [
|
177 |
+
{
|
178 |
+
label: "Purpose",
|
179 |
+
description: "Placeholder",
|
180 |
+
subItems: ["Placeholder", "Placeholder"],
|
181 |
+
},
|
182 |
+
{
|
183 |
+
label: "Scoring: Placeholder",
|
184 |
+
description: "Placeholder",
|
185 |
+
},
|
186 |
+
]),
|
187 |
+
|
188 |
+
ARCHITECTURE: createTooltipContent("Model Architecture Information:", [
|
189 |
+
{
|
190 |
+
label: "Definition",
|
191 |
+
description: "The fundamental structure and design of the model",
|
192 |
+
subItems: [
|
193 |
+
"Pretrained: Foundational models, initially trained on large datasets without task-specific tuning, serving as a versatile base for further development.",
|
194 |
+
"Continuously Pretrained: Base models trained with a data mix evolving as the model is trained, with the addition of specialized data during the last training steps.",
|
195 |
+
"Fine-tuned: Base models, fine-tuned on specialised domain data (legal, medical, ...), and optimized for particular tasks.",
|
196 |
+
"Chat: Models fine-tuned with IFT, RLHF, DPO, and other techniques, to handle conversational contexts effectively.",
|
197 |
+
"Merged: Combining multiple models through weights averaging or similar methods.",
|
198 |
+
"Multimodal: Models which can handle several modalities (text & image/audio/video/...). We only evaluate the text capabilities.",
|
199 |
+
],
|
200 |
+
},
|
201 |
+
{
|
202 |
+
label: "Impact",
|
203 |
+
description: "How architecture affects model capabilities",
|
204 |
+
subItems: [
|
205 |
+
"Base models are expected to perform less well on instruction following evaluations, like IFEval.",
|
206 |
+
"Fine-tuned and chat models can be more verbose and more chatty than base models.",
|
207 |
+
"Merged models tend to exhibit good performance on benchmarks, which do not translate to real-world situations.",
|
208 |
+
],
|
209 |
+
},
|
210 |
+
]),
|
211 |
+
|
212 |
+
PRECISION: createTooltipContent("Numerical Precision Format:", [
|
213 |
+
{
|
214 |
+
label: "Overview",
|
215 |
+
description:
|
216 |
+
"Data format used to store model weights and perform computations",
|
217 |
+
subItems: [
|
218 |
+
"bfloat16: Half precision (Brain Float format), good for stability",
|
219 |
+
"float16: Half precision",
|
220 |
+
"8bit/4bit: Quantized formats, for efficiency",
|
221 |
+
"GPTQ/AWQ: Quantized methods",
|
222 |
+
],
|
223 |
+
},
|
224 |
+
{
|
225 |
+
label: "Impact",
|
226 |
+
description: "How precision affects model deployment",
|
227 |
+
subItems: [
|
228 |
+
"Higher precision = better accuracy but more memory usage",
|
229 |
+
"Lower precision = faster inference and smaller size",
|
230 |
+
"Trade-off between model quality and resource usage",
|
231 |
+
],
|
232 |
+
},
|
233 |
+
]),
|
234 |
+
|
235 |
+
FLAGS: createTooltipContent("Model Flags and Special Features:", [
|
236 |
+
{
|
237 |
+
label: "Filters",
|
238 |
+
subItems: [
|
239 |
+
"Mixture of Expert: Uses a MoE architecture",
|
240 |
+
"Merged models: Created by averaging other models",
|
241 |
+
"Contaminated: Flagged by users from the community for (possibly accidental) cheating",
|
242 |
+
"Unavailable: No longer on the hub (private, deleted) or missing a license tag",
|
243 |
+
],
|
244 |
+
},
|
245 |
+
{
|
246 |
+
label: "Purpose",
|
247 |
+
description: "Why do people want to hide these models?",
|
248 |
+
subItems: [
|
249 |
+
"Mixture of Experts: These models can be too parameter heavy",
|
250 |
+
"Merged models: Performance on benchmarks tend to be inflated compared to real life usage",
|
251 |
+
"Contaminated: Performance on benchmarks is inflated and not reflecting real life usage",
|
252 |
+
],
|
253 |
+
},
|
254 |
+
]),
|
255 |
+
|
256 |
+
PARAMETERS: createTooltipContent("Model Parameters:", [
|
257 |
+
{
|
258 |
+
label: "Measurement",
|
259 |
+
description: "Total number of trainable parameters in billions",
|
260 |
+
subItems: [
|
261 |
+
"Indicates model capacity and complexity",
|
262 |
+
"Correlates with computational requirements",
|
263 |
+
"Influences memory usage and inference speed",
|
264 |
+
],
|
265 |
+
},
|
266 |
+
]),
|
267 |
+
|
268 |
+
LICENSE: createTooltipContent("Model License Information:", [
|
269 |
+
{
|
270 |
+
label: "Importance",
|
271 |
+
description: "Legal terms governing model usage and distribution",
|
272 |
+
subItems: [
|
273 |
+
"Commercial vs non-commercial use",
|
274 |
+
"Attribution requirements",
|
275 |
+
"Modification and redistribution rights",
|
276 |
+
"Liability and warranty terms",
|
277 |
+
],
|
278 |
+
},
|
279 |
+
]),
|
280 |
+
|
281 |
+
CO2_COST: createTooltipContent("Carbon Dioxide Emissions:", [
|
282 |
+
{
|
283 |
+
label: "What is it?",
|
284 |
+
description: "CO₂ emissions of the model evaluation ",
|
285 |
+
subItems: [
|
286 |
+
"Only focuses on model inference for our specific setup",
|
287 |
+
"Considers data center location and energy mix",
|
288 |
+
"Allows equivalent comparision of models on our use case",
|
289 |
+
],
|
290 |
+
},
|
291 |
+
{
|
292 |
+
label: "Why it matters",
|
293 |
+
description: "Environmental impact of AI model training",
|
294 |
+
subItems: [
|
295 |
+
"Large models can have significant carbon footprints",
|
296 |
+
"Helps make informed choices about model selection",
|
297 |
+
],
|
298 |
+
},
|
299 |
+
{
|
300 |
+
label: "Learn more",
|
301 |
+
description:
|
302 |
+
"For detailed information about our CO₂ calculation methodology, visit:",
|
303 |
+
subItems: [
|
304 |
+
<a
|
305 |
+
href="https://huggingface.co/docs/leaderboards/open_llm_leaderboard/emissions"
|
306 |
+
target="_blank"
|
307 |
+
rel="noopener noreferrer"
|
308 |
+
style={{ color: "#90caf9" }}
|
309 |
+
>
|
310 |
+
Carbon Emissions Documentation ↗
|
311 |
+
</a>,
|
312 |
+
],
|
313 |
+
},
|
314 |
+
]),
|
315 |
};
|
316 |
|
317 |
export const UI_TOOLTIPS = {
|
frontend/src/pages/LeaderboardPage/components/Leaderboard/utils/columnUtils.js
CHANGED
@@ -451,614 +451,757 @@ export const createColumns = (
|
|
451 |
onTogglePin,
|
452 |
hasPinnedRows = false
|
453 |
) => {
|
454 |
-
|
455 |
-
|
456 |
-
|
457 |
|
458 |
-
|
459 |
-
|
460 |
-
|
461 |
-
|
462 |
-
|
463 |
-
|
464 |
-
|
465 |
-
|
466 |
-
|
467 |
-
|
468 |
-
|
469 |
-
|
470 |
-
|
471 |
-
|
472 |
-
|
473 |
-
|
474 |
-
|
475 |
-
|
476 |
-
|
477 |
-
|
478 |
-
|
479 |
-
|
480 |
-
|
481 |
-
|
482 |
-
|
483 |
-
|
484 |
-
|
485 |
-
|
486 |
-
|
487 |
-
|
488 |
-
|
489 |
-
|
490 |
-
|
491 |
-
|
492 |
-
|
493 |
-
|
494 |
-
|
495 |
-
|
496 |
-
|
497 |
-
|
498 |
-
|
499 |
-
|
500 |
-
|
501 |
-
|
502 |
-
|
503 |
-
|
504 |
-
|
|
|
|
|
505 |
|
506 |
-
|
507 |
-
|
508 |
-
|
509 |
-
|
510 |
-
|
511 |
-
|
512 |
-
|
513 |
-
|
514 |
-
|
515 |
-
|
516 |
-
|
517 |
-
|
518 |
-
|
519 |
-
|
520 |
-
|
521 |
-
|
522 |
-
|
523 |
-
|
524 |
-
|
525 |
-
|
526 |
-
|
527 |
-
|
528 |
-
|
529 |
-
|
530 |
-
|
531 |
-
|
532 |
-
|
533 |
-
|
534 |
-
|
535 |
-
|
536 |
-
|
537 |
-
|
538 |
-
|
539 |
-
|
540 |
-
|
541 |
-
|
542 |
-
|
543 |
-
|
544 |
-
|
545 |
-
|
546 |
-
|
547 |
-
|
548 |
-
|
549 |
-
|
550 |
-
|
551 |
-
|
552 |
-
|
553 |
|
554 |
-
|
555 |
-
|
556 |
-
|
557 |
-
|
558 |
-
|
559 |
-
|
560 |
-
|
561 |
-
|
562 |
-
|
563 |
-
|
564 |
-
|
565 |
-
|
566 |
-
|
567 |
-
|
568 |
-
|
569 |
-
|
570 |
-
|
571 |
-
|
572 |
-
|
573 |
-
|
574 |
-
|
575 |
-
|
576 |
-
|
577 |
-
|
578 |
-
|
579 |
-
|
580 |
-
|
581 |
-
|
582 |
-
|
583 |
-
|
584 |
-
|
585 |
-
|
586 |
-
|
587 |
-
|
588 |
-
|
589 |
-
|
590 |
-
|
591 |
-
|
592 |
-
|
593 |
-
|
594 |
-
|
595 |
-
|
596 |
-
|
597 |
-
|
598 |
-
|
599 |
-
|
600 |
-
|
601 |
-
|
602 |
-
|
603 |
-
|
604 |
-
|
605 |
-
|
606 |
-
|
607 |
-
|
608 |
-
|
609 |
-
|
610 |
-
|
611 |
-
|
612 |
-
|
613 |
-
|
614 |
-
|
615 |
-
|
616 |
-
|
617 |
-
|
618 |
-
|
619 |
-
|
620 |
-
|
621 |
-
|
622 |
-
|
623 |
-
|
624 |
-
|
625 |
-
|
626 |
-
|
627 |
-
|
628 |
-
|
629 |
-
|
630 |
-
|
631 |
-
|
632 |
-
|
633 |
-
|
634 |
-
|
635 |
-
|
636 |
-
|
637 |
-
|
638 |
-
|
639 |
-
|
640 |
-
|
641 |
-
|
642 |
-
|
643 |
-
|
644 |
-
|
645 |
-
|
646 |
-
|
647 |
-
size: TABLE_DEFAULTS.COLUMNS.COLUMN_SIZES["model.average_score"],
|
648 |
-
meta: {
|
649 |
-
headerStyle: {
|
650 |
-
borderLeft: (theme) =>
|
651 |
-
`2px solid ${alpha(
|
652 |
-
theme.palette.divider,
|
653 |
-
theme.palette.mode === "dark" ? 0.1 : 0.2
|
654 |
-
)}`,
|
655 |
-
borderRight: (theme) =>
|
656 |
-
`2px solid ${alpha(
|
657 |
-
theme.palette.divider,
|
658 |
-
theme.palette.mode === "dark" ? 0.1 : 0.2
|
659 |
-
)}`,
|
660 |
},
|
661 |
-
|
662 |
-
|
663 |
-
|
664 |
-
|
665 |
-
|
666 |
-
|
667 |
-
|
668 |
-
|
669 |
-
|
670 |
-
|
671 |
-
|
672 |
-
|
673 |
-
|
674 |
-
|
675 |
-
|
676 |
-
|
677 |
-
|
678 |
-
|
679 |
-
|
680 |
-
|
681 |
-
|
682 |
-
|
683 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
684 |
|
685 |
-
|
686 |
-
|
687 |
|
688 |
-
|
689 |
-
|
690 |
-
|
691 |
-
|
692 |
-
|
693 |
-
|
694 |
-
|
695 |
-
|
696 |
-
|
697 |
-
|
698 |
-
|
699 |
-
|
700 |
-
|
701 |
-
|
702 |
-
|
703 |
-
|
704 |
-
|
705 |
-
|
706 |
-
|
707 |
-
|
708 |
-
|
709 |
-
|
710 |
-
|
711 |
-
|
712 |
-
|
713 |
-
|
714 |
-
|
715 |
-
|
716 |
-
|
717 |
-
|
718 |
-
|
719 |
-
|
720 |
-
|
721 |
-
|
722 |
-
|
723 |
-
|
724 |
-
|
725 |
-
|
726 |
-
|
727 |
-
|
728 |
-
|
729 |
-
|
730 |
-
|
731 |
-
|
732 |
-
|
733 |
-
|
734 |
-
|
735 |
-
|
736 |
-
|
737 |
-
|
738 |
-
|
739 |
-
|
740 |
-
|
741 |
-
|
742 |
-
|
743 |
-
|
744 |
-
|
745 |
-
|
746 |
-
|
747 |
-
|
748 |
-
|
749 |
-
|
750 |
-
|
|
|
|
|
751 |
|
752 |
-
|
753 |
-
|
754 |
-
|
755 |
-
|
756 |
-
|
757 |
-
|
758 |
-
|
759 |
-
|
760 |
-
|
761 |
-
|
762 |
-
|
763 |
-
|
764 |
-
|
765 |
-
|
766 |
-
|
767 |
-
|
768 |
-
|
769 |
-
|
770 |
-
|
771 |
-
|
772 |
-
|
773 |
-
|
774 |
-
|
775 |
-
|
776 |
-
|
777 |
-
|
778 |
-
|
779 |
-
|
780 |
-
|
781 |
-
|
782 |
-
|
783 |
-
|
784 |
-
|
785 |
-
|
786 |
-
|
787 |
-
|
788 |
-
|
789 |
-
|
790 |
-
|
791 |
-
|
792 |
-
|
793 |
-
|
794 |
-
|
795 |
-
|
796 |
-
|
797 |
-
|
798 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
799 |
|
800 |
-
|
801 |
-
|
802 |
-
|
803 |
-
|
804 |
-
|
805 |
-
|
806 |
-
|
807 |
-
|
808 |
-
|
809 |
-
|
810 |
-
|
811 |
-
|
812 |
-
|
813 |
-
|
814 |
-
|
815 |
-
|
816 |
-
|
817 |
-
|
818 |
-
|
819 |
-
|
820 |
-
|
821 |
-
|
822 |
-
|
823 |
-
|
824 |
-
|
825 |
-
|
826 |
-
|
827 |
-
|
828 |
-
|
829 |
-
|
830 |
-
|
831 |
-
|
832 |
-
|
833 |
-
|
834 |
-
|
835 |
-
|
836 |
-
|
837 |
-
|
838 |
-
|
839 |
-
|
840 |
-
|
841 |
-
|
842 |
-
|
843 |
-
|
844 |
-
|
845 |
-
|
846 |
-
|
847 |
-
|
848 |
-
|
849 |
-
|
850 |
-
|
851 |
-
|
852 |
-
|
853 |
-
|
854 |
-
|
855 |
-
|
856 |
-
|
857 |
-
|
858 |
-
|
859 |
-
|
860 |
-
|
861 |
-
|
862 |
-
|
863 |
-
|
864 |
-
|
865 |
-
|
866 |
-
|
867 |
-
|
868 |
-
|
869 |
-
|
870 |
-
|
871 |
-
|
872 |
-
|
873 |
-
|
874 |
-
|
875 |
-
|
876 |
-
|
877 |
-
|
878 |
-
|
879 |
-
|
880 |
-
|
881 |
-
|
882 |
-
|
883 |
-
|
884 |
-
|
885 |
-
|
886 |
-
|
887 |
-
|
888 |
-
|
889 |
-
|
890 |
-
|
891 |
-
|
892 |
-
|
893 |
-
|
894 |
-
|
895 |
-
|
896 |
-
|
897 |
-
|
898 |
-
|
899 |
-
|
900 |
-
|
901 |
-
|
902 |
-
|
903 |
-
|
904 |
-
|
905 |
-
|
906 |
-
|
907 |
-
|
908 |
-
|
909 |
-
|
910 |
-
|
911 |
-
|
912 |
-
|
913 |
-
|
914 |
-
|
915 |
-
|
916 |
-
|
917 |
-
|
918 |
-
|
919 |
-
|
920 |
-
|
921 |
-
|
922 |
-
|
923 |
-
|
924 |
-
|
925 |
-
|
926 |
-
|
927 |
-
|
928 |
-
|
929 |
-
|
930 |
-
|
931 |
-
|
932 |
-
|
933 |
-
|
934 |
-
|
935 |
-
|
936 |
-
|
937 |
-
|
938 |
-
|
939 |
-
|
940 |
-
|
941 |
-
|
942 |
-
|
943 |
-
|
944 |
-
|
945 |
-
|
946 |
-
|
947 |
-
|
948 |
-
|
949 |
-
|
950 |
-
|
951 |
-
|
952 |
-
|
953 |
-
|
954 |
-
|
955 |
-
|
956 |
-
|
957 |
-
|
958 |
-
|
959 |
-
|
960 |
-
|
961 |
-
|
962 |
-
|
963 |
-
|
964 |
-
|
965 |
-
|
966 |
-
|
967 |
-
|
968 |
-
|
969 |
-
|
970 |
-
|
971 |
-
|
972 |
-
|
973 |
-
|
974 |
-
|
975 |
-
|
976 |
-
|
977 |
-
|
978 |
-
|
979 |
-
|
980 |
-
|
981 |
-
|
982 |
-
|
983 |
-
|
984 |
-
|
985 |
-
|
986 |
-
|
987 |
-
|
988 |
-
|
989 |
-
|
990 |
-
|
991 |
-
|
992 |
-
|
993 |
-
|
994 |
-
|
995 |
-
|
996 |
-
|
997 |
-
|
998 |
-
|
999 |
-
|
1000 |
-
|
1001 |
-
|
1002 |
-
|
1003 |
-
|
1004 |
-
|
1005 |
-
|
1006 |
-
|
1007 |
-
|
1008 |
-
|
1009 |
-
|
1010 |
-
|
1011 |
-
|
1012 |
-
|
1013 |
-
|
1014 |
-
|
1015 |
-
|
1016 |
-
|
1017 |
-
|
1018 |
-
|
1019 |
-
|
1020 |
-
|
1021 |
-
|
1022 |
-
|
1023 |
-
|
1024 |
-
|
1025 |
-
|
1026 |
-
|
1027 |
-
|
1028 |
-
|
1029 |
-
|
1030 |
-
|
1031 |
-
|
1032 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1033 |
|
1034 |
-
|
1035 |
-
|
1036 |
-
|
1037 |
-
|
1038 |
-
|
1039 |
-
|
1040 |
-
|
1041 |
-
|
1042 |
-
|
1043 |
-
|
1044 |
-
|
1045 |
-
|
1046 |
-
|
1047 |
-
|
1048 |
-
|
1049 |
-
|
1050 |
-
|
1051 |
-
|
1052 |
-
|
1053 |
-
|
1054 |
-
|
1055 |
-
|
1056 |
-
|
1057 |
-
|
1058 |
-
|
1059 |
-
|
1060 |
-
|
1061 |
-
|
1062 |
|
1063 |
-
|
1064 |
};
|
|
|
451 |
onTogglePin,
|
452 |
hasPinnedRows = false
|
453 |
) => {
|
454 |
+
// Ajuster les tailles des colonnes en fonction de la présence de lignes épinglées
|
455 |
+
const getColumnSize = (defaultSize) =>
|
456 |
+
hasPinnedRows ? "auto" : `${defaultSize}px`;
|
457 |
|
458 |
+
const baseColumns = [
|
459 |
+
{
|
460 |
+
accessorKey: "isPinned",
|
461 |
+
header: () => null,
|
462 |
+
cell: ({ row }) => (
|
463 |
+
<Box
|
464 |
+
sx={{
|
465 |
+
display: "flex",
|
466 |
+
alignItems: "center",
|
467 |
+
justifyContent: "center",
|
468 |
+
height: "100%",
|
469 |
+
}}
|
470 |
+
>
|
471 |
+
<IconButton
|
472 |
+
size="small"
|
473 |
+
onClick={(e) => {
|
474 |
+
e.stopPropagation();
|
475 |
+
e.preventDefault();
|
476 |
+
onTogglePin(row.original.id);
|
477 |
+
}}
|
478 |
+
sx={{
|
479 |
+
padding: 0.5,
|
480 |
+
color: row.original.isPinned
|
481 |
+
? "primary.main"
|
482 |
+
: "grey.400",
|
483 |
+
"&:hover": {
|
484 |
+
color: "primary.main",
|
485 |
+
},
|
486 |
+
}}
|
487 |
+
>
|
488 |
+
{row.original.isPinned ? (
|
489 |
+
<PushPinIcon fontSize="small" />
|
490 |
+
) : (
|
491 |
+
<PushPinOutlinedIcon fontSize="small" />
|
492 |
+
)}
|
493 |
+
</IconButton>
|
494 |
+
</Box>
|
495 |
+
),
|
496 |
+
enableSorting: false,
|
497 |
+
size: getColumnSize(40),
|
498 |
+
},
|
499 |
+
{
|
500 |
+
accessorKey: "rank",
|
501 |
+
header: createHeaderCell("Rank"),
|
502 |
+
cell: ({ row }) => {
|
503 |
+
const rank =
|
504 |
+
rankingMode === "static"
|
505 |
+
? row.original.static_rank
|
506 |
+
: row.original.dynamic_rank;
|
507 |
|
508 |
+
return (
|
509 |
+
<RankIndicator
|
510 |
+
rank={rank}
|
511 |
+
previousRank={row.original.previous_rank}
|
512 |
+
mode="static"
|
513 |
+
/>
|
514 |
+
);
|
515 |
+
},
|
516 |
+
size: TABLE_DEFAULTS.COLUMNS.COLUMN_SIZES["rank"],
|
517 |
+
},
|
518 |
+
{
|
519 |
+
id: "model_type",
|
520 |
+
accessorFn: (row) => row.model.type,
|
521 |
+
header: createHeaderCell("Type"),
|
522 |
+
sortingFn: typeColumnSort,
|
523 |
+
cell: ({ row }) => (
|
524 |
+
<Box
|
525 |
+
sx={{
|
526 |
+
display: "flex",
|
527 |
+
alignItems: "center",
|
528 |
+
justifyContent: "center",
|
529 |
+
width: "100%",
|
530 |
+
}}
|
531 |
+
>
|
532 |
+
<Tooltip title={row.original.model.type}>
|
533 |
+
<Typography
|
534 |
+
sx={{
|
535 |
+
fontSize: "1.2rem",
|
536 |
+
cursor: "help",
|
537 |
+
lineHeight: 1,
|
538 |
+
fontFamily:
|
539 |
+
'"Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji", sans-serif',
|
540 |
+
}}
|
541 |
+
>
|
542 |
+
{getModelTypeIcon(row.original.model.type)}
|
543 |
+
</Typography>
|
544 |
+
</Tooltip>
|
545 |
+
</Box>
|
546 |
+
),
|
547 |
+
size: TABLE_DEFAULTS.COLUMNS.COLUMN_SIZES["model.type_icon"],
|
548 |
+
},
|
549 |
+
{
|
550 |
+
accessorKey: "id",
|
551 |
+
header: createModelHeader(totalModels),
|
552 |
+
cell: ({ row }) => {
|
553 |
+
const textSearch = extractTextSearch(searchValue);
|
554 |
+
const modelName = row.original.model.name;
|
555 |
|
556 |
+
return (
|
557 |
+
<Box
|
558 |
+
sx={{
|
559 |
+
width: "100%",
|
560 |
+
display: "flex",
|
561 |
+
alignItems: "center",
|
562 |
+
gap: 1,
|
563 |
+
}}
|
564 |
+
>
|
565 |
+
<Box
|
566 |
+
sx={{
|
567 |
+
display: "flex",
|
568 |
+
alignItems: "center",
|
569 |
+
gap: 1,
|
570 |
+
minWidth: 0,
|
571 |
+
flex: 1,
|
572 |
+
}}
|
573 |
+
>
|
574 |
+
<Link
|
575 |
+
href={`https://huggingface.co/${modelName}`}
|
576 |
+
target="_blank"
|
577 |
+
rel="noopener noreferrer"
|
578 |
+
aria-label={`View ${modelName} on Hugging Face Hub`}
|
579 |
+
title={TABLE_TOOLTIPS.HUB_LINK(modelName)}
|
580 |
+
sx={{
|
581 |
+
textDecoration: "none",
|
582 |
+
color: "info.main",
|
583 |
+
display: "flex",
|
584 |
+
alignItems: "center",
|
585 |
+
gap: 0.5,
|
586 |
+
"&:hover": {
|
587 |
+
textDecoration: "underline",
|
588 |
+
color: (theme) =>
|
589 |
+
theme.palette.mode === "dark"
|
590 |
+
? theme.palette.info.light
|
591 |
+
: theme.palette.info.dark,
|
592 |
+
"& svg": {
|
593 |
+
opacity: 0.8,
|
594 |
+
},
|
595 |
+
},
|
596 |
+
overflow: "hidden",
|
597 |
+
textOverflow: "ellipsis",
|
598 |
+
whiteSpace: "nowrap",
|
599 |
+
flex: 1,
|
600 |
+
minWidth: 0,
|
601 |
+
fontWeight:
|
602 |
+
row.original.static_rank <= 3
|
603 |
+
? 600
|
604 |
+
: "inherit",
|
605 |
+
}}
|
606 |
+
>
|
607 |
+
<HighlightedText
|
608 |
+
text={modelName}
|
609 |
+
searchValue={textSearch}
|
610 |
+
/>
|
611 |
+
<OpenInNewIcon
|
612 |
+
sx={{
|
613 |
+
fontSize: "0.75rem",
|
614 |
+
opacity: 0.6,
|
615 |
+
transition: "opacity 0.2s ease-in-out",
|
616 |
+
ml: 0.5,
|
617 |
+
flexShrink: 0,
|
618 |
+
}}
|
619 |
+
/>
|
620 |
+
</Link>
|
621 |
+
<Link
|
622 |
+
href={getDetailsUrl(modelName)}
|
623 |
+
target="_blank"
|
624 |
+
rel="noopener noreferrer"
|
625 |
+
aria-label={`View detailed evaluation results for ${modelName}`}
|
626 |
+
title={TABLE_TOOLTIPS.EVAL_RESULTS(modelName)}
|
627 |
+
sx={{
|
628 |
+
textDecoration: "none",
|
629 |
+
"&:hover": {
|
630 |
+
textDecoration: "underline",
|
631 |
+
"& svg": {
|
632 |
+
color: "text.primary",
|
633 |
+
},
|
634 |
+
},
|
635 |
+
display: "flex",
|
636 |
+
alignItems: "center",
|
637 |
+
color: "text.secondary",
|
638 |
+
flexShrink: 0,
|
639 |
+
mr: 0,
|
640 |
+
}}
|
641 |
+
>
|
642 |
+
<DatabaseIcon />
|
643 |
+
</Link>
|
644 |
+
</Box>
|
645 |
+
</Box>
|
646 |
+
);
|
647 |
+
},
|
648 |
+
size: TABLE_DEFAULTS.COLUMNS.COLUMN_SIZES["id"],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
649 |
},
|
650 |
+
{
|
651 |
+
accessorKey: "model.average_score",
|
652 |
+
header: createHeaderCell("Average", COLUMN_TOOLTIPS.AVERAGE),
|
653 |
+
cell: ({ row, getValue }) =>
|
654 |
+
createScoreCell(getValue, row, "model.average_score"),
|
655 |
+
size: TABLE_DEFAULTS.COLUMNS.COLUMN_SIZES["model.average_score"],
|
656 |
+
meta: {
|
657 |
+
headerStyle: {
|
658 |
+
borderLeft: (theme) =>
|
659 |
+
`2px solid ${alpha(
|
660 |
+
theme.palette.divider,
|
661 |
+
theme.palette.mode === "dark" ? 0.1 : 0.2
|
662 |
+
)}`,
|
663 |
+
borderRight: (theme) =>
|
664 |
+
`2px solid ${alpha(
|
665 |
+
theme.palette.divider,
|
666 |
+
theme.palette.mode === "dark" ? 0.1 : 0.2
|
667 |
+
)}`,
|
668 |
+
},
|
669 |
+
cellStyle: (value) => ({
|
670 |
+
position: "relative",
|
671 |
+
overflow: "hidden",
|
672 |
+
padding: "8px 16px",
|
673 |
+
borderLeft: (theme) =>
|
674 |
+
`2px solid ${alpha(
|
675 |
+
theme.palette.divider,
|
676 |
+
theme.palette.mode === "dark" ? 0.1 : 0.2
|
677 |
+
)}`,
|
678 |
+
borderRight: (theme) =>
|
679 |
+
`2px solid ${alpha(
|
680 |
+
theme.palette.divider,
|
681 |
+
theme.palette.mode === "dark" ? 0.1 : 0.2
|
682 |
+
)}`,
|
683 |
+
}),
|
684 |
+
},
|
685 |
+
},
|
686 |
+
];
|
687 |
+
const createScoreCell = (getValue, row, field) => {
|
688 |
+
const value = getValue();
|
689 |
+
const rawValue = field.includes("normalized")
|
690 |
+
? row.original.evaluations[field.split(".")[1]]?.value
|
691 |
+
: value;
|
692 |
|
693 |
+
const isAverageColumn = field === "model.average_score";
|
694 |
+
const hasNoValue = value === null || value === undefined;
|
695 |
|
696 |
+
return (
|
697 |
+
<Box sx={commonStyles.cellContainer}>
|
698 |
+
{!hasNoValue &&
|
699 |
+
(scoreDisplay === "normalized" || isAverageColumn) && (
|
700 |
+
<Box
|
701 |
+
sx={{
|
702 |
+
position: "absolute",
|
703 |
+
left: -16,
|
704 |
+
top: -16,
|
705 |
+
height: "calc(100% + 32px)",
|
706 |
+
width: `calc(${value}% + 16px)`,
|
707 |
+
backgroundColor: getColorForValue(value),
|
708 |
+
opacity: (theme) =>
|
709 |
+
theme.palette.mode === "light" ? 0.1 : 0.2,
|
710 |
+
transition: "width 0.3s ease",
|
711 |
+
zIndex: 0,
|
712 |
+
}}
|
713 |
+
/>
|
714 |
+
)}
|
715 |
+
<Box
|
716 |
+
sx={{
|
717 |
+
position: "relative",
|
718 |
+
display: "flex",
|
719 |
+
alignItems: "center",
|
720 |
+
gap: 1,
|
721 |
+
zIndex: 1,
|
722 |
+
pl: isAverageColumn && !hasNoValue ? 1 : 0,
|
723 |
+
}}
|
724 |
+
>
|
725 |
+
{isAverageColumn && !hasNoValue && (
|
726 |
+
<Box
|
727 |
+
sx={{
|
728 |
+
width: 10,
|
729 |
+
height: 10,
|
730 |
+
borderRadius: "50%",
|
731 |
+
marginLeft: -1,
|
732 |
+
backgroundColor: getColorForValue(value),
|
733 |
+
}}
|
734 |
+
/>
|
735 |
+
)}
|
736 |
+
<Typography variant="body2">
|
737 |
+
{hasNoValue ? (
|
738 |
+
"-"
|
739 |
+
) : (
|
740 |
+
<>
|
741 |
+
{isAverageColumn ? (
|
742 |
+
<>
|
743 |
+
{value.toFixed(2)}
|
744 |
+
<span style={{ opacity: 0.5 }}> %</span>
|
745 |
+
</>
|
746 |
+
) : scoreDisplay === "normalized" ? (
|
747 |
+
<>
|
748 |
+
{value.toFixed(2)}
|
749 |
+
<span style={{ opacity: 0.5 }}> %</span>
|
750 |
+
</>
|
751 |
+
) : (
|
752 |
+
<>{rawValue.toFixed(2)}</>
|
753 |
+
)}
|
754 |
+
</>
|
755 |
+
)}
|
756 |
+
</Typography>
|
757 |
+
</Box>
|
758 |
+
</Box>
|
759 |
+
);
|
760 |
+
};
|
761 |
|
762 |
+
const evaluationColumns = [
|
763 |
+
{
|
764 |
+
accessorKey: "evaluations.bc5cdr_chemical.normalized_score",
|
765 |
+
header: createHeaderCell(
|
766 |
+
"BC5CDR-chemical",
|
767 |
+
COLUMN_TOOLTIPS.BC5CDR_CHEMICAL
|
768 |
+
),
|
769 |
+
cell: ({ row, getValue }) =>
|
770 |
+
createScoreCell(
|
771 |
+
getValue,
|
772 |
+
row,
|
773 |
+
"evaluations.bc5cdr_chemical.normalized_score"
|
774 |
+
),
|
775 |
+
size: TABLE_DEFAULTS.COLUMNS.COLUMN_SIZES[
|
776 |
+
"evaluations.bc5cdr_chemical.normalized_score"
|
777 |
+
],
|
778 |
+
},
|
779 |
+
{
|
780 |
+
accessorKey: "evaluations.ncbi_disease.normalized_score",
|
781 |
+
header: createHeaderCell(
|
782 |
+
"NCBI Disease",
|
783 |
+
COLUMN_TOOLTIPS.NCBI_DISEASE
|
784 |
+
),
|
785 |
+
cell: ({ row, getValue }) =>
|
786 |
+
createScoreCell(
|
787 |
+
getValue,
|
788 |
+
row,
|
789 |
+
"evaluations.ncbi_disease.normalized_score"
|
790 |
+
),
|
791 |
+
size: TABLE_DEFAULTS.COLUMNS.COLUMN_SIZES[
|
792 |
+
"evaluations.ncbi_disease.normalized_score"
|
793 |
+
],
|
794 |
+
},
|
795 |
+
{
|
796 |
+
accessorKey: "evaluations.chemprot.normalized_score",
|
797 |
+
header: createHeaderCell("ChemProt", COLUMN_TOOLTIPS.CHEMPROT),
|
798 |
+
cell: ({ row, getValue }) =>
|
799 |
+
createScoreCell(
|
800 |
+
getValue,
|
801 |
+
row,
|
802 |
+
"evaluations.chemprot.normalized_score"
|
803 |
+
),
|
804 |
+
size: TABLE_DEFAULTS.COLUMNS.COLUMN_SIZES[
|
805 |
+
"evaluations.chemprot.normalized_score"
|
806 |
+
],
|
807 |
+
},
|
808 |
+
{
|
809 |
+
accessorKey: "evaluations.ddi2013.normalized_score",
|
810 |
+
header: createHeaderCell("DDI2013", COLUMN_TOOLTIPS.DDI2013),
|
811 |
+
cell: ({ row, getValue }) =>
|
812 |
+
createScoreCell(
|
813 |
+
getValue,
|
814 |
+
row,
|
815 |
+
"evaluations.ddi2013.normalized_score"
|
816 |
+
),
|
817 |
+
size: TABLE_DEFAULTS.COLUMNS.COLUMN_SIZES[
|
818 |
+
"evaluations.ddi2013.normalized_score"
|
819 |
+
],
|
820 |
+
},
|
821 |
+
{
|
822 |
+
accessorKey: "evaluations.hoc.normalized_score",
|
823 |
+
header: createHeaderCell("HoC", COLUMN_TOOLTIPS.HOC),
|
824 |
+
cell: ({ row, getValue }) =>
|
825 |
+
createScoreCell(
|
826 |
+
getValue,
|
827 |
+
row,
|
828 |
+
"evaluations.hoc.normalized_score"
|
829 |
+
),
|
830 |
+
size: TABLE_DEFAULTS.COLUMNS.COLUMN_SIZES[
|
831 |
+
"evaluations.hoc.normalized_score"
|
832 |
+
],
|
833 |
+
},
|
834 |
+
{
|
835 |
+
accessorKey: "evaluations.litcovid.normalized_score",
|
836 |
+
header: createHeaderCell("LitCovid", COLUMN_TOOLTIPS.LITCOVID),
|
837 |
+
cell: ({ row, getValue }) =>
|
838 |
+
createScoreCell(
|
839 |
+
getValue,
|
840 |
+
row,
|
841 |
+
"evaluations.litcovid.normalized_score"
|
842 |
+
),
|
843 |
+
size: TABLE_DEFAULTS.COLUMNS.COLUMN_SIZES[
|
844 |
+
"evaluations.litcovid.normalized_score"
|
845 |
+
],
|
846 |
+
},
|
847 |
+
{
|
848 |
+
accessorKey: "evaluations.medqa.normalized_score",
|
849 |
+
header: createHeaderCell("MedQA (5-Option)", COLUMN_TOOLTIPS.MEDQA),
|
850 |
+
cell: ({ row, getValue }) =>
|
851 |
+
createScoreCell(
|
852 |
+
getValue,
|
853 |
+
row,
|
854 |
+
"evaluations.medqa.normalized_score"
|
855 |
+
),
|
856 |
+
size: TABLE_DEFAULTS.COLUMNS.COLUMN_SIZES[
|
857 |
+
"evaluations.medqa.normalized_score"
|
858 |
+
],
|
859 |
+
},
|
860 |
+
{
|
861 |
+
accessorKey: "evaluations.pubmedqa.normalized_score",
|
862 |
+
header: createHeaderCell("PubMedQA", COLUMN_TOOLTIPS.PUBMEDQA),
|
863 |
+
cell: ({ row, getValue }) =>
|
864 |
+
createScoreCell(
|
865 |
+
getValue,
|
866 |
+
row,
|
867 |
+
"evaluations.pubmedqa.normalized_score"
|
868 |
+
),
|
869 |
+
size: TABLE_DEFAULTS.COLUMNS.COLUMN_SIZES[
|
870 |
+
"evaluations.pubmedqa.normalized_score"
|
871 |
+
],
|
872 |
+
},
|
873 |
+
{
|
874 |
+
accessorKey: "evaluations.pubmed.normalized_score",
|
875 |
+
header: createHeaderCell("PubMed", COLUMN_TOOLTIPS.PUBMED),
|
876 |
+
cell: ({ row, getValue }) =>
|
877 |
+
createScoreCell(
|
878 |
+
getValue,
|
879 |
+
row,
|
880 |
+
"evaluations.pubmed.normalized_score"
|
881 |
+
),
|
882 |
+
size: TABLE_DEFAULTS.COLUMNS.COLUMN_SIZES[
|
883 |
+
"evaluations.pubmed.normalized_score"
|
884 |
+
],
|
885 |
+
},
|
886 |
+
{
|
887 |
+
accessorKey: "evaluations.ms2.normalized_score",
|
888 |
+
header: createHeaderCell("MS^2", COLUMN_TOOLTIPS.MS2),
|
889 |
+
cell: ({ row, getValue }) =>
|
890 |
+
createScoreCell(
|
891 |
+
getValue,
|
892 |
+
row,
|
893 |
+
"evaluations.ms2.normalized_score"
|
894 |
+
),
|
895 |
+
size: TABLE_DEFAULTS.COLUMNS.COLUMN_SIZES[
|
896 |
+
"evaluations.ms2.normalized_score"
|
897 |
+
],
|
898 |
+
},
|
899 |
+
{
|
900 |
+
accessorKey: "evaluations.cochrane_pls.normalized_score",
|
901 |
+
header: createHeaderCell(
|
902 |
+
"Cochrane PLS",
|
903 |
+
COLUMN_TOOLTIPS.COCHRANE_PLS
|
904 |
+
),
|
905 |
+
cell: ({ row, getValue }) =>
|
906 |
+
createScoreCell(
|
907 |
+
getValue,
|
908 |
+
row,
|
909 |
+
"evaluations.cochrane_pls.normalized_score"
|
910 |
+
),
|
911 |
+
size: TABLE_DEFAULTS.COLUMNS.COLUMN_SIZES[
|
912 |
+
"evaluations.cochrane_pls.normalized_score"
|
913 |
+
],
|
914 |
+
},
|
915 |
+
{
|
916 |
+
accessorKey: "evaluations.plos.normalized_score",
|
917 |
+
header: createHeaderCell("PLOS", COLUMN_TOOLTIPS.PLOS),
|
918 |
+
cell: ({ row, getValue }) =>
|
919 |
+
createScoreCell(
|
920 |
+
getValue,
|
921 |
+
row,
|
922 |
+
"evaluations.plos.normalized_score"
|
923 |
+
),
|
924 |
+
size: TABLE_DEFAULTS.COLUMNS.COLUMN_SIZES[
|
925 |
+
"evaluations.plos.normalized_score"
|
926 |
+
],
|
927 |
+
},
|
928 |
+
];
|
929 |
|
930 |
+
const optionalColumns = [
|
931 |
+
{
|
932 |
+
accessorKey: "model.architecture",
|
933 |
+
header: createHeaderCell(
|
934 |
+
"Architecture",
|
935 |
+
COLUMN_TOOLTIPS.ARCHITECTURE
|
936 |
+
),
|
937 |
+
accessorFn: (row) => row.model.architecture,
|
938 |
+
cell: ({ row }) => (
|
939 |
+
<Tooltip title={row.original.model.architecture || "-"}>
|
940 |
+
<span>{row.original.model.architecture || "-"}</span>
|
941 |
+
</Tooltip>
|
942 |
+
),
|
943 |
+
size: TABLE_DEFAULTS.COLUMNS.COLUMN_SIZES["model.architecture"],
|
944 |
+
},
|
945 |
+
{
|
946 |
+
accessorKey: "model.precision",
|
947 |
+
header: createHeaderCell("Precision", COLUMN_TOOLTIPS.PRECISION),
|
948 |
+
accessorFn: (row) => row.model.precision,
|
949 |
+
cell: ({ row }) => (
|
950 |
+
<Tooltip title={row.original.model.precision || "-"}>
|
951 |
+
<span>{row.original.model.precision || "-"}</span>
|
952 |
+
</Tooltip>
|
953 |
+
),
|
954 |
+
size: TABLE_DEFAULTS.COLUMNS.COLUMN_SIZES["model.precision"],
|
955 |
+
},
|
956 |
+
{
|
957 |
+
accessorKey: "metadata.params_billions",
|
958 |
+
header: createHeaderCell("Parameters", COLUMN_TOOLTIPS.PARAMETERS),
|
959 |
+
cell: ({ row }) => (
|
960 |
+
<Box
|
961 |
+
sx={{
|
962 |
+
display: "flex",
|
963 |
+
alignItems: "center",
|
964 |
+
justifyContent: "flex-start",
|
965 |
+
}}
|
966 |
+
>
|
967 |
+
<Typography variant="body2">
|
968 |
+
{row.original.metadata.params_billions}
|
969 |
+
<span style={{ opacity: 0.6 }}>B</span>
|
970 |
+
</Typography>
|
971 |
+
</Box>
|
972 |
+
),
|
973 |
+
size: TABLE_DEFAULTS.COLUMNS.COLUMN_SIZES[
|
974 |
+
"metadata.params_billions"
|
975 |
+
],
|
976 |
+
},
|
977 |
+
{
|
978 |
+
accessorKey: "metadata.hub_license",
|
979 |
+
header: createHeaderCell("License", COLUMN_TOOLTIPS.LICENSE),
|
980 |
+
cell: ({ row }) => (
|
981 |
+
<Tooltip title={row.original.metadata.hub_license || "-"}>
|
982 |
+
<Typography
|
983 |
+
variant="body2"
|
984 |
+
sx={{
|
985 |
+
overflow: "hidden",
|
986 |
+
textOverflow: "ellipsis",
|
987 |
+
whiteSpace: "nowrap",
|
988 |
+
}}
|
989 |
+
>
|
990 |
+
{row.original.metadata.hub_license || "-"}
|
991 |
+
</Typography>
|
992 |
+
</Tooltip>
|
993 |
+
),
|
994 |
+
size: TABLE_DEFAULTS.COLUMNS.COLUMN_SIZES["metadata.hub_license"],
|
995 |
+
},
|
996 |
+
{
|
997 |
+
accessorKey: "metadata.hub_hearts",
|
998 |
+
header: createHeaderCell(
|
999 |
+
"Hub ❤️",
|
1000 |
+
"Number of likes received on the Hugging Face Hub"
|
1001 |
+
),
|
1002 |
+
cell: ({ row }) => (
|
1003 |
+
<Typography variant="body2">
|
1004 |
+
{row.original.metadata.hub_hearts}
|
1005 |
+
</Typography>
|
1006 |
+
),
|
1007 |
+
size: TABLE_DEFAULTS.COLUMNS.COLUMN_SIZES["metadata.hub_hearts"],
|
1008 |
+
},
|
1009 |
+
{
|
1010 |
+
accessorKey: "metadata.upload_date",
|
1011 |
+
header: createHeaderCell(
|
1012 |
+
"Upload Date",
|
1013 |
+
"Date when the model was uploaded to the Hugging Face Hub"
|
1014 |
+
),
|
1015 |
+
cell: ({ row }) => (
|
1016 |
+
<Tooltip title={row.original.metadata.upload_date || "-"}>
|
1017 |
+
<Typography
|
1018 |
+
variant="body2"
|
1019 |
+
sx={{
|
1020 |
+
overflow: "hidden",
|
1021 |
+
textOverflow: "ellipsis",
|
1022 |
+
whiteSpace: "nowrap",
|
1023 |
+
}}
|
1024 |
+
>
|
1025 |
+
{row.original.metadata.upload_date || "-"}
|
1026 |
+
</Typography>
|
1027 |
+
</Tooltip>
|
1028 |
+
),
|
1029 |
+
size: TABLE_DEFAULTS.COLUMNS.COLUMN_SIZES["metadata.upload_date"],
|
1030 |
+
},
|
1031 |
+
{
|
1032 |
+
accessorKey: "metadata.submission_date",
|
1033 |
+
header: createHeaderCell(
|
1034 |
+
"Submission Date",
|
1035 |
+
"Date when the model was submitted to the leaderboard"
|
1036 |
+
),
|
1037 |
+
cell: ({ row }) => (
|
1038 |
+
<Tooltip title={row.original.metadata.submission_date || "-"}>
|
1039 |
+
<Typography
|
1040 |
+
variant="body2"
|
1041 |
+
sx={{
|
1042 |
+
overflow: "hidden",
|
1043 |
+
textOverflow: "ellipsis",
|
1044 |
+
whiteSpace: "nowrap",
|
1045 |
+
}}
|
1046 |
+
>
|
1047 |
+
{row.original.metadata.submission_date || "-"}
|
1048 |
+
</Typography>
|
1049 |
+
</Tooltip>
|
1050 |
+
),
|
1051 |
+
size: TABLE_DEFAULTS.COLUMNS.COLUMN_SIZES[
|
1052 |
+
"metadata.submission_date"
|
1053 |
+
],
|
1054 |
+
},
|
1055 |
+
{
|
1056 |
+
accessorKey: "metadata.generation",
|
1057 |
+
header: createHeaderCell(
|
1058 |
+
"Generation",
|
1059 |
+
"The generation or version number of the model"
|
1060 |
+
),
|
1061 |
+
cell: ({ row }) => (
|
1062 |
+
<Typography variant="body2">
|
1063 |
+
{row.original.metadata.generation}
|
1064 |
+
</Typography>
|
1065 |
+
),
|
1066 |
+
size: TABLE_DEFAULTS.COLUMNS.COLUMN_SIZES["metadata.generation"],
|
1067 |
+
},
|
1068 |
+
{
|
1069 |
+
accessorKey: "metadata.base_model",
|
1070 |
+
header: createHeaderCell(
|
1071 |
+
"Base Model",
|
1072 |
+
"The original model this model was derived from"
|
1073 |
+
),
|
1074 |
+
cell: ({ row }) => (
|
1075 |
+
<Tooltip title={row.original.metadata.base_model || "-"}>
|
1076 |
+
<Typography
|
1077 |
+
variant="body2"
|
1078 |
+
sx={{
|
1079 |
+
overflow: "hidden",
|
1080 |
+
textOverflow: "ellipsis",
|
1081 |
+
whiteSpace: "nowrap",
|
1082 |
+
}}
|
1083 |
+
>
|
1084 |
+
{row.original.metadata.base_model || "-"}
|
1085 |
+
</Typography>
|
1086 |
+
</Tooltip>
|
1087 |
+
),
|
1088 |
+
size: TABLE_DEFAULTS.COLUMNS.COLUMN_SIZES["metadata.base_model"],
|
1089 |
+
},
|
1090 |
+
{
|
1091 |
+
accessorKey: "metadata.co2_cost",
|
1092 |
+
header: createHeaderCell("CO₂ Cost", COLUMN_TOOLTIPS.CO2_COST),
|
1093 |
+
cell: ({ row }) => (
|
1094 |
+
<Box
|
1095 |
+
sx={{
|
1096 |
+
display: "flex",
|
1097 |
+
alignItems: "center",
|
1098 |
+
justifyContent: "flex-start",
|
1099 |
+
}}
|
1100 |
+
>
|
1101 |
+
<Typography variant="body2">
|
1102 |
+
{row.original.metadata.co2_cost?.toFixed(2) || "0"}
|
1103 |
+
<span style={{ opacity: 0.6 }}> kg</span>
|
1104 |
+
</Typography>
|
1105 |
+
</Box>
|
1106 |
+
),
|
1107 |
+
size: TABLE_DEFAULTS.COLUMNS.COLUMN_SIZES["metadata.co2_cost"],
|
1108 |
+
},
|
1109 |
+
{
|
1110 |
+
accessorKey: "model.has_chat_template",
|
1111 |
+
header: createHeaderCell(
|
1112 |
+
"Chat Template",
|
1113 |
+
"Whether this model has a chat template defined"
|
1114 |
+
),
|
1115 |
+
cell: ({ row }) => (
|
1116 |
+
<BooleanValue value={row.original.model.has_chat_template} />
|
1117 |
+
),
|
1118 |
+
size: TABLE_DEFAULTS.COLUMNS.COLUMN_SIZES[
|
1119 |
+
"model.has_chat_template"
|
1120 |
+
],
|
1121 |
+
},
|
1122 |
+
{
|
1123 |
+
accessorKey: "features.is_not_available_on_hub",
|
1124 |
+
header: createHeaderCell(
|
1125 |
+
"Hub Availability",
|
1126 |
+
"Whether the model is available on the Hugging Face Hub"
|
1127 |
+
),
|
1128 |
+
cell: ({ row }) => (
|
1129 |
+
<BooleanValue
|
1130 |
+
value={row.original.features.is_not_available_on_hub}
|
1131 |
+
/>
|
1132 |
+
),
|
1133 |
+
size: TABLE_DEFAULTS.COLUMNS.COLUMN_SIZES[
|
1134 |
+
"features.is_not_available_on_hub"
|
1135 |
+
],
|
1136 |
+
},
|
1137 |
+
{
|
1138 |
+
accessorKey: "features.is_highlighted_by_maintainer",
|
1139 |
+
header: createHeaderCell(
|
1140 |
+
"Official Providers",
|
1141 |
+
"Models that are officially provided and maintained by their original creators or organizations"
|
1142 |
+
),
|
1143 |
+
cell: ({ row }) => (
|
1144 |
+
<BooleanValue
|
1145 |
+
value={row.original.features.is_highlighted_by_maintainer}
|
1146 |
+
/>
|
1147 |
+
),
|
1148 |
+
size: TABLE_DEFAULTS.COLUMNS.COLUMN_SIZES[
|
1149 |
+
"features.is_highlighted_by_maintainer"
|
1150 |
+
],
|
1151 |
+
enableSorting: true,
|
1152 |
+
},
|
1153 |
+
{
|
1154 |
+
accessorKey: "features.is_moe",
|
1155 |
+
header: createHeaderCell(
|
1156 |
+
"Mixture of Experts",
|
1157 |
+
"Whether this model uses a Mixture of Experts architecture"
|
1158 |
+
),
|
1159 |
+
cell: ({ row }) => (
|
1160 |
+
<BooleanValue value={row.original.features.is_moe} />
|
1161 |
+
),
|
1162 |
+
size: TABLE_DEFAULTS.COLUMNS.COLUMN_SIZES["features.is_moe"],
|
1163 |
+
},
|
1164 |
+
{
|
1165 |
+
accessorKey: "features.is_flagged",
|
1166 |
+
header: createHeaderCell(
|
1167 |
+
"Flag Status",
|
1168 |
+
"Whether this model has been flagged for any issues"
|
1169 |
+
),
|
1170 |
+
cell: ({ row }) => (
|
1171 |
+
<BooleanValue value={row.original.features.is_flagged} />
|
1172 |
+
),
|
1173 |
+
size: TABLE_DEFAULTS.COLUMNS.COLUMN_SIZES["features.is_flagged"],
|
1174 |
+
},
|
1175 |
+
];
|
1176 |
|
1177 |
+
// Utiliser directement columnVisibility
|
1178 |
+
const finalColumns = [
|
1179 |
+
...baseColumns,
|
1180 |
+
...evaluationColumns.filter((col) => columnVisibility[col.accessorKey]),
|
1181 |
+
...optionalColumns
|
1182 |
+
.filter((col) => columnVisibility[col.accessorKey])
|
1183 |
+
.sort((a, b) => {
|
1184 |
+
// Définir l'ordre personnalisé des colonnes
|
1185 |
+
const order = {
|
1186 |
+
"model.architecture": 1,
|
1187 |
+
"model.precision": 2,
|
1188 |
+
"metadata.params_billions": 3,
|
1189 |
+
"metadata.hub_license": 4,
|
1190 |
+
"metadata.co2_cost": 5,
|
1191 |
+
"metadata.hub_hearts": 6,
|
1192 |
+
"metadata.upload_date": 7,
|
1193 |
+
"metadata.submission_date": 8,
|
1194 |
+
"metadata.generation": 9,
|
1195 |
+
"metadata.base_model": 10,
|
1196 |
+
"model.has_chat_template": 11,
|
1197 |
+
"features.is_not_available_on_hub": 12,
|
1198 |
+
"features.is_highlighted_by_maintainer": 13,
|
1199 |
+
"features.is_moe": 14,
|
1200 |
+
"features.is_flagged": 15,
|
1201 |
+
};
|
1202 |
+
return order[a.accessorKey] - order[b.accessorKey];
|
1203 |
+
}),
|
1204 |
+
];
|
1205 |
|
1206 |
+
return finalColumns;
|
1207 |
};
|