Skip to content

fix(examples): correct recipe-override precedence asserts in SFT notebook#6049

Open
Hannah14295 wants to merge 1 commit into
aws:masterfrom
Hannah14295:fix/recipe-override-sft-resolved-recipe-keys
Open

fix(examples): correct recipe-override precedence asserts in SFT notebook#6049
Hannah14295 wants to merge 1 commit into
aws:masterfrom
Hannah14295:fix/recipe-override-sft-resolved-recipe-keys

Conversation

@Hannah14295

Copy link
Copy Markdown
Contributor

recipe_override_sft_trainer_example asserted on training_config["learning_rate"] and training_config["num_epochs"], but the resolved Nova recipe exposes neither key, so the notebook fails with KeyError: 'learning_rate'.

  • The "learning_rate" override is applied under training_config.optim_config.lr (that value is correctly 5e-6), not a top-level training_config.learning_rate.
  • "num_epochs" is not a Nova recipe key at all — Nova SFT is step-based (max_steps), so the recipe resolver drops the num_epochs override with a warning ("Override key 'training_config.num_epochs' ... will be dropped").

Assert on training_config["optim_config"]["lr"] and drop the invalid num_epochs assertion. Verified by executing the notebook end to end (training job Completed).

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

…book

The precedence-verification cell asserted training_config["learning_rate"] and
["num_epochs"], but the resolved Nova recipe exposes neither key, so the notebook
fails with KeyError: 'learning_rate'.

- The learning_rate override is applied under training_config.optim_config.lr
  (value 5e-6), not a top-level training_config.learning_rate.
- num_epochs is not a Nova recipe key — Nova SFT is step-based (max_steps), so
  the recipe resolver drops the num_epochs override.

Override and assert max_steps (the step-based equivalent of epochs) instead of
num_epochs, and assert optim_config.lr. Precedence table updated to match.
Verified the overrides take effect (optim_config.lr=5e-6, max_steps=20).
@Hannah14295
Hannah14295 force-pushed the fix/recipe-override-sft-resolved-recipe-keys branch from 4c9953c to 0e5df55 Compare July 18, 2026 00:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants