fix(args): stop a custom TrainPipelineConfig from clearing the model family - #150
Draft
Rockdu wants to merge 1 commit into
Draft
fix(args): stop a custom TrainPipelineConfig from clearing the model family#150Rockdu wants to merge 1 commit into
Rockdu wants to merge 1 commit into
Conversation
…family The model family is a separate axis from the config class. It picks the config class when no path is given, and it independently picks the encoder module -- encoder_hub.get_encoder(args.diffusion_model_family), read by the SFT validation block and by SftEncodeActor. The --train-pipeline-config-path branch cleared it to None on the grounds that "explicit config path IS the identity". That is the identity of the config class, not of the family, so a custom config could not run SFT at all. #142 then rejected the two flags together, walling off the only combination that could have supplied the family. Drop both: the path names the config class, the family stays whatever was passed. Normalization moves ahead of the branch so it applies on either path. No new validation. The family stays optional on purpose -- encoder and other per-family pieces may become customizable in their own right, and a check here would then be forbidding a legitimate run. Whoever needs the family fails at the lookup that needs it; get_encoder's message now names the flag to pass so that failure is actionable. The six recipes' command lines are unchanged (7 captured variants identical); none of them passes --train-pipeline-config-path. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
What
Drop two lines from the
--train-pipeline-config-pathbranch ofmiles_validate_args:the
--diffusion-model-familyconflict check, and theargs.diffusion_model_family = Nonethat followed it. Normalization moves ahead of the branch so it applies on either path.
Why
The model family is a separate axis from the config class. It selects the config class when
no path is given, and it independently selects the encoder module —
encoder_hub.get_encoder(args.diffusion_model_family), read by the SFT validation block andby
SftEncodeActor.The branch cleared it to
Noneon the grounds that "explicit config path IS the identity".That is the identity of the config class, not of the family, so a custom config could not
run SFT at all:
get_encodergotNoneand raised. #142 then rejected the two flagstogether, walling off the only combination that could have supplied the family.
No new validation, on purpose
The obvious-looking alternative is to require
--diffusion-model-familywhenever a configpath is given, since the family is the key several per-model pieces are looked up by. That
was rejected: the encoder — and other per-family pieces — may become customizable in their
own right, and a check here would then forbid a legitimate run. The family stays optional;
whoever needs it fails at the lookup that needs it.
get_encoder's message now names theflag to pass, so that failure is actionable instead of just reporting
None.For the same reason this does not stamp
cfg_cls.model_family.model_backendguards theFSDP parallel-plan lookup on that attribute, so an undecorated out-of-tree class does not get
a plan — but that is the class author's call to make (declare
model_family, or use@register_train_pipeline_config), not something the CLI should decide for them.Validation
Captured
train_argsfrom all six recipes plus the smoke and debug-alignment variants(7 total): identical to main. None of them passes
--train-pipeline-config-path, so nothingin-tree changes behaviour.
pre-commitandpy_compileclean.Not run:
pytestandtrain.py --help— no torch/sglang/ray in this environment. No testadded: the branch sits in
miles_validate_args, reachable only throughparse_args, whichhas no fixture in the repo.
🤖 Generated with Claude Code