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

Related to #2114: reformat docstrings in the 'metrics' folder #2221

Merged
merged 5 commits into from
Sep 28, 2021
Merged

Related to #2114: reformat docstrings in the 'metrics' folder #2221

merged 5 commits into from
Sep 28, 2021

Conversation

toxa23
Copy link
Contributor

@toxa23 toxa23 commented Sep 25, 2021

Related to #2114

Description:
part 6 of 7, reformat docstrings in the 'metrics' folder, make sure all examples have "Examples:" header, move "Args:" block to the top of method documentation

Check list:

  • New tests are added (if a new feature is added)
  • New doc strings: description and/or example code are in RST format
  • Documentation is updated (if required)

@github-actions github-actions bot added the module: metrics Metrics module label Sep 25, 2021
@toxa23 toxa23 changed the title fix #2114: reformat docstrings in the 'metrics' folder Related to #2114: reformat docstrings in the 'metrics' folder Sep 27, 2021
@KickItLikeShika
Copy link
Contributor

KickItLikeShika commented Sep 28, 2021

There is an error with code formatting, we use flake8, black, and isort, please check the formatting part in our contribution guide.
The error is related to flake8 and the length of the lines

Copy link
Contributor

@KickItLikeShika KickItLikeShika left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR, Anton! I left a comment.

@@ -105,18 +105,7 @@ class Accuracy(_BaseClassification):
- `y` and `y_pred` must be in the following shape of (batch_size, num_categories, ...) and
num_categories must be greater than 1 for multilabel cases.

In binary and multilabel cases, the elements of `y` and `y_pred` should have 0 or 1 values. Thresholding of
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't agree with splitting this part, this line and the example should stay close IMO, what do you think @vfdev-5?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @KickItLikeShika , yes, I agree with your comment. @toxa23 let's not split this part

Copy link
Contributor

@KickItLikeShika KickItLikeShika left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks, Anton!

@sdesrozis sdesrozis merged commit ee81fa6 into pytorch:master Sep 28, 2021
@toxa23 toxa23 deleted the fix-2114-reformat-metrics branch September 28, 2021 17:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module: metrics Metrics module
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants