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
metrics update #897
metrics update #897
Conversation
Hello @Scitator! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:
Comment last updated at 2020-08-05 06:41:34 UTC |
catalyst/utils/metrics/dice.py
Outdated
""" | ||
epsilon = 1e-7 | ||
|
||
dice = (2 * true_positives + epsilon) / ( |
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 🐶
WPS442 Found outer scope names shadowing: dice
catalyst/utils/metrics/functional.py
Outdated
return result | ||
|
||
|
||
def wrap_topk_metric2dict(metric_fn, topk_args): |
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 🐶
D103 Missing docstring in public function
catalyst/utils/metrics/functional.py
Outdated
return topk_metric_with_dict_output | ||
|
||
|
||
def wrap_class_metric2dict(metric_fn, class_args): |
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 🐶
D103 Missing docstring in public function
catalyst/utils/metrics/auc.py
Outdated
@@ -0,0 +1,17 @@ | |||
from typing import Optional, Sequence, Union |
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 🐶
F401 'typing.Optional' imported but unused
catalyst/utils/metrics/auc.py
Outdated
@@ -0,0 +1,17 @@ | |||
from typing import Optional, Sequence, Union |
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 🐶
F401 'typing.Union' imported but unused
catalyst/utils/metrics/auc.py
Outdated
import torch | ||
|
||
|
||
def auc( |
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 🐶
D103 Missing docstring in public function
This pull request is now in conflicts. @Scitator, could you fix it? 🙏 |
catalyst/utils/metrics/auc.py
Outdated
@@ -0,0 +1,81 @@ | |||
from typing import Optional, Sequence, Union |
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 🐶
F401 'typing.Sequence' imported but unused
|
||
|
||
def auc(outputs: torch.Tensor, targets: torch.Tensor) -> torch.Tensor: | ||
""" |
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 🐶
D202 No blank lines allowed after function docstring
|
||
|
||
def auc(outputs: torch.Tensor, targets: torch.Tensor) -> torch.Tensor: | ||
""" |
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 🐶
D414 Section has no content
|
||
|
||
def auc(outputs: torch.Tensor, targets: torch.Tensor) -> torch.Tensor: | ||
""" |
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 🐶
DAR201 Missing "Returns" in Docstring: - return
This pull request is now in conflicts. @Scitator, could you fix it? 🙏 |
import torch | ||
|
||
|
||
def get_binary_statistics( |
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 🐶
WPS320 Found multi-line function type annotation
catalyst/metrics/functional.py
Outdated
|
||
def get_binary_statistics( | ||
predictions: torch.Tensor, targets: torch.Tensor | ||
) -> Tuple[ |
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 🐶
DAR201 Missing "Returns" in Docstring: - return
catalyst/metrics/functional.py
Outdated
|
||
def get_binary_statistics( | ||
predictions: torch.Tensor, targets: torch.Tensor | ||
) -> Tuple[ |
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 🐶
DAR002 Empty description: e (5, 5)
) -> Tuple[ | ||
torch.Tensor, torch.Tensor, torch.Tensor, torch.Tensor, torch.Tensor | ||
]: | ||
""" |
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 🐶
D414 Section has no content
Before submitting
catalyst-make-codestyle && catalyst-check-codestyle
(pip install -U catalyst-codestyle
).make check-docs
?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.