fluid1.6 fleet 单机模拟多机: 'TRAINING_ROLE' not found
Created by: LihangLiu
在fluid1.6上按照 quickstart来跑单机模拟多机
python -m paddle.distributed.launch_ps --worker_num 2 --server_num 2 train.py
出现如下错误:
Traceback (most recent call last):
File "fleet-demo.py", line 46, in <module>
fleet.init(role)
File "/home/ol/anaconda2/envs/official/lib/python2.7/site-packages/paddle/fluid/incubate/fleet/base/fleet_base.py", line 202, in init
self._role_maker.generate_role()
File "/home/ol/anaconda2/envs/official/lib/python2.7/site-packages/paddle/fluid/incubate/fleet/base/role_maker.py", line 352, in generate_role
training_role = os.environ["TRAINING_ROLE"]
File "/home/ol/anaconda2/envs/official/lib/python2.7/UserDict.py", line 40, in __getitem__
raise KeyError(key)
KeyError: 'TRAINING_ROLE'
系统信息:centos,fluid1.6 cpu版本。