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

initialize distributed group before logging #387

Merged
merged 1 commit into from
Dec 1, 2023
Merged

Conversation

epwalsh
Copy link
Member

@epwalsh epwalsh commented Nov 30, 2023

Recent changes to our torch_utils messed up how we configure logging in a distributed-aware way. As a result every rank was logging on LUMI. To fix that we just need to initialize the distributed process group before configuring logging.

Copy link
Contributor

@2015aroras 2015aroras left a comment

Choose a reason for hiding this comment

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

This explains why I was suddenly seeing so many duplicate logs!

@@ -46,9 +46,9 @@ def main(cfg: TrainConfig) -> None:
"setting has no effect."
)

# Initialize process group and set device.
dist.init_process_group(backend="nccl")
barrier()
Copy link
Contributor

Choose a reason for hiding this comment

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

Should you also move the barrier()?

Copy link
Member Author

Choose a reason for hiding this comment

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

The placement of this barrier is pretty arbitrary, so I think it's fine to keep here.

@epwalsh epwalsh merged commit d1c185b into main Dec 1, 2023
10 checks passed
@epwalsh epwalsh deleted the epwalsh/dist-init branch December 1, 2023 00:18
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

2 participants