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
Added DistributedStrategy interface with support for DDP #2890
Conversation
for more information, see https://pre-commit.ci
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Strategy seems like a nice abstraction to add support for pytorch DDP
@@ -37,26 +37,28 @@ class HorovodBackend(LocalPreprocessingMixin, Backend): | |||
|
|||
def __init__(self, **kwargs): | |||
super().__init__(dataset_manager=PandasDatasetManager(self), **kwargs) | |||
self._horovod = None | |||
self._distributed = None |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should self._distributed
be an attribute of the Backend
class?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only for Horovod. In the case of Ray, we are not in the right context from the backend to have access to the distributed api.
for more information, see https://pre-commit.ci
Closes #2886.
Usage:
This will allow us to use PyTorch 2.0 model compilation with distributed training:
https://pytorch.org/get-started/pytorch-2.0/
Caveats: