mirror of
https://github.com/harvard-edge/cs249r_book.git
synced 2026-07-16 23:24:55 -05:00
[PR #1938] [MERGED] fix(mlperf-edu): plateau detection mixes losses across NAS attempts #32202
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/1938
Author: @Shashank-Tripathi-07
Created: 7/7/2026
Status: ✅ Merged
Merged: 7/10/2026
Merged by: @profvjreddi
Base:
dev← Head:fix/auto-trainer-plateau-history-reset📝 Commits (1)
de57faafix(mlperf-edu): plateau detection mixes losses across NAS attempts📊 Changes
1 file changed (+5 additions, -1 deletions)
View changed files
📝
mlperf-edu/scripts/orchestration/auto_trainer.py(+5 -1)📄 Description
Summary
loss_history/val_loss_historyaccumulate across the whole outer NAS loop, but_load_model()reloads a fresh (randomly-initialized) model after each LLM-driven rewrite._detect_plateau()slides aPLATEAU_WINDOW-entry window over this cumulative history, so right after a rewrite the window mixes the discarded architecture's plateaued tail with the new model's high initial losses -- falsely re-triggering NAS almost immediately on an architecture that never got real training, or conversely masking a genuine plateau.Fix
Added
attempt_loss_history, reset at the start of each NAS attempt (right after the model reload) and used only for plateau detection, whileloss_history/val_loss_historykeep accumulating the full trajectory used for the savedresults.jsonand convergence plot.Test plan
_detect_plateau()because the sliding window still contained the old model's plateaued tail. With the fix, the same 3 epochs correctly report no plateau (not enough data yet for the new attempt).python -m py_compilepasses on the edited file.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.