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

Deactive SpearmanCorrcoef() call warning #27

Closed
melodiemonod opened this issue Apr 18, 2024 · 1 comment · Fixed by #41
Closed

Deactive SpearmanCorrcoef() call warning #27

melodiemonod opened this issue Apr 18, 2024 · 1 comment · Fixed by #41
Assignees
Labels
enhancement ✨ New feature or request
Milestone

Comments

@melodiemonod
Copy link
Collaborator

What's the best practice to remove this warning?

>>> from torchmetrics.regression import SpearmanCorrCoef
>>> n = 10
>>> x = torch.randn((n,))
>>> y = torch.randn((n,))
>>> corr = SpearmanCorrCoef()(x, y)
/home/monodme1/.conda/envs/rad-env/lib/python3.10/site-packages/torchmetrics/utilities/prints.py:43: UserWarning: Metric `SpearmanCorrcoef` will save all targets and predictions in the buffer. For large datasets, this may lead to large memory footprint.
  warnings.warn(*args, **kwargs)  # noqa: B028
@tcoroller tcoroller added this to the backlog milestone Apr 18, 2024
@kruscpe1
Copy link
Collaborator

This can be suppressed via the warnings package: https://docs.python.org/3/library/warnings.html

@kruscpe1 kruscpe1 added the enhancement ✨ New feature or request label Apr 24, 2024
@tcoroller tcoroller linked a pull request Jul 3, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement ✨ New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants