I am trying to use pytorch-nightly with a project on my macOS. pytorch stable can be used, but the results could be better. So, I wanted to give pytorch-nightly a try. If I run the same script using pytorch-nightly, I get the error:
...
ModuleNotFoundError: No module named 'torchaudio.backend.common'
Is this module for some reason not part of pytorch-nightly?
Of course, I used a fresh environment everytime. I just executed import torchaudio.backend.common in the interactive python console. With every pytorch-nightly env I get the ModuleNotFoundError. Doing the same with just pytorch works.
This PR moved some modules around to _backend.
However, torchaudio.backend.common still works for me in 2.1.0.dev20230817+cu121, which should already contain the linked PR:
torchaudio.backend.common
<module 'torchaudio.backend._common' from '/home/pbialecki/miniforge3/envs/nightly_pip_cu121/lib/python3.10/site-packages/torchaudio/backend/_common.py'>
torchaudio.__version__
'2.1.0.dev20230817+cu121'
Hmm, that’s weird.
I get (almost) the same output as you:
>>> torchaudio.backend.common
<module 'torchaudio.backend._common' from '/Users/gernophil/miniconda3/envs/pytorch-nightly/lib/python3.11/site-packages/torchaudio/backend/_common.py'>
>>> torchaudio.__version__
'2.1.0.dev20230823'
Still I cannot run this import command:
from torchaudio.backend.common import AudioMetaData
It’s used by a pyannote fork I use and is does work with the non-nightly version.
However, by importing tfrom torchaudio.backend._common import AudioMetaData I got the message that it’s been moved to torchaudio.AudioMetaData. Should be doable now :).