feat: make mesh accept meshcontext#2266
Open
adil-a wants to merge 14 commits into
Open
Conversation
Signed-off-by: Alexandros Koumparoulis <akoumparouli@nvidia.com>
Collaborator
Author
|
/ok to test 3dcadfb |
Signed-off-by: Alexandros Koumparoulis <akoumparouli@nvidia.com>
Contributor
|
/ok to test a8b2df6 |
Signed-off-by: Alexandros Koumparoulis <akoumparouli@nvidia.com>
Contributor
|
/ok to test a4876ae |
Contributor
|
/ok to test d836169 |
jgerh
reviewed
May 20, 2026
Contributor
jgerh
left a comment
There was a problem hiding this comment.
Completed tech pubs review of docs/guides/gradient-checkpointing.md. No changes needed. LGTM.
Contributor
|
/ok to test 010ddc8 |
Two leftover references to the old setup_distributed/dist_setup API were missed when the recipe was migrated to create_mesh_context_from_config: - nemo_automodel/recipes/vlm/finetune.py:794 still read self.dist_setup.cp_size, which would AttributeError on any PP+CP VLM run. - tests/unit_tests/recipes/test_finetune_vlm_cp_wiring.py monkeypatched the stale symbol "setup_distributed", causing three parametrizations of test_setup_skips_pp_media_prechunk_when_cp_preembeds_vlm_inputs to fail during pytest setup with AttributeError. Signed-off-by: Alexandros Koumparoulis <akoumparouli@nvidia.com>
Contributor
|
/ok to test e85de37 |
Signed-off-by: Alexandros Koumparoulis <akoumparouli@nvidia.com>
Contributor
|
/ok to test fd99484 |
Contributor
|
/ok to test 20415cf |
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.
What does this PR do ?
Refactors the distributed public API around
MeshContextso users can initialize distributed once, create a mesh context, and pass it directly toNeMoAutoModelForCausalLM.from_pretrained.Changelog
create_mesh_contextas the component-layer API that returns aMeshContext._dist_setup.setup_distributedto_dist_utils.create_mesh_context_from_config.NeMoAutoModel*, recipes, diffusion pipeline, docs, and tests to use mesh-context naming.Before your PR is "Ready for review"
Pre checks:
Validation:
uv run ruff format ...uv run ruff check --fix ...uv run pytest tests/unit_tests/distributed/test_mesh_utils.py tests/unit_tests/distributed/test_device_mesh.py tests/unit_tests/recipes/test_dist_utils.py tests/unit_tests/recipes/test_diffusion_train_metrics.py tests/unit_tests/_diffusers/test_auto_diffusion_pipeline.py -qNote: running the full
test_train_ft.pyandtest_finetune_vlm_helpers.pyfiles hit unrelated optionalcut_cross_entropyCUDA fused-CE failures in this environment.Additional Information
Related to distributed public API cleanup.