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

metrics update #897

Merged
merged 12 commits into from Aug 5, 2020
Merged

metrics update #897

merged 12 commits into from Aug 5, 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.

@Scitator Scitator requested a review from bagxi as a code owner July 27, 2020 06:51
@pep8speaks
Copy link

pep8speaks commented Jul 27, 2020

Hello @Scitator! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

Line 322:53: E231 missing whitespace after ','

Comment last updated at 2020-08-05 06:41:34 UTC

"""
epsilon = 1e-7

dice = (2 * true_positives + epsilon) / (

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

return result


def wrap_topk_metric2dict(metric_fn, topk_args):

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

return topk_metric_with_dict_output


def wrap_class_metric2dict(metric_fn, class_args):

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

@@ -0,0 +1,17 @@
from typing import Optional, Sequence, Union

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

@@ -0,0 +1,17 @@
from typing import Optional, Sequence, Union

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

import torch


def auc(

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

@mergify
Copy link

mergify bot commented Jul 28, 2020

This pull request is now in conflicts. @Scitator, could you fix it? 🙏

@@ -0,0 +1,81 @@
from typing import Optional, Sequence, Union

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:
"""

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:
"""

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:
"""

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

@mergify
Copy link

mergify bot commented Aug 2, 2020

This pull request is now in conflicts. @Scitator, could you fix it? 🙏

import torch


def get_binary_statistics(
Copy link

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


def get_binary_statistics(
predictions: torch.Tensor, targets: torch.Tensor
) -> Tuple[
Copy link

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


def get_binary_statistics(
predictions: torch.Tensor, targets: torch.Tensor
) -> Tuple[
Copy link

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
]:
"""
Copy link

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

@Scitator Scitator merged commit 73b4bb4 into master Aug 5, 2020
@mergify mergify bot deleted the feature/metrics-update-2 branch August 5, 2020 07:04
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