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

Import Error about library"torchaudio_augmentations" in colab #28

Open
ghost opened this issue Nov 13, 2021 · 1 comment
Open

Import Error about library"torchaudio_augmentations" in colab #28

ghost opened this issue Nov 13, 2021 · 1 comment
Assignees

Comments

@ghost
Copy link

ghost commented Nov 13, 2021

Hi, first I would like to say thank you very much for the tutorial, it's really great. :)

I'm trying to implement the code from the tutorial into colab, but it seems that in “Audio Data Augmentations” subsection, the import encounters problems with cuda version compatibility, I'm not quite sure what's going on, could you please take a look at it?

Here is my colab note:
https://colab.research.google.com/drive/1Df2-yf9-tSnYUo8juIhfLTvhSto5Bk7F?authuser=2#scrollTo=GezaZlg7kqgx&line=5&uniqifier=1

@Spijkervet
Copy link
Contributor

Hi there! Thanks for reporting the issue. I've taken a look at your stack trace, and it says that it has problems loading torchaudio's Vol class. This may have to do that your torchaudio version does not match the compiled torch version in your notebook. I would recommend doing a pip3 install torch torchaudio --upgrade.

(copying the stack trace for reference here:)

---------------------------------------------------------------------------
OSError                                   Traceback (most recent call last)
<ipython-input-30-28549e3b5dfb> in <module>()
      6 import torch
      7 from torch.utils import data
----> 8 from torchaudio_augmentations import (
      9     Compose,
     10     Delay,

6 frames
/usr/local/lib/python3.7/dist-packages/torchaudio_augmentations/__init__.py in <module>()
      2 from .compose import Compose, ComposeMany
      3 from .augmentations.delay import Delay
----> 4 from .augmentations.gain import Gain
      5 from .augmentations.high_low_pass import HighLowPass
      6 from .augmentations.noise import Noise

/usr/local/lib/python3.7/dist-packages/torchaudio_augmentations/augmentations/gain.py in <module>()
      1 import torch
      2 import random
----> 3 from torchaudio.transforms import Vol
      4 
      5 

/usr/local/lib/python3.7/dist-packages/torchaudio/__init__.py in <module>()
----> 1 from torchaudio import _extension  # noqa: F401
      2 from torchaudio import (
      3     compliance,
      4     datasets,
      5     functional,

/usr/local/lib/python3.7/dist-packages/torchaudio/_extension.py in <module>()
     25 
     26 
---> 27 _init_extension()

/usr/local/lib/python3.7/dist-packages/torchaudio/_extension.py in _init_extension()
     19     # which depends on `libtorchaudio` and dynamic loader will handle it for us.
     20     if path.exists():
---> 21         torch.ops.load_library(path)
     22         torch.classes.load_library(path)
     23     # This import is for initializing the methods registered via PyBind11

/usr/local/lib/python3.7/dist-packages/torch/_ops.py in load_library(self, path)
    108             # static (global) initialization code in order to register custom
    109             # operators with the JIT.
--> 110             ctypes.CDLL(path)
    111         self.loaded_libraries.add(path)
    112 

/usr/lib/python3.7/ctypes/__init__.py in __init__(self, name, mode, handle, use_errno, use_last_error)
    362 
    363         if handle is None:
--> 364             self._handle = _dlopen(self._name, mode)
    365         else:
    366             self._handle = handle

OSError: libcudart.so.10.2: cannot open shared object file: No such file or directory

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant