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

only global rank 0 can log tensorboard data; avoid multi gpu/node race for the log directory #296

Merged
merged 1 commit into from
Jul 21, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions deepspeed/pt/deepspeed_light.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,12 +144,12 @@ def __init__(self,
self._configure_with_arguments(args, mpu)
self._do_sanity_check()

self._init_distributed(dist_init_required)

self.sample_count = 0
if self.tensorboard_enabled():
if self.tensorboard_enabled() and self.global_rank == 0:
Copy link
Contributor

Choose a reason for hiding this comment

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

Perhaps initialize this to None on other ranks?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I was thinking about resolving it here but was not sure if it is used anywhere else or not.

self.summary_writer = self.get_summary_writer()

self._init_distributed(dist_init_required)

# Configure distributed model
self._configure_distributed_model(model)

Expand Down