fix: reserve MOPD teacher clusters before Gym startup#3340
Open
yfw wants to merge 2 commits into
Open
Conversation
Reserve topology-aware teacher placement groups before Gym can consume their GPU resources. Defer teacher worker and model initialization until the policy is ready to avoid checkpoint conversion races. Signed-off-by: Yi-Fu Wu <yifu.wu@gmail.com>
Contributor
Author
|
/ok to test 23a0c72 |
create_teacher_worker_groups kept a 'teacher_clusters is None' fallback that reserved the clusters itself. That call runs after NeMo Gym startup, so the fallback silently reintroduced the late reservation this branch fixes, and it left segment_size / teacher_segment_topology reachable only through it. Make teacher_clusters a required keyword-only argument and drop the fallback along with the two now-dead parameters. The existing alias-mismatch check is now the sole guard on the reservation contract. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Signed-off-by: Yi-Fu Wu <yifu.wu@gmail.com>
Contributor
Author
|
/ok to test f39d43b |
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 ?
Summary
Reserve topology-aware MOPD teacher placement groups before NeMo Gym starts allocating GPU-backed services. Teacher workers and model loading remain deferred until policy initialization completes, avoiding checkpoint-conversion races.
Problem
Previously, teacher topology was planned before Gym startup, but the corresponding placement groups were not reserved until afterward. Gym could consume GPUs in those selected NVLink domains, leaving a teacher placement group permanently unschedulable despite sufficient cluster-wide capacity. This caused setup to time out after some teachers initialized successfully.
Fix
Split teacher setup into two phases:
This preserves topology-aware teacher placement while preventing Gym from taking the reserved resources.
Issues
List issues that this PR closes (syntax):
Usage
# Add a code snippet demonstrating how to use thisBefore your PR is "Ready for review"
Pre checks:
Additional Information