Datasets:

Formats:
parquet
Languages:
English
ArXiv:
DOI:
License:

Colab notebook example fails to run due to TorchCodec import error

#4
by Eloimoliner - opened

Hi,

I tried running the example Colab notebook for your dataset, but it fails immediately when importing torchcodec:

import torchcodec

This raises:

/usr/local/lib/python3.12/dist-packages/torchcodec/_core/ops.py in load_torchcodec_shared_libraries()
     73         + "\n[end of libtorchcodec loading traceback]."
     74     )
---> 75     raise RuntimeError(
     76         f"""Could not load libtorchcodec. Likely causes:
     77           1. FFmpeg is not properly installed in your environment. We support

RuntimeError: Could not load libtorchcodec. Likely causes:
          1. FFmpeg is not properly installed in your environment. We support
             versions 4, 5, 6, 7, and 8. On Windows, ensure you've installed
             the "full-shared" version which ships DLLs.
          2. The PyTorch version (2.10.0+cu128) is not compatible with
             this version of TorchCodec. Refer to the version compatibility
             table:
             https://github.com/pytorch/torchcodec?tab=readme-ov-file#installing-torchcodec.
          3. Another runtime dependency; see exceptions below.
        The following exceptions were raised as we tried to load libtorchcodec:
        
[start of libtorchcodec loading traceback]
FFmpeg version 8: Could not load this library: /usr/local/lib/python3.12/dist-packages/torchcodec/libtorchcodec_core8.so
FFmpeg version 7: Could not load this library: /usr/local/lib/python3.12/dist-packages/torchcodec/libtorchcodec_core7.so
FFmpeg version 6: Could not load this library: /usr/local/lib/python3.12/dist-packages/torchcodec/libtorchcodec_core6.so
FFmpeg version 5: Could not load this library: /usr/local/lib/python3.12/dist-packages/torchcodec/libtorchcodec_core5.so
FFmpeg version 4: Could not load this library: /usr/local/lib/python3.12/dist-packages/torchcodec/libtorchcodec_core4.so
[end of libtorchcodec loading traceback].

Because of this, the Colab notebook example does not work out of the box.

I haven't been able to run this on any other environment.

Can you provide a working setup for the notebook or instructions to run it successfully?

Or, preferably, would it be possible to upload the data as a simple .zip with .wav files or equivalent?

Thanks!

Treble Technologies org

Thanks for reporting this. The issue came from a dependency mismatch.

I've updated the initialisation cell that installs the required runtime dependencies to use a known working version of torchcodec. If you open the notebook in a fresh Colab runtime and run the first cell, the imports should now work as expected.

If a similar issue arises in the future, it's likely due to changes in the Colab environment or further development on torch or torchcodec, in which case updating the version of in the installation cell should resolve it.

ssm-treble changed discussion status to closed

Sign up or log in to comment