Skip to content
This repository has been archived by the owner on Oct 9, 2023. It is now read-only.

Remove sd2 sound extensions from supported audio extensions #1409

Merged
merged 5 commits into from
Aug 16, 2022

Conversation

krshrimali
Copy link
Contributor

@krshrimali krshrimali commented Aug 2, 2022

What does this PR do?

CI is failing, because SoundFile (for sd2 extension) doesn't accept fsspec objects. Following raises an error:

with fsspec.open(file_path) as _file:
    sound_file = SoundFile(_file)

Error raised:

RuntimeError: Error opening <fsspec.implementations.local.LocalFileOpener object at 0x100f4ac50>: Format not recognised

From discussion, we have decided to remove sd2 extension from supported audio extensions.

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 your PR does only one thing, instead of bundling different changes together?
  • Did you make sure to update the documentation with your changes?
  • Did you write any new necessary tests? [not needed for typos/docs]
  • Did you verify new and existing tests pass locally with your changes?
  • If you made a notable change (that affects users), did you update the CHANGELOG?

PR review

  • Is this pull request ready for review? (if not, please submit in draft mode)

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 Aug 2, 2022

Codecov Report

Merging #1409 (733777a) into master (2657315) will increase coverage by 0.34%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #1409      +/-   ##
==========================================
+ Coverage   91.79%   92.13%   +0.34%     
==========================================
  Files         286      286              
  Lines       12861    12861              
==========================================
+ Hits        11806    11850      +44     
+ Misses       1055     1011      -44     
Flag Coverage Δ
unittests 92.13% <ø> (+0.34%) ⬆️

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

Impacted Files Coverage Δ
flash/audio/classification/data.py 100.00% <ø> (+50.00%) ⬆️
flash/audio/speech_recognition/data.py 100.00% <ø> (+20.00%) ⬆️
flash/core/data/utilities/loading.py 98.52% <ø> (+23.52%) ⬆️
flash/graph/classification/input.py 45.45% <0.00%> (-54.55%) ⬇️
flash/graph/classification/cli.py 38.46% <0.00%> (-53.85%) ⬇️
flash/graph/collate.py 50.00% <0.00%> (-50.00%) ⬇️
flash/graph/classification/model.py 42.62% <0.00%> (-49.19%) ⬇️
flash/graph/embedding/model.py 54.83% <0.00%> (-45.17%) ⬇️
flash/graph/backbones.py 64.28% <0.00%> (-35.72%) ⬇️
flash/graph/classification/input_transform.py 66.66% <0.00%> (-33.34%) ⬇️
... and 15 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Copy link
Collaborator

@ethanwharris ethanwharris left a comment

Choose a reason for hiding this comment

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

Seems like the error is only for '.sd2' files. Should we not just drop that format from support?

@krshrimali
Copy link
Contributor Author

Seems like the error is only for '.sd2' files. Should we not just drop that format from support?

Yeah, let's do that. I agree 💯 I don't see any audio dataset having sd2 file extensions as well. Is it okay if I do this in this PR?

@krshrimali krshrimali changed the title Hotfix: don't pass fsspec object to soundfile Remove sd2 sound extensions from supported audio extensions Aug 3, 2022
@krshrimali krshrimali enabled auto-merge (squash) August 3, 2022 04:21
@krshrimali krshrimali disabled auto-merge August 13, 2022 03:47
@ethanwharris ethanwharris merged commit b508581 into master Aug 16, 2022
@ethanwharris ethanwharris deleted the hot-fix/audio-loading branch August 16, 2022 13:13
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants