Blenderbot 3 Import Error
Hi I am trying to run Blenderbot 3 on Ubuntu 20.04 tried with RTX 2080Ti and RTX 3080Ti and it worked exactly once (one turn) after which it keeps giving the same error. I'm in Korea so I'm wondering whether it's because you haven't released it internationally yet (but if so why did it work the first time?) and if so if you could let us know when you plan to release it would be greatly appreciated.
Used the following command in terminal (after setting up environment, installing requirements.txt, etc):
parlai interactive --model-file zoo:bb3/bb3_3B/model --init-opt gen/r2c2_bb3
Got the following error:
Traceback (most recent call last):
File "/home/david/anaconda3/envs/parlai/lib/python3.8/site-packages/parlai/core/build_data.py", line 490, in modelzoo_path
my_module = importlib.import_module(module_name)
File "/home/david/anaconda3/envs/parlai/lib/python3.8/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/david/anaconda3/envs/parlai/lib/python3.8/site-packages/parlai/core/build_data.py", line 497, in modelzoo_path
my_module = importlib.import_module(module_name_)
File "/home/david/anaconda3/envs/parlai/lib/python3.8/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/david/anaconda3/envs/parlai/bin/parlai", line 8, in
I've got similar error:
Error
Traceback (most recent call last):
File "C:\Users\carro\Documents\Unity Projects\Tests\SeekerTest\Assets\Scripts\Blenderbot3\bb3.py", line 27, in <module>
instance.run()
File "C:\Users\carro\Documents\Unity Projects\Tests\SeekerTest\Assets\Scripts\Blenderbot3\bb3.py", line 15, in run
self.chatServiceRunner = ChatServiceRunner(mydir)
File "C:\Users\carro\Documents\Unity Projects\Tests\SeekerTest\Assets\Scripts\Blenderbot3\src\run.py", line 56, in __init__
self.opt = self.setup_args()
File "C:\Users\carro\Documents\Unity Projects\Tests\SeekerTest\Assets\Scripts\Blenderbot3\src\run.py", line 35, in setup_args
return parser.parse_args()
File "C:\Users\carro\Documents\Unity Projects\Tests\SeekerTest\Assets\StreamingAssets\python-3.8.10\parlai\core\params.py", line 1169, in parse_args
self.add_extra_args(args)
File "C:\Users\carro\Documents\Unity Projects\Tests\SeekerTest\Assets\StreamingAssets\python-3.8.10\parlai\core\params.py", line 948, in add_extra_args
self.add_model_subargs(model, partial)
File "C:\Users\carro\Documents\Unity Projects\Tests\SeekerTest\Assets\StreamingAssets\python-3.8.10\parlai\core\params.py", line 822, in add_model_subargs
agent = load_agent_module(model)
File "C:\Users\carro\Documents\Unity Projects\Tests\SeekerTest\Assets\StreamingAssets\python-3.8.10\parlai\core\loader.py", line 188, in load_agent_module
my_module = importlib.import_module(module_name)
File "importlib\__init__.py", line 127, in import_module
File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 961, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 961, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 973, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'projects.bb3'
The code which I was running, is as follows (stripped down a bit):
Code
class ChatServiceRunner:
def setup_args(self):
"""
Set up args.
:return: A parser that takes in command line arguments for chat services (debug, config-path, password), and a port.
"""
parser = ParlaiParser(False, False)
parser.add_argument('--datapath', default=self.dataPath)
parser.add_argument('--download-path', default=self.downloadPath)
parser.add_argument('--init-opt', default="gen/r2c2_bb3")
parser_grp = parser.add_argument_group('Websockets')
parser_grp.add_argument('--port', default=34500, type=int, help='Port to run the browser chat server')
parser_grp.add_argument('--debug', dest='is_debug', action='store_true', help='print and log all server interactions and messages',)
parser_grp.add_argument(
'--password',
dest='password',
type=str,
default=None,
help='Require a password for entry to the bot',
)
return parser.parse_args()
def __init__(self, _corePath):
self.corePath = _corePath
self.appPath = os.path.normpath(os.getcwd() + os.sep + os.pardir + os.sep + os.pardir) #selects parent dir two levels up
self.dataPath = os.path.join(self.appPath, "ModelData")
self.downloadPath = os.path.join(self.appPath, "Downloads")
print(self.dataPath)
self.opt = self.setup_args()
Any ideas what could be causing this?
I've installed ParlAI via zip download today, then running setup.py.
Perhaps related to #4731 ?
These commands should work if you have installed directly from source.
We have not made a formal pip release yet including BB3, but that is imminent.
These commands should work if you have installed directly from source.
We have not made a formal
piprelease yet including BB3, but that is imminent.
Thanks Kurt, will try installing again
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.