-
Notifications
You must be signed in to change notification settings - Fork 706
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
fix nproc env in elastic mode for pytorchjob #1948
Conversation
Pull Request Test Coverage Report for Build 6921477150
💛 - Coveralls |
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.
/lgtm
Value: *pytorchjob.Spec.NprocPerNode, | ||
}) | ||
} | ||
|
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.
this change removes the necessity to add master spec to run multiple processes per pod using python/torchrun launch method without the elastic spec in the yaml, but doesn't solve #1947
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.
to solve #1947 I think we need to make changes here
if elasticPolicy.NProcPerNode != nil { |
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.
@deepanker13 elastic.go has env vars when elastic policy is set. As per the original issue, it works correctly when elasticPolicy.NProcPerNode
is set.
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.
@johnugeorge following this pr #1840 , I raised issue #1947 which when implemented should complete the point striked out in the below screenshot
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.
to solve #1947 I think we need to make changes here
if elasticPolicy.NProcPerNode != nil {
No. this part will be deprecated. We should touch the global one.
@kuizhiqing I am bit confused. How does this resolve the case where |
@johnugeorge It is correct if After this PR, |
Thanks @kuizhiqing for the explanation. /approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: johnugeorge, kuizhiqing The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What this PR does / why we need it:
In PyTorchJob elastic mode, nproc env may not be set.
Which issue(s) this PR fixes (optional, in
Fixes #<issue number>, #<issue number>, ...
format, will close the issue(s) when PR gets merged):Fixes # #1947
Checklist: