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

audio metrics: SNR, SI_SDR, SI_SNR #292

Merged
merged 126 commits into from
Jun 22, 2021
Merged

audio metrics: SNR, SI_SDR, SI_SNR #292

merged 126 commits into from
Jun 22, 2021

Conversation

quancs
Copy link
Member

@quancs quancs commented Jun 13, 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 #291

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 🙃

@pep8speaks
Copy link

pep8speaks commented Jun 13, 2021

Hello @quancs! Thanks for updating this PR.

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

Comment last updated at 2021-06-22 17:06:58 UTC

@codecov
Copy link

codecov bot commented Jun 13, 2021

Codecov Report

Merging #292 (fec3598) into master (a75445b) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #292   +/-   ##
=======================================
  Coverage   96.41%   96.42%           
=======================================
  Files          98      106    +8     
  Lines        3350     3442   +92     
=======================================
+ Hits         3230     3319   +89     
- Misses        120      123    +3     
Flag Coverage Δ
Linux 75.82% <94.89%> (+0.55%) ⬆️
Windows 75.82% <94.89%> (+0.55%) ⬆️
cpu 75.82% <94.89%> (-19.76%) ⬇️
gpu 96.42% <100.00%> (+0.03%) ⬆️
macOS 75.82% <94.89%> (-19.76%) ⬇️
pytest 96.42% <100.00%> (+<0.01%) ⬆️
python3.6 ?
python3.8 ?
torch1.3.1 ?
torch1.4.0 ?

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

Impacted Files Coverage Δ
torchmetrics/__init__.py 100.00% <100.00%> (ø)
torchmetrics/audio/__init__.py 100.00% <100.00%> (ø)
torchmetrics/audio/si_sdr.py 100.00% <100.00%> (ø)
torchmetrics/audio/si_snr.py 100.00% <100.00%> (ø)
torchmetrics/audio/snr.py 100.00% <100.00%> (ø)
torchmetrics/functional/__init__.py 100.00% <100.00%> (ø)
torchmetrics/functional/audio/__init__.py 100.00% <100.00%> (ø)
torchmetrics/functional/audio/si_sdr.py 100.00% <100.00%> (ø)
torchmetrics/functional/audio/si_snr.py 100.00% <100.00%> (ø)
torchmetrics/functional/audio/snr.py 100.00% <100.00%> (ø)
... and 11 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 a75445b...fec3598. Read the comment docs.

@Borda Borda added enhancement New feature or request New metric labels Jun 13, 2021
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.

Very nice addition!
mind also add Mudule version and docs 🐰

@Borda Borda changed the title add snr, si_sdr, si_snr audio metrics: SNR, SI_SDR, SI_SNR Jun 13, 2021
@quancs
Copy link
Member Author

quancs commented Jun 13, 2021

Very nice addition!
mind also add Mudule version and docs 🐰

OK. Can you tell me how and where to add Mudule version and docs?

@Borda
Copy link
Member

Borda commented Jun 13, 2021

Can you tell me how and where to add Module version and docs?

sure, please check adding this metric as template/example #210

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.

Great start. Some of the comments that I made to the scale-invariant signal-to-distortion ratio metric also applies to the other two (the inclusion of the EPS parameter and the naming of the estimate tensor).

torchmetrics/functional/audio/si_sdr.py Outdated Show resolved Hide resolved
torchmetrics/functional/audio/si_sdr.py Outdated Show resolved Hide resolved
torchmetrics/functional/audio/si_sdr.py Outdated Show resolved Hide resolved
torchmetrics/functional/audio/si_sdr.py Show resolved Hide resolved
torchmetrics/functional/audio/si_sdr.py Show resolved Hide resolved
torchmetrics/functional/audio/si_snr.py Outdated Show resolved Hide resolved
torchmetrics/functional/audio/snr.py Outdated Show resolved Hide resolved
Co-authored-by: Nicki Skafte <skaftenicki@gmail.com>
@quancs quancs requested review from Borda and justusschock June 21, 2021 19:42
@mergify mergify bot removed the has conflicts label Jun 22, 2021
@Borda Borda enabled auto-merge (squash) June 22, 2021 12:07
auto-merge was automatically disabled June 22, 2021 13:52

Head branch was pushed to by a user without write access

tchaton and others added 9 commits June 22, 2021 18:33
* add _apply_sync to nn.Metric

* move to context manager

* add sync

* add restore_cache

* add a sync test

* Update torchmetrics/metric.py

Co-authored-by: Nicki Skafte <skaftenicki@gmail.com>

* remove _update_signature

* Apply suggestions from code review

Co-authored-by: Carlos Mocholí <carlossmocholi@gmail.com>

* resolve failing test

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Nicki Skafte <skaftenicki@gmail.com>
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
Co-authored-by: Carlos Mocholí <carlossmocholi@gmail.com>
updates:
- [github.com/PyCQA/isort: 5.8.0 → 5.9.1](PyCQA/isort@5.8.0...5.9.1)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* implementation

* parameter testing

* fix test

* implementation

* update to torch fidelity 0.3.0

* changelog

* docs

* Apply suggestions from code review

Co-authored-by: Justus Schock <12886177+justusschock@users.noreply.github.com>

* add test

* update

* fix tests

* typing

* fix typing

* fix bus error

* Apply suggestions from code review

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: Justus Schock <12886177+justusschock@users.noreply.github.com>
Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
-u root

cuda 10.2

whoami
@mergify mergify bot removed the has conflicts label Jun 22, 2021
@Borda Borda enabled auto-merge (squash) June 22, 2021 16:53
@Borda Borda merged commit fe03f3a into Lightning-AI:master Jun 22, 2021
@quancs quancs deleted the audio-dev branch August 5, 2021 07:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add new audio metrics
7 participants