diff --git a/python/paddle/fluid/device_worker.py b/python/paddle/fluid/device_worker.py index 1035e405a3710ea15fe28a453c63f5efd15337e6..59aaea0fb490a35c6e5a6d734bcb86f29929721e 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"]