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

Add PIT for audio metrics #384

Merged
merged 73 commits into from
Jul 29, 2021
Merged

Add PIT for audio metrics #384

merged 73 commits into from
Jul 29, 2021

Conversation

quancs
Copy link
Member

@quancs quancs commented Jul 17, 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 #294.
Calculate audio metrics in a permutation invariant way in multi-speaker cases

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 Jul 17, 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-07-29 13:09:15 UTC

@codecov
Copy link

codecov bot commented Jul 17, 2021

Codecov Report

Merging #384 (40b7e81) into master (0e88049) will increase coverage by 0.10%.
The diff coverage is 98.71%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #384      +/-   ##
==========================================
+ Coverage   96.05%   96.15%   +0.10%     
==========================================
  Files         122      124       +2     
  Lines        3900     3977      +77     
==========================================
+ Hits         3746     3824      +78     
+ Misses        154      153       -1     
Flag Coverage Δ
Linux 75.71% <85.89%> (+0.19%) ⬆️
Windows 75.71% <85.89%> (+0.19%) ⬆️
cpu 96.10% <98.71%> (+0.05%) ⬆️
gpu 96.07% <98.71%> (?)
macOS 96.10% <98.71%> (+0.05%) ⬆️
pytest 96.15% <98.71%> (+0.10%) ⬆️
python3.6 95.32% <98.71%> (+0.06%) ⬆️
python3.8 96.10% <98.71%> (+0.05%) ⬆️
python3.9 96.00% <98.71%> (+0.05%) ⬆️
torch1.3.1 95.32% <98.71%> (+0.06%) ⬆️
torch1.4.0 95.39% <98.71%> (+0.06%) ⬆️
torch1.9.0 96.00% <98.71%> (+0.05%) ⬆️

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

Impacted Files Coverage Δ
torchmetrics/functional/audio/pit.py 98.03% <98.03%> (ø)
torchmetrics/__init__.py 100.00% <100.00%> (ø)
torchmetrics/audio/__init__.py 100.00% <100.00%> (ø)
torchmetrics/audio/pit.py 100.00% <100.00%> (ø)
torchmetrics/functional/__init__.py 100.00% <100.00%> (ø)
torchmetrics/functional/audio/__init__.py 100.00% <100.00%> (ø)
torchmetrics/functional/regression/spearman.py 97.77% <0.00%> (+4.44%) ⬆️

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 0e88049...40b7e81. Read the comment docs.

@quancs quancs marked this pull request as ready for review July 17, 2021 22:56
@mergify mergify bot removed the has conflicts label Jul 28, 2021
docs/source/references/modules.rst Outdated Show resolved Hide resolved
tests/audio/test_pit.py Outdated Show resolved Hide resolved
tests/audio/test_pit.py Outdated Show resolved Hide resolved
tests/audio/test_pit.py Outdated Show resolved Hide resolved
tests/audio/test_pit.py Outdated Show resolved Hide resolved
torchmetrics/audio/pit.py Outdated Show resolved Hide resolved
torchmetrics/functional/audio/pit.py Outdated Show resolved Hide resolved
torchmetrics/functional/audio/pit.py Outdated Show resolved Hide resolved
torchmetrics/functional/audio/pit.py Outdated Show resolved Hide resolved
torchmetrics/functional/audio/pit.py Outdated Show resolved Hide resolved
Co-authored-by: Nicki Skafte <skaftenicki@gmail.com>
@mergify mergify bot added the ready label Jul 28, 2021
Copy link
Contributor

@tchaton tchaton left a comment

Choose a reason for hiding this comment

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

LGTM !

tests/audio/test_pit.py Outdated Show resolved Hide resolved
Co-authored-by: thomas chaton <thomas@grid.ai>
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.

LGTM

torchmetrics/functional/audio/pit.py Outdated Show resolved Hide resolved
torchmetrics/functional/audio/pit.py Outdated Show resolved Hide resolved
torchmetrics/audio/pit.py Outdated Show resolved Hide resolved
@SkafteNicki SkafteNicki enabled auto-merge (squash) July 29, 2021 11:56
@mergify mergify bot removed the has conflicts label Jul 29, 2021
@Borda Borda disabled auto-merge July 29, 2021 12:14
@Borda Borda enabled auto-merge (squash) July 29, 2021 12:16
@Borda Borda merged commit 250fffe into Lightning-AI:master Jul 29, 2021
@quancs quancs deleted the audio-pit branch August 5, 2021 07:56
@Borda Borda added this to the v0.5 milestone Aug 18, 2021
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 multi-speaker support to the audio metrics
5 participants