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
Docs/update 20 12 #1018
Docs/update 20 12 #1018
Conversation
catalyst/callbacks/metrics/dice.py
Outdated
# """ | ||
# Global Multi-Class Dice Metric Callback: calculates the exact | ||
# dice score across multiple batches. This callback is good for getting | ||
# the dice score with small batch sizes where the batchwise dice is noisier. |
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 🐶
E501 line too long (80 > 79 characters)
catalyst/callbacks/metrics/dice.py
Outdated
# """ | ||
# Global Multi-Class Dice Metric Callback: calculates the exact | ||
# dice score across multiple batches. This callback is good for getting | ||
# the dice score with small batch sizes where the batchwise dice is noisier. |
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 🐶
W505 doc line too long (80 > 79 characters)
catalyst/callbacks/metrics/dice.py
Outdated
# ): | ||
# continue | ||
# postfix = ( | ||
# self.class_names[i] if self.class_names is not None else str(i) |
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 🐶
E501 line too long (81 > 79 characters)
catalyst/callbacks/metrics/dice.py
Outdated
# ): | ||
# continue | ||
# postfix = ( | ||
# self.class_names[i] if self.class_names is not None else str(i) |
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 🐶
W505 doc line too long (81 > 79 characters)
): | ||
"""Computes the dice metric. | ||
) -> float: | ||
"""Computes the dice score. |
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
This pull request is now in conflicts. @Scitator, could you fix it? 🙏 |
from catalyst.utils.torch import get_activation_fn | ||
|
||
|
||
# @TODO: make it work in "per class" mode | ||
def dice( |
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 🐶
E302 expected 2 blank lines, found 1
): | ||
"""Computes the dice metric. | ||
) -> float: | ||
"""Computes the dice score. |
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
catalyst/metrics/functional.py
Outdated
@@ -386,6 +388,19 @@ def check_consistent_length(*tensors): | |||
raise ValueError("Inconsistent numbers of samples") | |||
|
|||
|
|||
def wrap_fn_output_with_activation( |
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
@@ -386,6 +388,21 @@ def check_consistent_length(*tensors): | |||
raise ValueError("Inconsistent numbers of samples") | |||
|
|||
|
|||
def wrap_metric_fn_with_activation( |
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/callbacks/metrics/auc.py
Outdated
@@ -3,21 +3,22 @@ | |||
from catalyst.callbacks.metric import LoaderMetricCallback | |||
from catalyst.metrics.auc import auc | |||
from catalyst.metrics.functional import wrap_class_metric2dict |
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 🐶
I001 isort found an import in the wrong position
catalyst/callbacks/metrics/auc.py
Outdated
@@ -3,21 +3,22 @@ | |||
from catalyst.callbacks.metric import LoaderMetricCallback | |||
from catalyst.metrics.auc import auc | |||
from catalyst.metrics.functional import wrap_class_metric2dict | |||
from catalyst.metrics.functional import wrap_metric_fn_with_activation |
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 🐶
I001 isort found an import in the wrong position
@@ -29,29 +38,16 @@ def __init__( | |||
self.cross_entropy_loss = nn.CrossEntropyLoss( | |||
ignore_index=self.ignore_index | |||
) | |||
metric_fn = partial(_perplexity_metric, criterion=self.cross_entropy_loss) |
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 🐶
E501 line too long (82 > 79 characters)
Before submitting
catalyst-make-codestyle && catalyst-check-codestyle
(pip install -U catalyst-codestyle
).make check-docs
?pytest .
?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.
PS