Skip to content
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

[Train] Improve loggings for Train worker scheduling information #40536

Merged

Conversation

woshiyyya
Copy link
Member

@woshiyyya woshiyyya commented Oct 20, 2023

Why are these changes needed?

Currently, the placement and ranking information of distributed process groups in the log is unclear. Users must manually print out the world ranking, local ranking, and node IP. This PR improves log messages with more placement information to improve observability and debuggability.

Previous:

(TorchTrainer pid=7236) Starting distributed worker processes: ['7410 (10.0.59.242)', '7411 (10.0.59.242)', '7412 (10.0.59.242)', '7413 (10.0.59.242)', '3381 (10.0.12.174)', '3382 (10.0.12.174)', '3383 (10.0.12.174)', '3384 (10.0.12.174)']

Now:

(TorchTrainer pid=7236) Started distributed worker processes: 
(TorchTrainer pid=7236) - (ip=10.0.59.242, pid=7410) rank=0, local_rank=0, node_rank=0
(TorchTrainer pid=7236) - (ip=10.0.59.242, pid=7411) rank=1, local_rank=1, node_rank=0
(TorchTrainer pid=7236) - (ip=10.0.59.242, pid=7412) rank=2, local_rank=2, node_rank=0
(TorchTrainer pid=7236) - (ip=10.0.59.242, pid=7413) rank=3, local_rank=3, node_rank=0
(TorchTrainer pid=7236) - (ip=10.0.12.174, pid=3381) rank=4, local_rank=0, node_rank=1
(TorchTrainer pid=7236) - (ip=10.0.12.174, pid=3382) rank=5, local_rank=1, node_rank=1
(TorchTrainer pid=7236) - (ip=10.0.12.174, pid=3383) rank=6, local_rank=2, node_rank=1
(TorchTrainer pid=7236) - (ip=10.0.12.174, pid=3384) rank=7, local_rank=3, node_rank=1

Related issue number

Checks

  • I've signed off every commit(by using the -s flag, i.e., git commit -s) in this PR.
  • I've run scripts/format.sh to lint the changes in this PR.
  • I've included any doc changes needed for https://docs.ray.io/en/master/.
    • I've added any new APIs to the API Reference. For example, if I added a
      method in Tune, I've added it in doc/source/tune/api/ under the
      corresponding .rst file.
  • I've made sure the tests are passing. Note that there might be a few flaky tests, see the recent failures at https://flakey-tests.ray.io/
  • Testing Strategy
    • Unit tests
    • Release tests
    • This PR is not tested :(

Signed-off-by: woshiyyya <xiaoyunxuan1998@gmail.com>
Signed-off-by: woshiyyya <xiaoyunxuan1998@gmail.com>
Signed-off-by: woshiyyya <xiaoyunxuan1998@gmail.com>
@woshiyyya woshiyyya changed the title [Train] Improve logs for train worker placement location [Train] Improve loging messages for train worker placement location Oct 20, 2023
@woshiyyya woshiyyya changed the title [Train] Improve loging messages for train worker placement location [Train] Improve loggings for Train worker scheduling information Oct 20, 2023
@woshiyyya woshiyyya marked this pull request as ready for review October 20, 2023 21:21
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@scottsun94 can you leave your thoughts? Originally we wanted to keep it succinct but found that it is not sufficient for users to debug certain issues.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Since it only shows up once (unless there are location changes), it's fine to be a bit more verbose.

python/ray/train/_internal/backend_executor.py Outdated Show resolved Hide resolved
Co-authored-by: matthewdeng <matthew.j.deng@gmail.com>
Signed-off-by: Yunxuan Xiao <xiaoyunxuan1998@gmail.com>
@scottsun94
Copy link
Contributor

LGTM. Thanks!

Signed-off-by: woshiyyya <xiaoyunxuan1998@gmail.com>
@matthewdeng matthewdeng merged commit fe6d5f4 into ray-project:master Oct 25, 2023
30 of 39 checks passed
@rickyyx rickyyx mentioned this pull request Dec 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants