Repository navigation
Conversation
_get_unique_name appended the timestamp and then cut the whole name to max_length, so a base name longer than 48 characters lost part or all of the timestamp and repeated calls produced the same job name. Trim the base instead, like name_from_base in sagemaker-core, so the full timestamp is always kept.
kwy404
requested a deployment
to
manual-approval
October 27, 2026 18:37 — with
GitHub Actions
Waiting
kwy404
requested a deployment
to
manual-approval
October 27, 2026 18:37 — with
GitHub Actions
Waiting
kwy404
requested a deployment
to
manual-approval
October 27, 2026 18:38 — with
GitHub Actions
Waiting
This branch is waiting to be 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.
Issue #, if available: N/A
Description of changes:
Root cause:
_get_unique_nameinsagemaker-trainappends a 14 digit timestamp to the base name and then cuts the whole string tomax_length(63). When the base name is longer than 48 characters, that cut removes part or all of the timestamp, so repeated calls return the same name and the next job fails because the name is already in use.Long bases come from the trainers' own defaults. For example
RLVRTrainer(model="huggingface-reasoning-nvidia-nemotron-3-nano-30b-a3b-bf16")usesf"{model_name}-rlvr"(62 characters), and every call currently returnshuggingface-reasoning-nvidia-nemotron-3-nano-30b-a3b-bf16-rlvr-, with no timestamp at all. That name also ends in a hyphen, which theTrainingJobNamepattern does not allow.Fix: trim the base instead of the final string, the same way
name_from_baseinsagemaker-corealready does. The full timestamp is always kept and the result is still at mostmax_lengthcharacters.Test:
test_get_unique_name_keeps_timestamp_for_long_base_nameintests/unit/train/test_model_trainer.pypins the clock and checks that a 60 character base gives"a" * 48 + "-20260926123456". It fails on master (the name ends in-20) and passes with the fix. black and flake8 are clean on the changed files.By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.