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
a few fixes #947
a few fixes #947
Conversation
"""@TODO: Docs. Contribution is welcome.""" | ||
""" | ||
Specifies used metric function. | ||
""" | ||
pass |
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.
maybe it is better to use raise NotImplementedError
?
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.
it's abstractmethod
, so there is no opportunity to create this class without metric_fn
reimplementation
catalyst/core/callbacks/metrics.py
Outdated
"""@TODO: Docs. Contribution is welcome.""" | ||
""" | ||
Args: | ||
prefix (str): key prefix to store computed |
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.
Types in type annotations and docstring are different
Maybe it is better not to include types of args in docstrings at all?
"""Accuracy metric callback. | ||
""" | ||
Accuracy metric callback. |
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.
by default docstrings have the following structure:
"""Short inline description.
Long-long-long
multi-line description
Args (and other blocks like Raises, Yields, Returns, Examples):
sub-items (with indent)
"""
Are we going to follow this structure or you proposing another one?
catalyst/core/callbacks/metrics.py
Outdated
|
||
def __init__(self, **kwargs): | ||
"""@TODO: Docs. Contribution is welcome.""" | ||
"""ILoaderMetricCallback init. |
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 🐶
D403 First word of the first line should be properly capitalized
catalyst/core/callbacks/metrics.py
Outdated
@@ -171,7 +227,19 @@ def __init__( | |||
multiplier: float = 1.0, | |||
**metric_kwargs, | |||
): | |||
"""@TODO: Docs. Contribution is welcome.""" | |||
"""BatchMetricCallback init. |
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 🐶
D403 First word of the first line should be properly capitalized
catalyst/core/callbacks/metrics.py
Outdated
@@ -199,7 +267,19 @@ def __init__( | |||
multiplier: float = 1.0, | |||
**metric_kwargs, | |||
): | |||
"""@TODO: Docs. Contribution is welcome.""" | |||
"""LoaderMetricCallback init. |
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 🐶
D403 First word of the first line should be properly capitalized
catalyst/core/callbacks/metrics.py
Outdated
@@ -329,15 +419,22 @@ class MetricManagerCallback(Callback): | |||
""" | |||
|
|||
def __init__(self): | |||
"""@TODO: Docs. Contribution is welcome.""" | |||
"""MetricManagerCallback init.""" |
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 🐶
D403 First word of the first line should be properly capitalized
catalyst/core/callbacks/metrics.py
Outdated
super().__init__( | ||
order=CallbackOrder.logging - 1, node=CallbackNode.all, | ||
) | ||
self.meters: Dict[str, meters.AverageValueMeter] = None | ||
|
||
@staticmethod | ||
def to_single_value(value: Any) -> float: | ||
"""@TODO: Docs. Contribution is welcome.""" | ||
""" Convert any value to float. |
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 🐶
D210 No whitespaces allowed surrounding docstring text
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.