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

Metric base class does not check for extra kwargs #1426

Closed
EPronovost opened this issue Jan 4, 2023 · 1 comment · Fixed by #1427
Closed

Metric base class does not check for extra kwargs #1426

EPronovost opened this issue Jan 4, 2023 · 1 comment · Fixed by #1427
Labels
bug / fix Something isn't working help wanted Extra attention is needed

Comments

@EPronovost
Copy link
Contributor

🐛 Bug

The Metric base class does not check for extra kwargs here.
Users can currently do something like torchmetrics.MeanMetric(foo=True) without issue.

To Reproduce

import torchmetrics
torchmetrics.MeanMetric(your_favorite_word="lightning")

Expected behavior

Raise an exception if invalid kwargs are passed

Environment

Latest TorchMetrics version. No other dependencies matter.

Additional context

Slack thread

@EPronovost EPronovost added bug / fix Something isn't working help wanted Extra attention is needed labels Jan 4, 2023
@github-actions
Copy link

github-actions bot commented Jan 4, 2023

Hi! thanks for your contribution!, great first issue!

Borda pushed a commit that referenced this issue Jan 12, 2023
Co-authored-by: Jirka Borovec <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Jirka <[email protected]>
Co-authored-by: Nicki Skafte Detlefsen <[email protected]>
Fixes #1426
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 help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant