fix(framework): stop Flux appending the Runtime args to the training command - #4003
Open
rjgoyln wants to merge 1 commit into
Open
fix(framework): stop Flux appending the Runtime args to the training command#4003rjgoyln wants to merge 1 commit into
rjgoyln wants to merge 1 commit into
Conversation
Contributor
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Contributor
|
🎉 Welcome to the Kubeflow Trainer! 🎉 Thanks for opening your first PR! We're happy to have you as part of our community 🚀 Here's what happens next:
Join the community:
Feel free to ask questions in the comments if you need any help or clarification! |
…command The Flux entrypoint wraps the training command so that only it controls execution, and the plugin clears `.spec.trainer.args` to say so. Clearing the TrainJob field only stops the JobSet builder from re-applying it, though: the args the Runtime itself declares stay on the container, and the entrypoint collapses every positional argument it receives onto the command it wraps. A TrainJob asking for `--epochs 3` against a Runtime declaring `--epochs 10` runs the training command with both, the Runtime's value last. The same asymmetry loses those args from the wrapped command. It falls back to the Runtime-declared command when the TrainJob overrides nothing, but the args were only ever read from the TrainJob, so a Runtime that declares args and a TrainJob that does not produced a command missing them. Signed-off-by: rjgoyln <pt40419@gmail.com>
rjgoyln
force-pushed
the
fix/flux-trainer-args
branch
from
August 28, 2026 16:14
92c16d7 to
e0ff255
Compare
rjgoyln
marked this pull request as ready for review
August 28, 2026 16:53
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.
Summary
The Flux plugin wraps the training command in its entrypoint so that only the entrypoint controls execution, and clears
.spec.trainer.argsto say so. That only stops the JobSet builder from re-applying the TrainJob's args — the ones the Runtime declares stay on the container, andentrypoint.shcollapses every argument it receives onto the command it wraps. A TrainJob asking for--epochs 3against a Runtime declaring--epochs 10runs with both, the Runtime's value last; no runtime underexamples/flux/declares args, which is why the path has gone unnoticed.The same asymmetry drops those args in the other direction: the wrapped command falls back to the Runtime-declared command when the TrainJob overrides nothing, but args were only ever read from the TrainJob.
Change
Both halves come down to the field-by-field
!= niloverride the builder already applies for every other runtime. Clearing now means an empty rather than nil.spec.trainer.args, so the builder replaces the Runtime's args instead of skipping them — the mirror of #3904, which allocates aTrainerso that same rule can carry the entrypoint command. Wrapping takes the Runtime's args as its base, so a TrainJob overriding onlycommandkeeps them.Reading them needs
Argson the PodSetContainer, continuing #3674, which exposedImageandCommandfor the same reason. It is inbound only: syncing it back out is #3967's to make, and resolving args into the template there needs the empty value this PR introduces.slices.Concatreplacesappend, which could otherwise write into the PodSet container's own backing array now that command and args both come from there.Checklist: