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

Ignore the NoUtterancesError when calculating pesq for a batch #2753

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

veera-puthiran-14082
Copy link

@veera-puthiran-14082 veera-puthiran-14082 commented Sep 17, 2024

What does this PR do?

Fixes #2752

  • Ignores the NoUtterancesError and create tensors with the available results, if a batch of size 32 is passed and 2 of them encountered an error, then for 30 pesq scores avg will be calculated and returned.

  • introduced a simple lambda function which filter out exception messages and keep the pesq values calculated.

  • since the np.array contained error messages and pesq scores, the result was in np.object dtype. it is converted to np.float32 since pesq is also calculated in float32

Checklist

  • Was this discussed/agreed 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.


📚 Documentation preview 📚: https://torchmetrics--2753.org.readthedocs.build/en/2753/

@veera-puthiran-14082 veera-puthiran-14082 changed the title Closes #2752 Ignores the NoUtterancesError when calculating pesq for a batch Sep 17, 2024
@veera-puthiran-14082 veera-puthiran-14082 changed the title Ignores the NoUtterancesError when calculating pesq for a batch Ignore the NoUtterancesError when calculating pesq for a batch Sep 17, 2024
@Borda Borda changed the title Ignore the NoUtterancesError when calculating pesq for a batch Ignore the NoUtterancesError when calculating pesq for a batch Sep 17, 2024
Copy link

codecov bot commented Sep 17, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 35%. Comparing base (fd11f33) to head (30551b7).

❗ There is a different number of reports uploaded between BASE (fd11f33) and HEAD (30551b7). Click for more details.

HEAD has 86 uploads less than BASE
Flag BASE (fd11f33) HEAD (30551b7)
Windows 6 3
python3.8 6 3
cpu 40 20
torch1.13.1+cpu 6 3
macOS 8 4
python3.10 10 5
torch2.0.1 4 2
torch1.12.1+cpu 2 1
Linux 26 13
python3.9 18 9
torch1.10.2+cpu 2 1
torch2.0.1+cpu 6 3
torch1.11.0+cpu 2 1
torch2.4.0+cpu 2 1
python3.11 6 3
torch2.4.0 2 1
torch1.13.1 2 1
torch2.3.1+cpu 4 2
torch2.2.2+cpu 4 2
torch2.1.2+cpu 2 1
gpu 3 0
unittest 3 0
torch2.4.0+cu121 2 1
Additional details and impacted files
@@           Coverage Diff            @@
##           master   #2753     +/-   ##
========================================
- Coverage      69%     35%    -34%     
========================================
  Files         329     316     -13     
  Lines       18077   17914    -163     
========================================
- Hits        12499    6288   -6211     
- Misses       5578   11626   +6048     

@mergify mergify bot added the ready label Sep 17, 2024
@veera-puthiran-14082
Copy link
Author

@Borda can this be merged ? Thanks in advance

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.

PESQ No utterances detected
2 participants