安装Facebook的ParlAI

运行案例:
环境要求

py3

zeromq

必备环境:
python3

ZeroMq 下载地址:http://zeromq.org/distro:microsoft-windows

 

安装命令过程:

git clone https://github.com/facebookresearch/ParlAI.git
cd ParlAI
python setup.py develop

安装问题列表:

问题一

UnicodeDecodeError: 'gbk' codec can't decode byte 0x9d in position 1270: illega
解决方法:我把setup.py代码稍加修改了。 都是utf-8的 我这里很疑惑
去掉:
with open('LICENSE') as f:
    license = f.read()

with open('requirements.txt') as f:
    reqs = f.read()
初始化:
 license='',
 long_description='',

问题二:


“error: Microsoft Visual C++ 14.0 is required..
解决办法:

手工安装

pip install pyzmq

 问题三:


AttributeError: module 'parlai.tasks.babi.agents' has no attribute 'create_agents'
TimeoutError: [WinError 10060] 由于连接方在一段时间后没有正确答复或连接的主机没
有反应,连接尝试失败。
解决办法:
安装ZeroMq 

 

运行案例:

F:\py\parlai\ParlAI>python examples/display_data.py -t babi:task1k:1
[no_images:False]
[download_path:f:\py\parlai\parlai\downloads]
[task:babi:task1k:1]
[datatype:train]
[batchsize:1]
[num_examples:10]
[numthreads:1]
[parlai_home:f:\py\parlai\parlai]
[datapath:f:\py\parlai\parlai\data]
[creating task(s): babi:task1k:1]
[building data: f:\py\parlai\parlai\data\bAbI]
100% [....................................................] 19212062 / 19212062
unpacking babi.tar.gz
[DialogTeacher initializing.]
[loading fbdialog data:f:\py\parlai\parlai\data\bAbI\tasks_1-20_v1-2\en-valid-n
sf\qa1_train.txt]
[babi:task1k:1]: Mary travelled to the garden.
Daniel went to the office.
Where is Daniel?
[labels: office]
[cands: garden|kitchen|office|bedroom|bathroom|hallway]
   [RepeatLabelAgent]: office
~~
[babi:task1k:1]: Daniel travelled to the kitchen.
Sandra journeyed to the kitchen.
Where is Daniel?
[labels: kitchen]
[cands: garden|kitchen|office|bedroom|bathroom|hallway]
   [RepeatLabelAgent]: kitchen
~~
[babi:task1k:1]: Mary went back to the hallway.
Daniel went to the bedroom.
Where is Daniel?
[labels: bedroom]
[cands: garden|kitchen|office|bedroom|bathroom|hallway]
   [RepeatLabelAgent]: bedroom
~~
[babi:task1k:1]: Mary moved to the bathroom.
Sandra journeyed to the bathroom.
Where is Mary?
[labels: bathroom]
[cands: garden|kitchen|office|bedroom|bathroom|hallway]
   [RepeatLabelAgent]: bathroom
~~
[babi:task1k:1]: John journeyed to the garden.
Sandra went to the garden.
Where is Sandra?
[labels: garden]
[cands: garden|kitchen|office|bedroom|bathroom|hallway]
   [RepeatLabelAgent]: garden
- - - - - - - - - - - - - - - - - - - - -
~~
[babi:task1k:1]: Mary travelled to the bedroom.
Daniel travelled to the office.
Where is Mary?
[labels: bedroom]
[cands: garden|kitchen|office|bedroom|bathroom|hallway]
   [RepeatLabelAgent]: bedroom
~~
[babi:task1k:1]: Daniel journeyed to the hallway.
Mary travelled to the hallway.
Where is Mary?
[labels: hallway]
[cands: garden|kitchen|office|bedroom|bathroom|hallway]
   [RepeatLabelAgent]: hallway
~~
[babi:task1k:1]: Sandra travelled to the kitchen.
Mary travelled to the kitchen.
Where is Daniel?
[labels: hallway]
[cands: garden|kitchen|office|bedroom|bathroom|hallway]
   [RepeatLabelAgent]: hallway
~~
[babi:task1k:1]: John journeyed to the garden.
Daniel went to the bathroom.
Where is Sandra?
[labels: kitchen]
[cands: garden|kitchen|office|bedroom|bathroom|hallway]
   [RepeatLabelAgent]: kitchen
~~
[babi:task1k:1]: Daniel moved to the garden.
John went to the kitchen.
Where is Daniel?
[labels: garden]
[cands: garden|kitchen|office|bedroom|bathroom|hallway]
   [RepeatLabelAgent]: garden
- - - - - - - - - - - - - - - - - - - - -
~~

 

转载于:https://my.oschina.net/u/169565/blog/903774

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值