Repository navigation
fix(train): omit input_data_config when no input channels are provided - #6399
Open
reginaldalfret wants to merge 1 commit into
Open
reginaldalfret wants to merge 1 commit into
reginaldalfret wants to merge 1 commit into
Conversation
When a ModelTrainer has no input channels specified, _create_training_job_args
serialized an empty list ('input_data_config: []'). Downstream CreatePipeline
rejects an empty InputDataConfig array with ValidationException because the
botocore service model enforces min=1 on InputDataConfig when present.
Omit input_data_config from training_request when final_input_data_config is
empty, allowing the SageMaker API and CreatePipeline to succeed as in v2.
Fixes aws#6156
Signed-off-by: reginaldalfret <reginaldalfret@gmail.com>
reginaldalfret
had a problem deploying
to
manual-approval
October 9, 2026 09:29 — with
GitHub Actions
Failure
reginaldalfret
had a problem deploying
to
manual-approval
October 9, 2026 09:29 — with
GitHub Actions
Failure
reginaldalfret
had a problem deploying
to
manual-approval
October 9, 2026 09:29 — with
GitHub Actions
Failure
This branch had an error being 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.
Description
When a
ModelTraineris configured without input channels (such as fine-tuning jobs where data is fetched directly inside the container from Hugging Face Hub or other sources),_create_training_job_argspreviously emitted"input_data_config": [].SageMaker's
CreatePipelinerejects an empty array with:While SageMaker's API accepts an omitted
InputDataConfig, it rejects an empty list due to themin=1constraint in the service model. Under PySDK v2, the key was omitted when no channels were provided.Solution
input_data_configfrom the generated training request dictionary whenfinal_input_data_configis empty.training_request.get("input_data_config")safely in_LocalContainerinstantiation.input_data_configis omitted when empty and included when channels are provided.Fixes #6156