We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
HorovodStrategy.teardown() may not complete gracefully if an exception is thrown before HorovodStrategy._exit_stack is set.
HorovodStrategy.teardown()
HorovodStrategy._exit_stack
def teardown(self) -> None: super().teardown() > self._exit_stack.__exit__(None, None, None) E AttributeError: 'NoneType' object has no attribute '__exit__' pytorch_lightning[/strategies/horovod.py:200](): AttributeError
Notice below that self._exit_stack isn't set until callback setup() hooks are called:
self._exit_stack
setup()
https://github.com/PyTorchLightning/pytorch-lightning/blob/58324b5197aef20eb7acb577f953c0fae7c2dc05/pytorch_lightning/strategies/horovod.py#L79-L84
Test to reproduce
If an exception is thrown in any callback setup() hook, the Horovod teardown should still proceed without error.
I'll be uploading a PR to address this bug shortly
cc @awaelchli
The text was updated successfully, but these errors were encountered:
teardown()
@speediedan Good that you found this, thanks for sending the PR!
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
🐛 Bug
HorovodStrategy.teardown()
may not complete gracefully if an exception is thrown beforeHorovodStrategy._exit_stack
is set.Notice below that
self._exit_stack
isn't set until callbacksetup()
hooks are called:https://github.com/PyTorchLightning/pytorch-lightning/blob/58324b5197aef20eb7acb577f953c0fae7c2dc05/pytorch_lightning/strategies/horovod.py#L79-L84
To Reproduce
Test to reproduce
Expected behavior
If an exception is thrown in any callback
setup()
hook, the Horovod teardown should still proceed without error.Environment
Additional context
I'll be uploading a PR to address this bug shortly
cc @awaelchli
The text was updated successfully, but these errors were encountered: