Issue with fb_pathmgr
See original GitHub issueHello, I am running the interactive translation (via PyTorch Hub) example.
When I run the command
en2de = torch.hub.load('pytorch/fairseq', 'transformer.wmt16.en-de', tokenizer='moses', bpe='subword_nmt')
I am getting the following error:
File "torch/hub/pytorch_fairseq_master/fairseq/checkpoint_utils.py", line 140, in load_checkpoint_to_cpu
from fairseq.fb_pathmgr import fb_pathmgr
ImportError: No module named 'fairseq.fb_pathmgr'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/lib/python3.5/site-packages/torch/hub.py", line 363, in load
model = entry(*args, **kwargs)
File "torch/hub/pytorch_fairseq_master/fairseq/models/fairseq_model.py", line 172, in from_pretrained
**kwargs,
File "torch/hub/pytorch_fairseq_master/fairseq/hub_utils.py", line 54, in from_pretrained
arg_overrides=kwargs,
File "torch/hub/pytorch_fairseq_master/fairseq/checkpoint_utils.py", line 178, in load_model_ensemble_and_task
state = load_checkpoint_to_cpu(filename, arg_overrides)
File "torch/hub/pytorch_fairseq_master/fairseq/checkpoint_utils.py", line 145, in load_checkpoint_to_cpu
except (ModuleNotFoundError, ImportError):
NameError: name 'ModuleNotFoundError' is not defined
Can you please help me resolve this?
Thanks!
Issue Analytics
- State:
- Created 4 years ago
- Comments:13 (1 by maintainers)
Top Results From Across the Web
No results found
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’m still having this error with fairseq 0.9.0
same error for both 0.8.0 and 0.10.0