Fix mypy error about pytorch_distributed.py in Checks (integration)#4281
Merged
toshihikoyanase merged 1 commit intooptuna:masterfrom Jan 16, 2023
Conversation
Codecov Report
@@ Coverage Diff @@
## master #4281 +/- ##
==========================================
+ Coverage 89.76% 89.78% +0.01%
==========================================
Files 170 170
Lines 13261 13262 +1
==========================================
+ Hits 11904 11907 +3
+ Misses 1357 1355 -2
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
pytorch_distributed.py in Checks (integration)
Contributor
|
This pull request has not seen any recent activity. |
Member
|
@toshihikoyanase @cross32768 Could you review this PR? |
cross32768
approved these changes
Jan 5, 2023
Contributor
cross32768
left a comment
There was a problem hiding this comment.
LGTM! I confirmed that 6 errors are appeared in master branch as shown below, and this PR resolves all.
optuna/integration/pytorch_distributed.py:37: error: Name "torch.distributed.ProcessGroup" is not defined [name-defined]
optuna/integration/pytorch_distributed.py:117: error: Name "torch.distributed.ProcessGroup" is not defined [name-defined]
optuna/integration/pytorch_distributed.py:122: error: Name "torch.distributed.ProcessGroup" is not defined [name-defined]
optuna/integration/pytorch_distributed.py:127: error: Name "torch.distributed.ProcessGroup" is not defined [name-defined]
optuna/integration/pytorch_distributed.py:128: error: Call to untyped function "get_backend" in typed context [no-untyped-call]
optuna/integration/pytorch_distributed.py:129: error: Name "torch.distributed.ProcessGroup" is not defined [name-defined]
Contributor
|
This pull request has not seen any recent activity. |
Contributor
Author
|
Thank you for your approval. @cross32768 |
toshihikoyanase
approved these changes
Jan 16, 2023
Member
toshihikoyanase
left a comment
There was a problem hiding this comment.
I'm sorry for the delayed response. I confirmed that the errors were resolved by this PR on my local PC. Thank you!
pytorch_distributed.py in Checks (integration)pytorch_distributed.py in Checks (integration)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Solve scheduled Checks (Integration) failure
Description of the changes
Currently, scheduled Checks (Integration) fails die to mypy check with
--warn-unused-ignoresoption. This PR removes a part of the cause related topytorch_distributed.py.Although test for Checks (Integration) does't run when PR in opened, I confirmed this PR together with other "Fix mypy error" series reduces mypy error at CI on my fork.