-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
[air] Don't set rank-specific local directories for Train workers #38007
Conversation
Signed-off-by: Justin Yu <justinvyu@anyscale.com>
Signed-off-by: Justin Yu <justinvyu@anyscale.com>
Signed-off-by: Justin Yu <justinvyu@anyscale.com>
Signed-off-by: Justin Yu <justinvyu@anyscale.com>
# Change the working directory to the local trial directory. | ||
# -> All workers on the same node share a working directory. | ||
os.makedirs(storage.trial_local_path, exist_ok=True) | ||
os.chdir(storage.trial_local_path) |
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.
Note: Ray actors don't inherit the working directory of their parent. Even though the Trainable actor changes its directory by default to the trial dir, the worker actor still starts at the original working dir.
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.
Thank you Justin! It looks good to me. I love this change and it would resolve many inconsistency issues for lightning/deepspeed.
…y-project#38007) Signed-off-by: NripeshN <nn2012@hw.ac.uk>
…y-project#38007) Signed-off-by: harborn <gangsheng.wu@intel.com>
…y-project#38007) Signed-off-by: e428265 <arvind.chandramouli@lmco.com>
…y-project#38007) Signed-off-by: Victor <vctr.y.m@example.com>
Why are these changes needed?
This PR is based on the REP here: ray-project/enhancements#35
We don't want to force train workers to have separated working directories (
rank_x
). Instead, this can be configured by the user themselves.This auto
chdir
behavior led to issues in the past, where certain frameworks expect a common working directory for each worker (#35894).Related issue number
Checks
git commit -s
) in this PR.scripts/format.sh
to lint the changes in this PR.method in Tune, I've added it in
doc/source/tune/api/
under thecorresponding
.rst
file.