-
-
Notifications
You must be signed in to change notification settings - Fork 44
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
Add support for pylint #119
Open
justinchuby
wants to merge
5
commits into
reviewdog:master
Choose a base branch
from
justinchuby:patch-1
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
************* Module torch.nn.functional | ||
pytorch/torch/nn/functional.py:874:4: W0622: Redefining built-in 'input' (redefined-builtin) | ||
pytorch/torch/nn/functional.py:878:4: C0200: Consider using enumerate instead of iterating with range and len (consider-using-enumerate) | ||
pytorch/torch/nn/functional.py:878:8: C0103: Variable name "d" doesn't conform to snake_case naming style (invalid-name) | ||
pytorch/torch/nn/functional.py:887:16: C0209: Formatting a regular string which could be a f-string (consider-using-f-string) | ||
pytorch/torch/nn/functional.py:892:12: C0103: Variable name "d" doesn't conform to snake_case naming style (invalid-name) | ||
pytorch/torch/nn/functional.py:897:20: C0209: Formatting a regular string which could be a f-string (consider-using-f-string) | ||
pytorch/torch/nn/functional.py:907:4: W0622: Redefining built-in 'input' (redefined-builtin) | ||
pytorch/torch/nn/functional.py:906:0: R0913: Too many arguments (6/5) (too-many-arguments) | ||
pytorch/torch/nn/functional.py:939:11: I1101: Module 'torch._C' has no '_nn' member, but source is unavailable. Consider adding this module to extension-pkg-allow-list if you want to perform analysis based on run-time introspection of living objects. (c-extension-no-member) | ||
pytorch/torch/nn/functional.py:939:11: W0212: Access to a protected member _nn of a client class (protected-access) | ||
pytorch/torch/nn/functional.py:939:11: W0212: Access to a protected member _C of a client class (protected-access) | ||
pytorch/torch/nn/functional.py:943:4: W0622: Redefining built-in 'input' (redefined-builtin) | ||
pytorch/torch/nn/functional.py:942:0: R0913: Too many arguments (6/5) (too-many-arguments) | ||
pytorch/torch/nn/functional.py:971:11: I1101: Module 'torch._C' has no '_nn' member, but source is unavailable. Consider adding this module to extension-pkg-allow-list if you want to perform analysis based on run-time introspection of living objects. (c-extension-no-member) | ||
pytorch/torch/nn/functional.py:971:11: W0212: Access to a protected member _nn of a client class (protected-access) | ||
pytorch/torch/nn/functional.py:971:11: W0212: Access to a protected member _C of a client class (protected-access) | ||
pytorch/torch/nn/functional.py:975:4: W0622: Redefining built-in 'input' (redefined-builtin) | ||
pytorch/torch/nn/functional.py:974:0: R0913: Too many arguments (6/5) (too-many-arguments) | ||
pytorch/torch/nn/modules/fold.py:1:0: R0801: Similar lines in 2 files | ||
==torch.nn.intrinsic.qat.modules.conv_fused:[53:75] | ||
==torch.nn.intrinsic.qat.modules.linear_fused:[44:66] | ||
else: | ||
self.register_parameter('bias', None) | ||
self.reset_bn_parameters() | ||
|
||
# this needs to be called after reset_bn_parameters, | ||
# as they modify the same state | ||
if self.training: | ||
if freeze_bn: | ||
self.freeze_bn_stats() | ||
else: | ||
self.update_bn_stats() | ||
else: | ||
self.freeze_bn_stats() | ||
|
||
def reset_running_stats(self): | ||
self.bn.reset_running_stats() | ||
|
||
def reset_bn_parameters(self): | ||
self.bn.reset_running_stats() | ||
init.uniform_(self.bn.weight) | ||
init.zeros_(self.bn.bias) | ||
# note: below is actully for conv, not BN (duplicate-code) |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
|| ************* Module torch.nn.functional | ||
pytorch/torch/nn/functional.py|874 col 4| W0622: Redefining built-in 'input' (redefined-builtin) | ||
pytorch/torch/nn/functional.py|878 col 4| C0200: Consider using enumerate instead of iterating with range and len (consider-using-enumerate) | ||
pytorch/torch/nn/functional.py|878 col 8| C0103: Variable name "d" doesn't conform to snake_case naming style (invalid-name) | ||
pytorch/torch/nn/functional.py|887 col 16| C0209: Formatting a regular string which could be a f-string (consider-using-f-string) | ||
pytorch/torch/nn/functional.py|892 col 12| C0103: Variable name "d" doesn't conform to snake_case naming style (invalid-name) | ||
pytorch/torch/nn/functional.py|897 col 20| C0209: Formatting a regular string which could be a f-string (consider-using-f-string) | ||
pytorch/torch/nn/functional.py|907 col 4| W0622: Redefining built-in 'input' (redefined-builtin) | ||
pytorch/torch/nn/functional.py|906| R0913: Too many arguments (6/5) (too-many-arguments) | ||
pytorch/torch/nn/functional.py|939 col 11| I1101: Module 'torch._C' has no '_nn' member, but source is unavailable. Consider adding this module to extension-pkg-allow-list if you want to perform analysis based on run-time introspection of living objects. (c-extension-no-member) | ||
pytorch/torch/nn/functional.py|939 col 11| W0212: Access to a protected member _nn of a client class (protected-access) | ||
pytorch/torch/nn/functional.py|939 col 11| W0212: Access to a protected member _C of a client class (protected-access) | ||
pytorch/torch/nn/functional.py|943 col 4| W0622: Redefining built-in 'input' (redefined-builtin) | ||
pytorch/torch/nn/functional.py|942| R0913: Too many arguments (6/5) (too-many-arguments) | ||
pytorch/torch/nn/functional.py|971 col 11| I1101: Module 'torch._C' has no '_nn' member, but source is unavailable. Consider adding this module to extension-pkg-allow-list if you want to perform analysis based on run-time introspection of living objects. (c-extension-no-member) | ||
pytorch/torch/nn/functional.py|971 col 11| W0212: Access to a protected member _nn of a client class (protected-access) | ||
pytorch/torch/nn/functional.py|971 col 11| W0212: Access to a protected member _C of a client class (protected-access) | ||
pytorch/torch/nn/functional.py|975 col 4| W0622: Redefining built-in 'input' (redefined-builtin) | ||
pytorch/torch/nn/functional.py|974| R0913: Too many arguments (6/5) (too-many-arguments) | ||
pytorch/torch/nn/modules/fold.py|1| R0801: Similar lines in 2 files | ||
|| ==torch.nn.intrinsic.qat.modules.conv_fused:[53:75] | ||
|| ==torch.nn.intrinsic.qat.modules.linear_fused:[44:66] | ||
|| else: | ||
|| self.register_parameter('bias', None) | ||
|| self.reset_bn_parameters() | ||
|| | ||
|| # this needs to be called after reset_bn_parameters, | ||
|| # as they modify the same state | ||
|| if self.training: | ||
|| if freeze_bn: | ||
|| self.freeze_bn_stats() | ||
|| else: | ||
|| self.update_bn_stats() | ||
|| else: | ||
|| self.freeze_bn_stats() | ||
|| | ||
|| def reset_running_stats(self): | ||
|| self.bn.reset_running_stats() | ||
|| | ||
|| def reset_bn_parameters(self): | ||
|| self.bn.reset_running_stats() | ||
|| init.uniform_(self.bn.weight) | ||
|| init.zeros_(self.bn.bias) | ||
|| # note: below is actully for conv, not BN (duplicate-code) |
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.
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.
Shouldn't we include the bellow lines?
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.
I wasn’t sure what the matching format should be to fit it. Any suggestions?