mirror of
https://github.com/harvard-edge/cs249r_book.git
synced 2026-07-15 21:28:33 -05:00
[PR #1934] [MERGED] fix(mlperf-edu): CSV leaderboard export crashes on mixed grade result shapes #32198
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/harvard-edge/cs249r_book/pull/1934
Author: @Shashank-Tripathi-07
Created: 7/7/2026
Status: ✅ Merged
Merged: 7/10/2026
Merged by: @profvjreddi
Base:
dev← Head:fix/grader-csv-fieldnames-crash📝 Commits (1)
3cefb94fix(mlperf-edu): CSV leaderboard export crashes on mixed grade result shapes📊 Changes
1 file changed (+6 additions, -2 deletions)
View changed files
📝
mlperf-edu/scripts/autograder/grade_all.py(+6 -2)📄 Description
Summary
_export_leaderboard()derivedcsv.DictWriterfieldnames fromgrades[0].keys()alone. Non-validated results (CORRUPT_ZIP,NO_PAYLOAD,JSON_ERROR) have fewer keys than aVALIDATEDresult (missingThroughput), so whenever a non-validated submission happened to sort first fromglob.glob()(filesystem-order dependent, not guaranteed alphabetical), writing a laterVALIDATEDrow raisedValueError: dict contains fields not in fieldnames, crashing the export for the entire batch.Test plan
_export_leaderboard()with aCORRUPT_ZIPresult first and aVALIDATEDresult second -- confirmedValueError: dict contains fields not in fieldnames: 'Throughput'.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.