Skip to content

Create a DDPLoggingData and expose it to python interface#50622

Closed
zhaojuanmao wants to merge 5 commits intogh/zhaojuanmao/55/basefrom
gh/zhaojuanmao/55/head
Closed

Create a DDPLoggingData and expose it to python interface#50622
zhaojuanmao wants to merge 5 commits intogh/zhaojuanmao/55/basefrom
gh/zhaojuanmao/55/head

Conversation

@zhaojuanmao
Copy link
Copy Markdown
Contributor

@zhaojuanmao zhaojuanmao commented Jan 15, 2021

Stack from ghstack:

  1. Define a DDPLoggingData struct that is the placeholder for all the ddp related logging fields
  2. Put the DDPLoggingData struct in the C10 directory so that it can be easily imported by c10 and torch files
  3. Expose get_ddp_logging_data() method in python so that users can get the logging data and dump in their applications
  4. Unit test tested the logging data can be set and got as expected
  5. Follow up will add more logging fields such as perf stats, internal states, env variables and etc

Differential Revision: D25930527

1. Define a DDPLoggingData struct that is the placeholder for all the ddp related logging fields
2. Put the DDPLoggingData struct in the C10 directory so that it can be easily imported by c10 and torch files
3. Expose get_ddp_logging_data() method in python so that users can get the logging data and dump in their applications
4. Unit test tested the logging data can be set and got as expected
5. Follow up will add more logging fields such as perf stats, internal states, env variables and etc

Differential Revision: [D25930527](https://our.internmc.facebook.com/intern/diff/D25930527/)

[ghstack-poisoned]
@facebook-github-bot facebook-github-bot added cla signed oncall: distributed Add this issue/PR to distributed oncall triage queue labels Jan 15, 2021
zhaojuanmao added a commit that referenced this pull request Jan 15, 2021
1. Define a DDPLoggingData struct that is the placeholder for all the ddp related logging fields
2. Put the DDPLoggingData struct in the C10 directory so that it can be easily imported by c10 and torch files
3. Expose get_ddp_logging_data() method in python so that users can get the logging data and dump in their applications
4. Unit test tested the logging data can be set and got as expected
5. Follow up will add more logging fields such as perf stats, internal states, env variables and etc

Differential Revision: [D25930527](https://our.internmc.facebook.com/intern/diff/D25930527/)

ghstack-source-id: 119889265
Pull Request resolved: #50622
@zhaojuanmao zhaojuanmao requested a review from wayi1 January 15, 2021 22:34
@zhaojuanmao zhaojuanmao changed the title Create a DdpLogger and expose it to python interface Create a DDPLoggingData and expose it to python interface Jan 16, 2021
Comment thread torch/lib/c10d/reducer.hpp
Comment thread c10/util/Logging.h
Comment thread c10/util/Logging.h Outdated
Comment thread c10/util/Logging.h
Comment thread torch/lib/c10d/reducer.cpp
1. Define a DDPLoggingData struct that is the placeholder for all the ddp related logging fields
2. Put the DDPLoggingData struct in the C10 directory so that it can be easily imported by c10 and torch files
3. Expose get_ddp_logging_data() method in python so that users can get the logging data and dump in their applications
4. Unit test tested the logging data can be set and got as expected
5. Follow up will add more logging fields such as perf stats, internal states, env variables and etc

Differential Revision: [D25930527](https://our.internmc.facebook.com/intern/diff/D25930527/)

[ghstack-poisoned]
1. Define a DDPLoggingData struct that is the placeholder for all the ddp related logging fields
2. Put the DDPLoggingData struct in the C10 directory so that it can be easily imported by c10 and torch files
3. Expose get_ddp_logging_data() method in python so that users can get the logging data and dump in their applications
4. Unit test tested the logging data can be set and got as expected
5. Follow up will add more logging fields such as perf stats, internal states, env variables and etc

Differential Revision: [D25930527](https://our.internmc.facebook.com/intern/diff/D25930527/)

[ghstack-poisoned]
zhaojuanmao added a commit that referenced this pull request Jan 22, 2021
Pull Request resolved: #50622

1. Define a DDPLoggingData struct that is the placeholder for all the ddp related logging fields
2. Put the DDPLoggingData struct in the C10 directory so that it can be easily imported by c10 and torch files
3. Expose get_ddp_logging_data() method in python so that users can get the logging data and dump in their applications
4. Unit test tested the logging data can be set and got as expected
5. Follow up will add more logging fields such as perf stats, internal states, env variables and etc
ghstack-source-id: 120230992

Differential Revision: [D25930527](https://our.internmc.facebook.com/intern/diff/D25930527/)
1. Define a DDPLoggingData struct that is the placeholder for all the ddp related logging fields
2. Put the DDPLoggingData struct in the C10 directory so that it can be easily imported by c10 and torch files
3. Expose get_ddp_logging_data() method in python so that users can get the logging data and dump in their applications
4. Unit test tested the logging data can be set and got as expected
5. Follow up will add more logging fields such as perf stats, internal states, env variables and etc

Differential Revision: [D25930527](https://our.internmc.facebook.com/intern/diff/D25930527/)

[ghstack-poisoned]
zhaojuanmao added a commit that referenced this pull request Jan 23, 2021
Pull Request resolved: #50622

1. Define a DDPLoggingData struct that is the placeholder for all the ddp related logging fields
2. Put the DDPLoggingData struct in the C10 directory so that it can be easily imported by c10 and torch files
3. Expose get_ddp_logging_data() method in python so that users can get the logging data and dump in their applications
4. Unit test tested the logging data can be set and got as expected
5. Follow up will add more logging fields such as perf stats, internal states, env variables and etc
ghstack-source-id: 120246769

Differential Revision: [D25930527](https://our.internmc.facebook.com/intern/diff/D25930527/)
1. Define a DDPLoggingData struct that is the placeholder for all the ddp related logging fields
2. Put the DDPLoggingData struct in the C10 directory so that it can be easily imported by c10 and torch files
3. Expose get_ddp_logging_data() method in python so that users can get the logging data and dump in their applications
4. Unit test tested the logging data can be set and got as expected
5. Follow up will add more logging fields such as perf stats, internal states, env variables and etc

Differential Revision: [D25930527](https://our.internmc.facebook.com/intern/diff/D25930527/)

[ghstack-poisoned]
zhaojuanmao added a commit that referenced this pull request Jan 24, 2021
Pull Request resolved: #50622

1. Define a DDPLoggingData struct that is the placeholder for all the ddp related logging fields
2. Put the DDPLoggingData struct in the C10 directory so that it can be easily imported by c10 and torch files
3. Expose get_ddp_logging_data() method in python so that users can get the logging data and dump in their applications
4. Unit test tested the logging data can be set and got as expected
5. Follow up will add more logging fields such as perf stats, internal states, env variables and etc
ghstack-source-id: 120275870

Differential Revision: [D25930527](https://our.internmc.facebook.com/intern/diff/D25930527/)
@codecov
Copy link
Copy Markdown

codecov Bot commented Jan 25, 2021

Codecov Report

Merging #50622 (a72bdba) into gh/zhaojuanmao/55/base (57fb2c0) will decrease coverage by 0.00%.
The diff coverage is 73.46%.

@@                    Coverage Diff                     @@
##           gh/zhaojuanmao/55/base   #50622      +/-   ##
==========================================================
- Coverage                   81.00%   80.99%   -0.01%     
==========================================================
  Files                        1916     1916              
  Lines                      209532   209579      +47     
==========================================================
+ Hits                       169728   169750      +22     
- Misses                      39804    39829      +25     

@facebook-github-bot
Copy link
Copy Markdown
Contributor

This pull request has been merged in 250c711.

py::arg("comm_hook_type"));
py::arg("comm_hook_type"))
.def(
"_set_construction_logging_data",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nit, and a late comment: Is there any reason why we're doing this with a level of indirection rather than calling the method directly on the reducer?

laurentdupin pushed a commit to laurentdupin/pytorch that referenced this pull request Apr 24, 2026
)

Summary:
Pull Request resolved: pytorch#50622

1. Define a DDPLoggingData struct that is the placeholder for all the ddp related logging fields
2. Put the DDPLoggingData struct in the C10 directory so that it can be easily imported by c10 and torch files
3. Expose get_ddp_logging_data() method in python so that users can get the logging data and dump in their applications
4. Unit test tested the logging data can be set and got as expected
5. Follow up will add more logging fields such as perf stats, internal states, env variables and etc
ghstack-source-id: 120275870

Test Plan: unit tests

Reviewed By: SciPioneer

Differential Revision: D25930527

fbshipit-source-id: 290c200161019c58e28eed9a5a2a7a8153113f99
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla signed Merged oncall: distributed Add this issue/PR to distributed oncall triage queue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants