Closed sekewei closed 5 years ago
Maybe the following error is related as it is shown when running torch.hub.list('pytorch/fairseq', force_reload=True) for the first time.
ModuleNotFoundError: No module named 'fairseq.data.data_utils_fast'
TypeError is shown the second time when running torch.hub.list('pytorch/fairseq', force_reload=True) by ignoring the first error message.
Just found that 'fairseq.data.data_utils_fast' module is available in 'pyx' format. It requires the following build process for inplace access.
~/fairseq$ python setup.py build_ext --inplace
After the inplace build process, an .so shared object is generated for module import.
~/fairseq$ ls fairseq/data/data_utils*
fairseq/data/data_utils_fast.cpp
fairseq/data/data_utils_fast.cpython-37m-x86_64-linux-gnu.so
fairseq/data/data_utils_fast.pyx
fairseq/data/data_utils.py
Yes, we recently introduced cython dependency to the fairseq code to make data loading faster. So if you have recently git pulled, you will need to build the *.so files.
Would there be any instructions on how to build *.so files?
@BrazilForever11 Yes, we just landed https://github.com/pytorch/fairseq/commit/396ff7f59f027a98d2df9951ed15045bdd91554b which prints nicer error msg with instruction to build cython component.
You need to run
pip install --editable .
from within the fairseq
folder where setup.py
exists.
This is still happening in the master
This is still happening to me. ¡Anyone with the same problem? What's the workaround?
This is still happening, any workaround?
It's happening to me too. Does anyone have the solution?
Still happening on data2vec audio infer.
I had the same issue. Apparently upgrading tokenizers was helpful... From: https://stackoverflow.com/questions/68528187/cant-load-transformers-models/70832410#70832410?newreg=130314ccc1094a2cb6ec8ec1cd12228d
The problem is still happening. It is happening on loading a model in google colab also:
import torch
roberta = torch.hub.load('pytorch/fairseq', 'roberta.large.mnli', force_reload=True)
Error message
[~/.cache/torch/hub/pytorch_fairseq_main/fairseq/criterions/__init__.py](https://localhost:8080/#) in <module>
16
17
---> 18 (
19 build_criterion_,
20 register_criterion,
TypeError: cannot unpack non-iterable NoneType object
hello was anyone able to find a solution , facing the same issue on google colab.
TypeError Traceback (most recent call last)
7 frames
~/.cache/torch/hub/pytorch_fairseq_main/fairseq/criterions/init.py in
TypeError: cannot unpack non-iterable NoneType object
When running the above torch.hub command on 'pytorch/fairseq', the folloinwg TypeError on default='cross_entropy' is shown.
Downloading: "https://github.com/pytorch/fairseq/archive/master.zip" to /root/.cache/torch/hub/master.zip
TypeError Traceback (most recent call last)