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

Recompute SDR in float64 type if float32 gives NaN or Inf #899

Merged
merged 16 commits into from
Mar 23, 2022
Merged

Recompute SDR in float64 type if float32 gives NaN or Inf #899

merged 16 commits into from
Mar 23, 2022

Conversation

quancs
Copy link
Member

@quancs quancs commented Mar 22, 2022

What does this PR do?

Fixes #895

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 🙃

@codecov
Copy link

codecov bot commented Mar 22, 2022

Codecov Report

Merging #899 (e34d5fb) into master (9606515) will increase coverage by 0%.
The diff coverage is 100%.

@@          Coverage Diff          @@
##           master   #899   +/-   ##
=====================================
  Coverage      95%    95%           
=====================================
  Files         173    173           
  Lines        7237   7241    +4     
=====================================
+ Hits         6857   6878   +21     
+ Misses        380    363   -17     

@quancs quancs changed the title Recompute SDR float64 type if float32 gives NaN or Inf Recompute SDR in float64 type if float32 gives NaN or Inf Mar 22, 2022
Copy link
Member

@Borda Borda left a comment

Choose a reason for hiding this comment

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

can we add a test for this case...

@quancs
Copy link
Member Author

quancs commented Mar 22, 2022

can we add a test for this case...

OK

torchmetrics/functional/audio/sdr.py Outdated Show resolved Hide resolved
tests/audio/test_sdr.py Outdated Show resolved Hide resolved
tests/audio/test_sdr.py Outdated Show resolved Hide resolved
@Borda Borda added the bug / fix Something isn't working label Mar 22, 2022
tests/audio/test_sdr.py Outdated Show resolved Hide resolved
@Borda Borda added this to the v0.7 milestone Mar 22, 2022
@justusschock
Copy link
Member

As discussed offline with @Borda , the audio examples will be moved to s3 to remove them from git.

quancs and others added 4 commits March 22, 2022 19:24
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
@Borda Borda requested review from SkafteNicki and Borda March 22, 2022 15:19
@mergify mergify bot added the ready label Mar 22, 2022
@Borda Borda merged commit 61ea070 into Lightning-AI:master Mar 23, 2022
Borda pushed a commit that referenced this pull request Mar 23, 2022
* fixing issue
* add test for issue 895
* Apply suggestions from code review
* data

Co-authored-by: quancs <quancs@qq.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Nicki Skafte Detlefsen <skaftenicki@gmail.com>
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
Co-authored-by: Jirka <jirka.borovec@seznam.cz>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
(cherry picked from commit 61ea070)
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.

The sdr metric in TM sometime gives NaN for some input
4 participants