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

Raise exception for invalid kwargs in Metric base class #1427

Merged
merged 9 commits into from
Jan 12, 2023

Conversation

EPronovost
Copy link
Contributor

@EPronovost EPronovost commented Jan 4, 2023

What does this PR do?

Fixes #1426

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?

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 🙃

@EPronovost EPronovost changed the title Raise exception for invalid kwargs Raise exception for invalid kwargs in Metric base class Jan 4, 2023
src/torchmetrics/metric.py Outdated Show resolved Hide resolved
tests/unittests/bases/test_metric.py Outdated Show resolved Hide resolved
tests/unittests/bases/test_metric.py Outdated Show resolved Hide resolved
src/torchmetrics/metric.py Show resolved Hide resolved
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.

Fixed the integration.
The integration test had the exact problem mentioned in the issue.

@SkafteNicki SkafteNicki added the bug / fix Something isn't working label Jan 6, 2023
@SkafteNicki SkafteNicki added this to the v0.12 milestone Jan 6, 2023
@Borda Borda self-requested a review January 6, 2023 15:37
@Borda Borda enabled auto-merge (squash) January 9, 2023 07:37
@codecov
Copy link

codecov bot commented Jan 9, 2023

Codecov Report

Merging #1427 (3106fc3) into master (7b505ff) will increase coverage by 0%.
The diff coverage is 100%.

Additional details and impacted files
@@          Coverage Diff           @@
##           master   #1427   +/-   ##
======================================
  Coverage      90%     90%           
======================================
  Files         211     211           
  Lines       10846   10849    +3     
======================================
+ Hits         9716    9719    +3     
  Misses       1130    1130           

@mergify mergify bot added the ready label Jan 9, 2023
@Borda Borda merged commit 4f3cab9 into Lightning-AI:master Jan 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug / fix Something isn't working ready
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Metric base class does not check for extra kwargs
3 participants