Repository navigation
Conversation
nursnaaz
requested a deployment
to
manual-approval
November 21, 2026 16:26 — with
GitHub Actions
Waiting
nursnaaz
requested a deployment
to
manual-approval
November 21, 2026 16:26 — with
GitHub Actions
Waiting
nursnaaz
requested a deployment
to
manual-approval
November 21, 2026 16:26 — 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.
Summary
unique_name_from_baseandunique_name_from_base_uuid4insagemaker-corecallrandom.seed(int(uuid.uuid4())). That reseeds the globalrandommodule of the caller's process. A user who setsrandom.seed(42)for reproducible code and then creates a job, model or endpoint name gets different random numbers afterwards. The seed call inunique_name_from_base_uuid4does nothing useful, because that function never draws fromrandom.Changes
unique_name_from_base_uuid4: removed therandom.seed(...)call.unique_name_from_base: the 4-digit hex suffix now comes fromrandom.SystemRandom().randrange(16**4). This draws from the OS entropy source, so names stay unpredictable (the goal of #using uuid to randomize, otherwise system timestamp is used #3046) and the global state is untouched.Tests
Two new tests in
sagemaker-core/tests/unit/test_common_utils.pysetrandom.seed(1234), create a name, and check that the next random number is unchanged. Both fail onmasterand pass with this change. All 300 tests in that file pass.blackandflake8are clean.pylintshows only warnings that were already there. I did not run the fulltoxsuite.Generated by AI tools, and reviewed by Mohamed Noordeen Alaudeen (@nursnaaz).
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.