diff --git a/python/paddle/fluid/incubate/fleet/parameter_server/__init__.py b/python/paddle/fluid/incubate/fleet/parameter_server/__init__.py index 1c49ea1f55e7ea877a56479254efd91753d4ee8a..e976adffa0882d88181d9140c454d9f5bff19865 100644 --- a/python/paddle/fluid/incubate/fleet/parameter_server/__init__.py +++ b/python/paddle/fluid/incubate/fleet/parameter_server/__init__.py @@ -256,10 +256,8 @@ class Fleet(object): trainer_id = self.get_worker_index() trainer_num = self.get_worker_num() if trainer_num > file_num: - raise ValueError( - "trainer_num should be <= file_num : " - "%s > %s" % (trainer_num, file_num) - ) + raise ValueError("trainer_num should be <= file_num : " + "%s > %s" % (trainer_num, file_num)) # get interval of filelist, it's [ ) start = 0 end = 0 @@ -267,7 +265,7 @@ class Fleet(object): length = file_num / trainer_num + (i < (file_num % trainer_num)) start = end end += length - myfilelist = filelist[start : end] + myfilelist = filelist[start:end] return myfilelist def _set_opt_info(self, opt_info):