Commit 5cca3a2
kshitijthakkar
Fix: Ensure all 13 metric columns always present in datasets
CRITICAL FIX: Resolves missing CO2 and power cost columns in metrics dataset.
Root Cause:
- Metrics with empty dataPoints arrays were skipped during flattening
- CO2 and power cost are cumulative and start at 0
- If first metric batch exported before accumulation, columns missing
- Result: Datasets had only 11 columns instead of expected 13
Solution:
- Initialize ALL 7 metric columns with default 0.0 values before processing
- Metrics with data points overwrite defaults with actual values
- Metrics without data points keep default 0.0
- Ensures consistent 13-column schema in every dataset
Impact:
✅ Metrics dataset always has complete schema
✅ Leaderboard aggregation never fails due to missing columns
✅ TraceMind UI can rely on consistent data structure
✅ CO2 and power cost start at 0.0, increase during evaluation
Files Modified:
- smoltrace/utils.py: Initialize columns in flatten_metrics_for_hf()
- changelog.md: Document fix
Testing:
- Verified with 2-second test (only 5 metrics, but 13 columns created)
- All columns present with appropriate values1 parent 7d8b6b4 commit 5cca3a2
File tree
53 files changed
+11496
-20
lines changed- .claude
- smoltrace
- test_cost_debug/gpt-3.5-turbo_tool_20251027_192408
- test_results/mistral_mistral-small-latest_tool_20251022_205434
- tests
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
53 files changed
+11496
-20
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
Whitespace-only changes.
0 commit comments