fix: NVRx async compatibility and defer resiliency import - #4420
Conversation
|
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. |
|
/ok to test 9891c42 |
|
/ok to test e4de738 |
|
/ok to test eb2b9ea |
|
/claude review |
|
|
||
| def get_save_and_finalize_callbacks(writer, save_state_dict_ret) -> NVRxAsyncRequest: | ||
| def get_save_and_finalize_callbacks( | ||
| writer, save_state_dict_ret, async_strategy: str = "nvrx" |
There was a problem hiding this comment.
Bug: Every other default in this PR was changed from "nvrx" to "mcore" (fully_parallel.py, torch.py:_get_filesystem_reader, torch.py:load, serialization.py), but this one was missed. All current callers pass the argument explicitly so it's not broken today, but a future caller relying on the default would silently get the nvrx path — which may fail if nvidia-resiliency-ext isn't installed.
| writer, save_state_dict_ret, async_strategy: str = "nvrx" | |
| writer, save_state_dict_ret, async_strategy: str = "mcore" |
There was a problem hiding this comment.
Light review — one likely bug flagged inline (default value inconsistency on get_save_and_finalize_callbacks).
Test coverage: The new nvrx.py module adds has_nvrx_async_support() (with 8 symbol checks across 4 submodules) and make_nvrx_async_request(), but neither has direct unit tests. The only new test covers a single get_async_strategy error path. Consider adding tests for:
has_nvrx_async_support()returningFalsewhen individual symbols are missing (not just entire modules)make_nvrx_async_request()constructing requests correctly for both mcore and nvrxAsyncRequestclasses- The new
init_persistent_async_workersignature-checking logic inasync_utils.py
|
/ok to test 805473a |
|
🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA/Megatron-LM/actions/runs/24847833017 |
|
🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA/Megatron-LM/actions/runs/24850965249 |
|
🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA/Megatron-LM/actions/runs/24854872727 |
Co-authored-by: Dmytro Pykhtar <37850217+dimapihtar@users.noreply.github.com>
Co-authored-by: Dmytro Pykhtar <37850217+dimapihtar@users.noreply.github.com> Signed-off-by: yhgalaxy <yhgalaxy@outlook.com>
Co-authored-by: Dmytro Pykhtar <37850217+dimapihtar@users.noreply.github.com> Signed-off-by: Jon Barker <jbarker@aws-cmh-slurm-1-vscode-02.cm.cluster>
Co-authored-by: Dmytro Pykhtar <37850217+dimapihtar@users.noreply.github.com>
What does this PR do ?
This PR tightens Megatron’s NVRx async checkpoint integration and removes
unnecessary resiliency dependencies from non-NVRx paths.
Summary:
Validated with:
1c7f1a8ea60599a28835b0caf6353550a38d2db8
Contribution process
Pre-checks
Code review
Feel free to message or comment the @mcore-oncall to help accelerate your merge into main. The less complex your PR is, the faster it will be approved and merged!
All PRs start as draft. If you open a non-draft PR, it will be automatically converted to draft.
Step 1: Mark PR as "Ready for Review"
.github/CODEOWNERS.Final Review might get declined if these requirements are not fulfilled.
Step 2: Final Review
For PRs that change
megatron/core, once all expert reviewers have approved, theFinal Reviewlabel is applied automatically and final reviewers are assigned.For PRs outside
megatron/core, this step is skipped.Step 3: Approved
Once all required reviewers have approved, the
Approvedlabel is applied automatically.Merge
Any member of mcore-engineers will be able to merge your PR.
For MRs into `dev` branch
The proposed review process for `dev` branch is under active discussion.MRs are mergable after one approval by either
eharper@nvidia.comorzijiey@nvidia.com.