-
-
Notifications
You must be signed in to change notification settings - Fork 387
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
Dev22 - DDP engines update #1399
Conversation
catalyst/callbacks/checkpoint.py
Outdated
try: | ||
unwrapped_model = runner.engine.unwrap_model(runner.model) | ||
unwrapped_model.load_state_dict(load_checkpoint(resume_logpath)) | ||
except: |
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.
[pep8] reported by reviewdog 🐶
B901 blind except: statement
catalyst/callbacks/checkpoint.py
Outdated
try: | ||
unwrapped_model = runner.engine.unwrap_model(runner.model) | ||
unwrapped_model.load_state_dict(load_checkpoint(resume_logpath)) | ||
except: |
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.
[pep8] reported by reviewdog 🐶
E722 do not use bare 'except'
catalyst/callbacks/checkpoint.py
Outdated
try: | ||
unwrapped_model = runner.engine.unwrap_model(runner.model) | ||
unwrapped_model.load_state_dict(load_checkpoint(resume_logpath)) | ||
except: |
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.
[pep8] reported by reviewdog 🐶
B001 Do not use bare except:
, it also catches unexpected events like memory errors, interrupts, system exit, and so on. Prefer except Exception:
. If you're sure what you're doing, be explicit and write except BaseException:
.
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
@@ -138,6 +145,9 @@ def spawn(fn: Callable, *args, **kwargs): | |||
world_size: int = 8 | |||
return xmp.spawn(fn, args=(world_size,), nprocs=world_size, start_method="fork") | |||
|
|||
def setup(self, local_rank: int, world_size: int): |
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.
[pep8] reported by reviewdog 🐶
D102 Missing docstring in public method
Pull Request FAQ
Description
Related Issue
Type of Change
PR review
Anyone in the community is free to review the PR once the tests have passed.
If we didn't discuss your PR in Github issues there's a high chance it will not be merged.
Checklist
latest
requirements? Please attach the notebook link.minimal
requirements? Please attach the notebook link.