fix(checkpoint_inspector): allow empty --param-to-param-group-map-json - #4403
Merged
asolergi-nv merged 2 commits intoApr 24, 2026
Merged
Conversation
The `convert-torch-dist-to-fsdp-dtensor` subcommand unconditionally
`open()`s the value of `--param-to-param-group-map-json`. With the
default value `"{}"`, this raises `FileNotFoundError`, so the examples
in the module docstring (which do not pass this flag) cannot run.
- Change the default from `"{}"` to `None` and update the help text to
reflect that the value is a file path (matching the implementation).
- Skip loading when the flag is unset and fall back to an empty dict.
All downstream uses already short-circuit on an empty map.
DAISY-gh
marked this pull request as ready for review
April 21, 2026 01:30
wplf
self-requested a review
April 21, 2026 05:45
wplf
approved these changes
Apr 21, 2026
asolergi-nv
enabled auto-merge
April 23, 2026 14:08
Contributor
|
/ok to test 47eb225 |
Contributor
|
🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA/Megatron-LM/actions/runs/24870331675 |
yangbofun
pushed a commit
to xlm-research/Megatron-LM
that referenced
this pull request
May 22, 2026
NVIDIA#4403) Co-authored-by: Antoni-Joan Solergibert <asolergibert@nvidia.com>
yhgalaxy
pushed a commit
to yhgalaxy/Megatron-LM
that referenced
this pull request
Jun 17, 2026
NVIDIA#4403) Co-authored-by: Antoni-Joan Solergibert <asolergibert@nvidia.com> Signed-off-by: yhgalaxy <yhgalaxy@outlook.com>
jon-barker
pushed a commit
to jon-barker/Megatron-LM
that referenced
this pull request
Jul 10, 2026
NVIDIA#4403) Co-authored-by: Antoni-Joan Solergibert <asolergibert@nvidia.com> Signed-off-by: Jon Barker <jbarker@aws-cmh-slurm-1-vscode-02.cm.cluster>
terminator123
pushed a commit
to 021ai/Megatron-LM
that referenced
this pull request
Aug 3, 2026
NVIDIA#4403) Co-authored-by: Antoni-Joan Solergibert <asolergibert@nvidia.com>
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.
Fix
tools/checkpoint/checkpoint_inspector.py convert-torch-dist-to-fsdp-dtensorcrashes withFileNotFoundError: [Errno 2] No such file or directory: '{}'when--param-to-param-group-map-jsonis not provided — which is the case in every example shipped in the module docstring.Root cause: the option's default is the literal string
"{}"while the implementation callsopen(param_to_param_group_map_json, "r"), i.e. treats the value as a file path.Changes:
default="{}"→default=None; help text updated to reflect that the value is a file path.open()when the flag is unset; fall back to an empty dict. All downstream uses already short-circuit on an empty map.After this fix, the existing Qwen3.5-VL / generic SWiGLU examples in the docstring run without specifying the flag.