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
Remove skipIfNoSoxBackend #1390
Conversation
Hello @mthrok, I am not sure why unit tests fail with this error. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for working on this. The direction of the change looks good.
skipIfNoSox = unittest.skipIf(not is_sox_available(), reason='Sox not available') | ||
skipIfNoSox = unittest.skipIf( | ||
not is_sox_available() or | ||
'sox' not in torchaudio.list_audio_backends(), reason='Sox not available') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no need to update the logic. 'sox'
has been removed from the list of backends so 'sox' not in torchaudio.list_audio_backends()
is always False
.
@@ -7,7 +7,6 @@ | |||
|
|||
import torch | |||
from torch.testing._internal.common_utils import TestCase as PytorchTestCase | |||
import torchaudio |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The test is failing simply because this import statement is being removed. This should stay.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That was my bad. Thanks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh, I see. Since now we remove the 'sox' not in torchaudio.list_audio_backends()
, torchaudio
is no longer used. Yes, this can be finally removed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like there are some tests which depended on the old sox
backend, which should not be.
Can you
- Remove the following
backend='sox'
backend = 'sox' - Replace the following
torchaudio.load
withcommon_utils.load_wav
?
sound, sample_rate = torchaudio.load(self.test_filepath, normalization=False)
like in
sound, sr = common_utils.load_wav(sound_filepath, normalize=False)
@@ -7,7 +7,6 @@ | |||
|
|||
import torch | |||
from torch.testing._internal.common_utils import TestCase as PytorchTestCase | |||
import torchaudio |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh, I see. Since now we remove the 'sox' not in torchaudio.list_audio_backends()
, torchaudio
is no longer used. Yes, this can be finally removed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for working on this. I merged #1387, part of which also touches the same file as this PR, so can you resolve the conflict? That will resolve the test failures with resample_waveform
.
For other test failures, can you copy-paste this method from funtional
to transform
class?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Thanks!
Thanks for the review |
Fixes #1388