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

[Disco] Implement num_workers property for disco.Session #16978

Merged
merged 1 commit into from May 14, 2024

Conversation

Lunderberg
Copy link
Contributor

Prior to this commit, while the num_workers argument was provided to the disco.Session object, it could not be determined from an existing disco.Session object. As a result, functions that interacted with a multi-GPU setup frequently required separate num_workers and disco_session argument, which could erroneously be out-of-sync (e.g. passing the incorrect num_workers, or omitting the disco_session argument when num_workers>1).

To remove this class of errors, this commit adds a disco.Session.num_workers property. The separate num_workers argument is no longer necessary, as it can be determined from the disco.Session instance.

@masahi
Copy link
Member

masahi commented May 13, 2024

@Lunderberg Need to resolve the conflict.

Prior to this commit, while the `num_workers` argument was provided to
the `disco.Session` object, it could not be determined from an
existing `disco.Session` object.  As a result, functions that
interacted with a multi-GPU setup frequently required separate
`num_workers` and `disco_session` argument, which could erroneously be
out-of-sync (e.g. passing the incorrect `num_workers`, or omitting the
`disco_session` argument when `num_workers>1`).

To remove this class of errors, this commit adds a
`disco.Session.num_workers` property.  The separate `num_workers`
argument is no longer necessary, as it can be determined from the
`disco.Session` instance.
@Lunderberg
Copy link
Contributor Author

Thank you, and conflict resolved!

@Lunderberg Lunderberg merged commit 54c68d6 into apache:main May 14, 2024
18 checks passed
@Lunderberg Lunderberg deleted the disco_num_workers_property branch May 14, 2024 14:39
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