ParlAI icon indicating copy to clipboard operation
ParlAI copied to clipboard

ImportError: Could not find BlenderBot 3

Open notBradPitt opened this issue 2 years ago • 3 comments

I'm having trouble importing BB3 model using Colab. I've tried several names but none of them work, even simple commands like parlai interactive --model-file "zoo:bb3/bb3_3B/model" still returns an error.

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/dist-packages/parlai/core/build_data.py", line 490, in modelzoo_path
    my_module = importlib.import_module(module_name)
  File "/usr/lib/python3.7/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 953, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 965, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'parlai.zoo.bb3'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/dist-packages/parlai/core/build_data.py", line 497, in modelzoo_path
    my_module = importlib.import_module(module_name_)
  File "/usr/lib/python3.7/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 953, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 965, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'parlai.zoo.bb3'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/local/bin/parlai", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.7/dist-packages/parlai/__main__.py", line 14, in main
    superscript_main()
  File "/usr/local/lib/python3.7/dist-packages/parlai/core/script.py", line 316, in superscript_main
    opt = parser.parse_args(args)
  File "/usr/local/lib/python3.7/dist-packages/parlai/core/params.py", line 1163, in parse_args
    self.add_extra_args(args)
  File "/usr/local/lib/python3.7/dist-packages/parlai/core/script.py", line 175, in add_extra_args
    sa.choices[args[0]].add_extra_args(args)
  File "/usr/local/lib/python3.7/dist-packages/parlai/core/params.py", line 946, in add_extra_args
    model = get_model_name(parsed)
  File "/usr/local/lib/python3.7/dist-packages/parlai/core/params.py", line 136, in get_model_name
    model_file = modelzoo_path(opt.get('datapath'), model_file)
  File "/usr/local/lib/python3.7/dist-packages/parlai/core/build_data.py", line 504, in modelzoo_path
    ) from exc
ImportError: Could not find pretrained model in parlai.zoo.bb3.bb3_3B or parlai.zoo.bb3.build. Please check your spelling and make sure you've pulled from master.

notBradPitt avatar Oct 03 '22 06:10 notBradPitt

Do you have the most recent version of ParlAI?

mojtaba-komeili avatar Oct 04 '22 01:10 mojtaba-komeili

Yes. I don't think Colab has them pre-installed on their machine, so I tried using both pip and from the repo

notBradPitt avatar Oct 07 '22 03:10 notBradPitt

It seems to me that the latest version of parlai needs python 3.8 while colab (in its standard setup) comes with 3.7 which seems to indicates that you are not using the latest parlai version.

galleon avatar Oct 21 '22 06:10 galleon

This issue has not had activity in 30 days. Please feel free to reopen if you have more issues. You may apply the "never-stale" tag to prevent this from happening.

github-actions[bot] avatar Dec 04 '22 00:12 github-actions[bot]