* Builds a shareable QuickChart radar chart URL for a model's per-metric scores. * Currently unused in the Discord webhook, but retained for future scorecard embeds.
( model: ModelSummary, evalName: string, )
| 341 | * Currently unused in the Discord webhook, but retained for future scorecard embeds. |
| 342 | */ |
| 343 | function buildModelRadarChartUrl( |
| 344 | model: ModelSummary, |
| 345 | evalName: string, |
| 346 | ): string | undefined { |
| 347 | if (model.rows.length === 0) { |
| 348 | return undefined; |
| 349 | } |
| 350 | |
| 351 | return buildRadarChartUrl( |
| 352 | { |
| 353 | labels: model.rows.map((row) => row.name), |
| 354 | values: model.rows.map((row) => Number(row.average.toFixed(3))), |
| 355 | title: `${evalName} • ${model.id}`, |
| 356 | datasetLabel: model.id, |
| 357 | }, |
| 358 | { includeBackground: true, backgroundColor: "white" }, |
| 359 | ); |
| 360 | } |
| 361 | |
| 362 | function computeAverageScore(model: ModelSummary): number { |
| 363 | if (model.rows.length === 0) { |
nothing calls this directly
no test coverage detected