facebookresearch / mmf

A modular framework for vision & language multimodal research from Facebook AI Research (FAIR)
https://mmf.sh/
Other
5.46k stars 932 forks source link

_torchaudio.so: undefined symbol error in Google colab #1193

Open coglmn opened 2 years ago

coglmn commented 2 years ago

Hello,

I'm trying to train MMF / M4C model on Google Colab. All the required packages are installed and setups are performed, as per the KDD notebook (https://github.com/facebookresearch/mmf/blob/notebooks/notebooks/kdd_tutorial.ipynb). When running mmf_run to train a textvqa model, though, face the following issue:

mmf_run config=projects/m4c/configs/textvqa/defaults.yaml \ datasets=textvqa \ model=m4c \ run_type=train_val

I have tested this with both torch 1.10 and torch 1.5 (as per original notebook), still facing the same error (with different versions of torchaudio).

Also, torchaudio is not needed for this particular model execution, wondering if there is a way to comment it's importation out?

Traceback (most recent call last): File "/usr/local/bin/mmf_run", line 33, in sys.exit(load_entry_point('mmf', 'console_scripts', 'mmf_run')()) File "/usr/local/bin/mmf_run", line 25, in importlib_load_entry_point return next(matches).load() File "/usr/local/lib/python3.7/dist-packages/importlib_metadata/init.py", line 194, in load module = import_module(match.group('module')) File "/usr/lib/python3.7/importlib/init.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1006, in _gcd_import File "", line 983, in _find_and_load File "", line 967, in _find_and_load_unlocked File "", line 677, in _load_unlocked File "", line 728, in exec_module File "", line 219, in _call_with_frames_removed File "/content/mmf/mmf_cli/run.py", line 9, in from mmf.common.registry import registry File "/content/mmf/mmf/init.py", line 6, in patch_transformers() File "/content/mmf/mmf/utils/patch.py", line 65, in patch_transformers f"transformers.models.{key}.{module}" File "/usr/lib/python3.7/importlib/init.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "/usr/local/lib/python3.7/dist-packages/transformers-4.10.1-py3.7.egg/transformers/models/speech_to_text/processing_speech_to_text.py", line 20, in from .feature_extraction_speech_to_text import Speech2TextFeatureExtractor File "/usr/local/lib/python3.7/dist-packages/transformers-4.10.1-py3.7.egg/transformers/models/speech_to_text/feature_extraction_speech_to_text.py", line 23, in import torchaudio.compliance.kaldi as ta_kaldi File "/usr/local/lib/python3.7/dist-packages/torchaudio-0.9.0-py3.7-linux-x86_64.egg/torchaudio/init.py", line 1, in from . import extension # noqa: F401 File "/usr/local/lib/python3.7/dist-packages/torchaudio-0.9.0-py3.7-linux-x86_64.egg/torchaudio/extension/init.py", line 5, in _init_extension() File "/usr/local/lib/python3.7/dist-packages/torchaudio-0.9.0-py3.7-linux-x86_64.egg/torchaudio/extension/extension.py", line 11, in _init_extension _init_script_module(ext) File "/usr/local/lib/python3.7/dist-packages/torchaudio-0.9.0-py3.7-linux-x86_64.egg/torchaudio/extension/extension.py", line 19, in _init_script_module torch.classes.load_library(path) File "/usr/local/lib/python3.7/dist-packages/torch/_classes.py", line 48, in load_library torch.ops.load_library(path) File "/usr/local/lib/python3.7/dist-packages/torch/_ops.py", line 110, in load_library ctypes.CDLL(path) File "/usr/lib/python3.7/ctypes/init.py", line 364, in init self._handle = _dlopen(self._name, mode) OSError: /usr/local/lib/python3.7/dist-packages/torchaudio-0.9.0-py3.7-linux-x86_64.egg/torchaudio/_torchaudio.so: undefined symbol: _ZNK2at6Tensor9index_putERKN3c104ListINS1_8optionalIS0_EEEERKS0_b

Thank you!