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

Refactor: typing #330

Merged
merged 29 commits into from
Jun 30, 2021
Merged

Refactor: typing #330

merged 29 commits into from
Jun 30, 2021

Conversation

Borda
Copy link
Member

@Borda Borda commented Jun 29, 2021

Before submitting

  • Was this discussed/approved via a Github issue? (no need for typos and docs improvements)
  • Did you read the contributor guideline, Pull Request section?
  • Did you make sure to update the docs?
  • Did you write any new necessary tests?

What does this PR do?

Fixes # (issue).

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.

Did you have fun?

Make sure you had fun coding 🙃

@Borda Borda added enhancement New feature or request refactoring refactoring and code health labels Jun 29, 2021
@codecov
Copy link

codecov bot commented Jun 29, 2021

Codecov Report

Merging #330 (9e1df81) into master (4f7928e) will decrease coverage by 0.04%.
The diff coverage is 93.51%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #330      +/-   ##
==========================================
- Coverage   96.59%   96.54%   -0.05%     
==========================================
  Files         111      111              
  Lines        3552     3559       +7     
==========================================
+ Hits         3431     3436       +5     
- Misses        121      123       +2     
Flag Coverage Δ
Linux 75.86% <79.62%> (+0.04%) ⬆️
Windows 75.86% <79.62%> (+0.04%) ⬆️
cpu 96.48% <93.51%> (-0.05%) ⬇️
gpu 96.45% <93.51%> (-0.05%) ⬇️
macOS 96.48% <93.51%> (-0.05%) ⬇️
pytest 96.54% <93.51%> (-0.05%) ⬇️
python3.6 95.61% <87.03%> (-0.05%) ⬇️
python3.8 96.48% <93.51%> (-0.05%) ⬇️
python3.9 96.37% <93.51%> (-0.05%) ⬇️
torch1.3.1 95.61% <87.03%> (-0.05%) ⬇️
torch1.4.0 95.70% <87.03%> (-0.05%) ⬇️
torch1.9.0 96.37% <93.51%> (-0.05%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...ics/functional/classification/average_precision.py 100.00% <ø> (ø)
torchmetrics/functional/classification/iou.py 100.00% <ø> (ø)
...etrics/functional/regression/explained_variance.py 100.00% <ø> (ø)
torchmetrics/functional/regression/pearson.py 96.00% <ø> (ø)
torchmetrics/regression/r2score.py 93.54% <ø> (ø)
torchmetrics/functional/classification/dice.py 92.59% <80.00%> (ø)
torchmetrics/functional/classification/auroc.py 85.50% <81.81%> (-1.06%) ⬇️
...unctional/classification/precision_recall_curve.py 90.66% <92.00%> (-0.77%) ⬇️
torchmetrics/functional/classification/roc.py 92.68% <93.10%> (-2.06%) ⬇️
torchmetrics/functional/classification/accuracy.py 94.28% <100.00%> (ø)
... and 13 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4f7928e...9e1df81. Read the comment docs.

@pep8speaks
Copy link

pep8speaks commented Jun 29, 2021

Hello @Borda! Thanks for updating this PR.

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

Comment last updated at 2021-06-30 07:27:56 UTC

@Borda Borda marked this pull request as ready for review June 29, 2021 16:24
@Borda
Copy link
Member Author

Borda commented Jun 29, 2021

@SkafteNicki @justusschock any idea why the differentiability tests are failing? Cannot reproduce it locally 😕

@Borda Borda requested a review from maximsch2 June 29, 2021 20:09
@Borda Borda enabled auto-merge (squash) June 29, 2021 22:31
Copy link
Member

@SkafteNicki SkafteNicki left a comment

Choose a reason for hiding this comment

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

Few commets, else LGTM :]

torchmetrics/functional/classification/dice.py Outdated Show resolved Hide resolved
@@ -40,7 +40,7 @@ def _explained_variance_compute(
sum_target: Tensor,
sum_squared_target: Tensor,
multioutput: str = "uniform_average",
) -> Union[Tensor, Sequence[Tensor]]:
) -> Tensor:
Copy link
Member

Choose a reason for hiding this comment

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

This does not seem correct to me. Even when setting multioutput='raw_values it is still a single tensor that is returned

Copy link
Member Author

Choose a reason for hiding this comment

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

we return the Tensor now or am I missing anything?

torchmetrics/functional/regression/pearson.py Outdated Show resolved Hide resolved
@Borda Borda disabled auto-merge June 30, 2021 07:25
@Borda Borda merged commit 2c528bd into master Jun 30, 2021
@Borda Borda deleted the refactor/typing branch June 30, 2021 08:16
@Borda Borda self-assigned this Jun 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request refactoring refactoring and code health
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants