fix: keep the config record when a run is resumed with a different one - #104
Open
Hendrik-code wants to merge 1 commit into
Open
Hendrik-code wants to merge 1 commit into
Hendrik-code wants to merge 1 commit into
Conversation
The trainer copied `SMAUGLAB_PARAMS_JSON` to `transform_params_used_for_training.json` unconditionally, so resuming a run with a different config replaced the record: the file then described a config only the later epochs saw, while still claiming to describe the run. That file is the only provenance a finished run carries. An identical config is still a no-op. A differing one leaves the original in place, writes itself beside it under a numbered name, and warns naming both. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The defect
Unconditional. Resume a run with a different
SMAUGLAB_PARAMS_JSONand the record is replaced — the file then describes a config that only the later epochs saw, while still claiming to describe the run.That file is the only provenance a finished run carries.
migration/README.mdshows how much weight it bears: the sole surviving copy of one paper config is thetransform_params_gpu_used_for_training.jsonfrozen inside its run folders.The fix
_record_config:transform_params_used_for_training_1.json(then_2, …), and warn naming both.Nothing is lost and nothing is silently rewritten.
Tests
unit_tests/test_trainer_provenance.py: first run writes the record; resuming with the same config warns nothing and creates nothing; resuming with a different one leaves the original byte-identical, writes the numbered copy and names it in the warning; a third config does not clobber the second.Full suite unchanged against baseline;
ruff check .clean.🤖 Generated with Claude Code