From ebae6fb6b90f7d2db727eea7e6664ceca6992280 Mon Sep 17 00:00:00 2001 From: xujiaqi01 <173596896@qq.com> Date: Fri, 3 Apr 2020 18:10:02 +0800 Subject: [PATCH] fix gen_worker_desc in hogwild (#23423) * fix gen_worker_desc in hogwild, it may cause error in transpile mode * test=develop --- python/paddle/fluid/device_worker.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/python/paddle/fluid/device_worker.py b/python/paddle/fluid/device_worker.py index 1035e405a37..59aaea0fb49 100644 --- a/python/paddle/fluid/device_worker.py +++ b/python/paddle/fluid/device_worker.py @@ -97,7 +97,8 @@ class Hogwild(DeviceWorker): print("program of current device worker is not configured") exit(-1) opt_info = self._program._fleet_opt - if opt_info is None: + # when opt_info is None or empty dict, it should return + if not opt_info: return program_configs = opt_info["program_configs"] -- GitLab