Skip to content

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.

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

Closing this PR, as it is identical to #16978. I think that means I have too many open PRs, and any help in reviewing them would be appreciated.

@Lunderberg Lunderberg closed this May 13, 2024
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.

1 participant