-
Notifications
You must be signed in to change notification settings - Fork 22
fix(customizer): publish the HF tree DTensor V2 writes instead of converting it as DCP #1869
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
anubhutivyas
wants to merge
1
commit into
release/0.5
Choose a base branch
from
anubhutiv/bug-6740834
base: release/0.5
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win
🔎 Supported by static analysis
🌐 Web query:
For NeMo-RL version 0.6.0 with Automodel and checkpointing.save_consolidated=True, can config.json be written before the consolidated safetensors file or shard set is complete?💡 Result:
In NeMo-RL version 0.6.0, when checkpointing.save_consolidated is set to True, the system is designed to handle the creation of consolidated Hugging Face-compatible checkpoints, including the associated configuration files [1][2][3]. Based on the architectural patterns used in NeMo Automodel and NeMo-RL's checkpointing utilities, the saving process is typically orchestrated to ensure integrity [1][3]. The
config.json(and other metadata files likegeneration_config.jsonortokenizer_config.json) is generated as part of the consolidation process alongside the safetensors shards [3]. Technical implementations in NeMo typically use atomic write operations or sequential file system updates to ensure that the checkpoint directory structure—which includes the consolidated model folder—is valid [3]. While specific internal file-writing sequences can depend on the underlying storage backend and parallelization strategy (such as TP/PP ranks), NeMo-RL's checkpointing system manages the orchestration to ensure that the consolidated metadata and weights are consistent upon completion of the checkpoint save operation [3]. There is no standard behavior where the metadata (config.json) is intentionally exposed or marked as "complete" before the associated model shard files are successfully written [3].Citations:
🤖 get_repo_knowledge executed:
get_repo_knowledge NVIDIA-NeMo/nemo-platform /tmp/coderabbit-repo-knowledge/nvidia-nemo-nemo-platform-f69ed47d/conventions /tmp/coderabbit-repo-knowledge/nvidia-nemo-nemo-platform-f69ed47d/learningsLength of output: 18885
🏁 Script executed:
Repository: NVIDIA-NeMo/nemo-platform
Length of output: 28361
🏁 Script executed:
Repository: NVIDIA-NeMo/nemo-platform
Length of output: 32678
Require model weights before publishing a consolidated checkpoint.
find_consolidated_hf_root()accepts a directory with onlyconfig.json.process_checkpoint()then copies it and labels itCheckpointFormat.HF, even when model weights are missing. Require a safetensors file or an index whose referenced shards all exist. Add a config-only regression test.🤖 Prompt for AI Agents