未验证 提交 e3766da6 编写于 作者: K kuizhiqing 提交者: GitHub

[LAUNCH] fix set args bug (#44717)

上级 5d94618d
...@@ -101,7 +101,6 @@ class Context(object): ...@@ -101,7 +101,6 @@ class Context(object):
return False return False
def set_env_in_args(self): def set_env_in_args(self):
# this logic may not propre to replace args with env, but ...
for k, v in env_args_mapping.items(): for k, v in env_args_mapping.items():
if k in self.envs: if k in self.envs:
setattr(self.args, v, type(getattr(self.args, v))(self.envs[k])) setattr(self.args, v, self.envs[k])
...@@ -131,7 +131,8 @@ class CollectiveElasticController(CollectiveController): ...@@ -131,7 +131,8 @@ class CollectiveElasticController(CollectiveController):
def run(self): def run(self):
timeout = self.ctx.args.elastic_timeout if self.job.elastic else self.ctx.args.elastic_timeout * 10 timeout = int(self.ctx.args.elastic_timeout)
timeout = timeout if self.job.elastic else timeout * 10
self.register() self.register()
while self.pod.restart <= self.ctx.args.max_restart: while self.pod.restart <= self.ctx.args.max_restart:
......
...@@ -62,7 +62,7 @@ def rewrite_host_ip(ctx): ...@@ -62,7 +62,7 @@ def rewrite_host_ip(ctx):
def test_mode(ctx): def test_mode(ctx):
if ctx.args.training_script == 'test': if ctx.args.training_script == 'run_check':
ctx.logger.info('Paddle Distributed Test begin...') ctx.logger.info('Paddle Distributed Test begin...')
if int(ctx.args.nnodes) < 2: if int(ctx.args.nnodes) < 2:
ctx.args.nnodes = 2 ctx.args.nnodes = 2
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册