【问题标题】:How to run a ParlAI Blender chat bot?如何运行 ParlAI Blender 聊天机器人?
【发布时间】:2020-11-12 05:27:46
【问题描述】:

我想玩 Blender 聊天机器人,但快速入门或食谱页面上的大多数脚本都不起作用。例如

来自https://parl.ai/projects/recipes/

python parlai/scripts/safe_interactive.py -t blended_skill_talk -mf zoo:blender/blender_90M/model

我明白了

Traceback (most recent call last):
  File "parlai/scripts/safe_interactive.py", line 11, in <module>
    from parlai.core.params import ParlaiParser
ModuleNotFoundError: No module named 'parlai'

或 来自https://parl.ai/docs/tutorial_quick.html

parlai eval_model -t twitter -mf zoo:blender/blender_90M/model

我明白了

17:28:54 INFO | loading dictionary from /home/jacek/ParlAI/data/models/blender/blender_90M/model.dict
17:28:54 INFO | num words = 54944
Traceback (most recent call last):
  File "/usr/local/bin/parlai", line 11, in <module>
    load_entry_point('parlai', 'console_scripts', 'parlai')()
  File "/home/jacek/ParlAI/parlai/core/script.py", line 266, in superscript_main
    SCRIPT_REGISTRY[cmd].klass._run_from_parser_and_opt(opt, parser)
  File "/home/jacek/ParlAI/parlai/core/script.py", line 88, in _run_from_parser_and_opt
    return script.run()
  File "/home/jacek/ParlAI/parlai/scripts/eval_model.py", line 232, in run
    return eval_model(self.opt, print_parser=self.parser)
  File "/home/jacek/ParlAI/parlai/scripts/eval_model.py", line 198, in eval_model
    agent = create_agent(opt, requireModelExists=True)
  File "/home/jacek/ParlAI/parlai/core/agents.py", line 394, in create_agent
    model = create_agent_from_opt_file(opt)
  File "/home/jacek/ParlAI/parlai/core/agents.py", line 347, in create_agent_from_opt_file
    return model_class(opt_from_file)
  File "/home/jacek/ParlAI/parlai/core/torch_generator_agent.py", line 445, in __init__
    super().__init__(opt, shared)
  File "/home/jacek/ParlAI/parlai/core/torch_agent.py", line 728, in __init__
    self.dict = self.build_dictionary()
  File "/home/jacek/ParlAI/parlai/core/torch_agent.py", line 812, in build_dictionary
    d = self.dictionary_class()(self.opt)
  File "/home/jacek/ParlAI/parlai/core/dict.py", line 305, in __init__
    self.bpe = bpe_factory(opt, shared)
  File "/home/jacek/ParlAI/parlai/utils/bpe.py", line 80, in bpe_factory
    bpe_helper = SubwordBPEHelper(opt, shared)
  File "/home/jacek/ParlAI/parlai/utils/bpe.py", line 292, in __init__
    raise RuntimeError(
RuntimeError: Please run "pip install 'git+https://github.com/rsennrich/subword-nmt.git#egg=subword-nmt'"

(我尝试进行 pip install 并且它说它已经安装了)

之后

parlai train_model -t babi:task10k:1 -mf /tmp/babi_memnn -bs 1 -nt 4 -eps 5 -m memnn --no-cuda

我明白了

Parse Error: argument -mtw/--multitask-weights: invalid 'multitask_weights' value: 'memnn'

虽然我认为我自己应该有一个“--model”标志而不是“-m”。

我猜所有这些都是一些配置错误的结果。不过,我已经使用快速入门页面上提供的说明安装了 ParlAI、Python 和 PyTorch。

系统信息:Ubuntu 20.04 LTS、Intel® Core™ i7-9750H CPU @ 2.60GHz × 12、31.2 GiB RAM、GeForce GTX 1660 Ti/PCIe/SSE2。

我卡住了,请帮忙。

【问题讨论】:

    标签: python ubuntu parlai blenderbot


    【解决方案1】:

    对我来说,Blender 在不到 10 分钟内就完成了开箱即用。 实际上,我很惊喜地发现它运行起来如此简单。

    【讨论】:

    • 我安装了(几乎)干净的 Ubuntu 20.04。您是按照 Parl Ai 上的说明进行操作还是使用了其他方式?另外,为了确定——我们谈论的是 Parl AI python 框架,而不是图形软件。
    • 是的,这就是为什么 Blender 被重命名为 BlenderBot 以避免混淆。
    • 我在 Mac 上运行。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2018-07-30
    • 2022-12-23
    • 1970-01-01
    • 1970-01-01
    • 2012-10-24
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多