pytorch / audio

Data manipulation and transformation for audio signal processing, powered by PyTorch
https://pytorch.org/audio
BSD 2-Clause "Simplified" License
2.43k stars 636 forks source link

Torchaudio.load() reference not found in Pycharm #3715

Open asusdisciple opened 6 months ago

asusdisciple commented 6 months ago

🐛 Describe the bug

Pycharm Professional 2023.3 is unable to locate the reference to basic functions like torchaudo.save() or torchaudio.load(). I do not not why this happens, maybe the refs are generated on execution? The code execution works without any errors. I am using the newest version of torchaudio.

Versions

[pip3] flake8==6.1.0 [pip3] numpy==1.26.2 [pip3] onnxruntime==1.16.3 [pip3] pytest-flake8==1.1.1 [pip3] torch==2.1.1 [pip3] torch-audiomentations==0.11.0 [pip3] torch-pitch-shift==1.2.4 [pip3] torchaudio==2.1.1 [pip3] torcheval==0.0.7 [pip3] triton==2.1.0

mthrok commented 6 months ago

It's likely because these functions are dynamically assigned.

https://github.com/pytorch/audio/blob/v2.1.1/torchaudio/_backend/__init__.py#L11-L13

After 2.2 release, this should be changed to static definitions.