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

Docs/update 20 12 #1018

Merged
merged 27 commits into from Dec 9, 2020
Merged

Docs/update 20 12 #1018

merged 27 commits into from Dec 9, 2020

Conversation

Scitator
Copy link
Member

@Scitator Scitator commented Dec 3, 2020

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 check that your code passes the unit tests pytest . ?
  • Did you add your new functionality to the docs?
  • Did you update the CHANGELOG?

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.

PS

  • I know, that I could join slack for pull request discussion.

@pep8speaks
Copy link

pep8speaks commented Dec 4, 2020

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

There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻

Comment last updated at 2020-12-09 06:43:20 UTC

# """
# 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.
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 🐶
E501 line too long (80 > 79 characters)

# """
# 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.
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 🐶
W505 doc line too long (80 > 79 characters)

# ):
# continue
# postfix = (
# self.class_names[i] if self.class_names is not None else str(i)
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 🐶
E501 line too long (81 > 79 characters)

# ):
# continue
# postfix = (
# self.class_names[i] if self.class_names is not None else str(i)
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 🐶
W505 doc line too long (81 > 79 characters)

):
"""Computes the dice metric.
) -> float:
"""Computes the dice score.
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 🐶
D202 No blank lines allowed after function docstring

@mergify
Copy link

mergify bot commented Dec 4, 2020

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(
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 🐶
E302 expected 2 blank lines, found 1

):
"""Computes the dice metric.
) -> float:
"""Computes the dice score.
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 🐶
D202 No blank lines allowed after function docstring

@@ -386,6 +388,19 @@ def check_consistent_length(*tensors):
raise ValueError("Inconsistent numbers of samples")


def wrap_fn_output_with_activation(
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 🐶
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(
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 🐶
D103 Missing docstring in public function

@@ -3,21 +3,22 @@
from catalyst.callbacks.metric import LoaderMetricCallback
from catalyst.metrics.auc import auc
from catalyst.metrics.functional import wrap_class_metric2dict
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 🐶
I001 isort found an import in the wrong position

@@ -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
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 🐶
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)
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 🐶
E501 line too long (82 > 79 characters)

@Scitator Scitator merged commit b061b78 into master Dec 9, 2020
@mergify mergify bot deleted the docs/update-20-12 branch December 9, 2020 06:58
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