Skip to content
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

Merged
merged 8 commits into from Sep 29, 2020
Merged

a few fixes #947

merged 8 commits into from Sep 29, 2020

Conversation

Scitator
Copy link
Member

Before submitting

  • Was this discussed/approved via a Github issue? (no need for typos and docs improvements)
  • Did you read the contribution guide?
  • Did you check the code style? catalyst-make-codestyle && catalyst-check-codestyle (pip install -U catalyst-codestyle).
  • Did you make sure to update the docs? We use Google format for all the methods and classes.
  • Did you check the docs with make check-docs?
  • Did you write any new necessary tests?
  • Did you add your new functionality to the docs?
  • Did you update the CHANGELOG?
  • You can use 'Login as guest' to see Teamcity build logs.

Description

Related Issue

Type of Change

  • Examples / docs / tutorials / contributors update
  • Bug fix (non-breaking change which fixes an issue)
  • Improvement (non-breaking change which improves an existing feature)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to 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.

"""@TODO: Docs. Contribution is welcome."""
"""
Specifies used metric function.
"""
pass
Copy link
Member

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?

Copy link
Member Author

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

"""@TODO: Docs. Contribution is welcome."""
"""
Args:
prefix (str): key prefix to store computed
Copy link
Member

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?

Comment on lines 12 to 13
"""Accuracy metric callback.
"""
Accuracy metric callback.
Copy link
Member

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?


def __init__(self, **kwargs):
"""@TODO: Docs. Contribution is welcome."""
"""ILoaderMetricCallback init.

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

@@ -171,7 +227,19 @@ def __init__(
multiplier: float = 1.0,
**metric_kwargs,
):
"""@TODO: Docs. Contribution is welcome."""
"""BatchMetricCallback init.

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

@@ -199,7 +267,19 @@ def __init__(
multiplier: float = 1.0,
**metric_kwargs,
):
"""@TODO: Docs. Contribution is welcome."""
"""LoaderMetricCallback init.

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

@@ -329,15 +419,22 @@ class MetricManagerCallback(Callback):
"""

def __init__(self):
"""@TODO: Docs. Contribution is welcome."""
"""MetricManagerCallback init."""

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

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.

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

@Scitator Scitator merged commit 23307f6 into master Sep 29, 2020
@mergify mergify bot deleted the feature/fixes branch September 29, 2020 06:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants