fix(dist-checkpointing): AUT-1599 restrict PG cache unpickling - #6702
Open
svcnemo-autobot wants to merge 5 commits into
Open
fix(dist-checkpointing): AUT-1599 restrict PG cache unpickling#6702svcnemo-autobot wants to merge 5 commits into
svcnemo-autobot wants to merge 5 commits into
Conversation
svcnvidia-nemo-ci
marked this pull request as draft
August 20, 2026 11:43
Contributor
|
This PR has been automatically converted to draft because all PRs must start as drafts. When you are ready for review, click Ready for Review to begin the review process. This will:
See the contribution guide for more details. |
Contributor
|
/ok to test 2addad1 |
Contributor
|
/ok to test 4046319 |
Contributor
|
/ok to test 2f96975 |
cuichenx
approved these changes
Aug 21, 2026
dimapihtar
requested changes
Aug 21, 2026
| # The cache contains only ShardDistribution, data-less ShardedTensor metadata, | ||
| # and primitive containers. Extend the project's restricted unpickler with | ||
| # exactly those globals instead of trusting the cache path with pickle.load. | ||
| _PG_DIST_CACHE_SAFE_CLASSES = frozenset( |
Contributor
There was a problem hiding this comment.
let's just extend existing frozen set for SafeUnpickler and then use SafeUnpickler(f).load()'. If it's not possible and we need a separate class here let's move _PG_DIST_CACHE_SAFE_CLASSES&_PgDistCacheUnpicklertomegatron.core.safe_globals` and import it from there.
Signed-off-by: svcnemo-autobot <svcnemo-autobot@nvidia.com>
Contributor
|
/ok to test 840607c |
Signed-off-by: svcnemo-autobot <svcnemo-autobot@nvidia.com>
Contributor
|
/ok to test 737063f |
Signed-off-by: svcnemo-autobot <svcnemo-autobot@nvidia.com>
Contributor
|
/ok to test 2fb227d |
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.
Background
PG distribution caches are trusted metadata, but unrestricted pickle loading permits arbitrary global resolution.
What changed
safe_globalsas requested.Details
The branch remains based on frozen MCore pin
731b791469004f8fdcb896e65d610d6b1b0ebb32.Tested
git diff --check