未验证 提交 6550c203 编写于 作者: Z zhangchunle 提交者: GitHub

fix too-many-function-args-1 (#33398)

上级 a4dd4c40
...@@ -167,8 +167,8 @@ def run_convert(): ...@@ -167,8 +167,8 @@ def run_convert():
os.path.getsize(output_file) == FULL_SIZE_BYTES): os.path.getsize(output_file) == FULL_SIZE_BYTES):
if os.path.exists(output_file): if os.path.exists(output_file):
sys.stderr.write( sys.stderr.write(
"\n\nThe existing binary file is broken. Start to generate new one...\n\n" "\n\nThe existing binary file[{}] is broken. Start to generate new one...\n\n".
) format(output_file))
os.remove(output_file) os.remove(output_file)
if retry < try_limit: if retry < try_limit:
retry = retry + 1 retry = retry + 1
......
...@@ -133,7 +133,7 @@ class TestGradientClip(unittest.TestCase): ...@@ -133,7 +133,7 @@ class TestGradientClip(unittest.TestCase):
print(val) print(val)
self.assertFalse(np.isnan(val)) self.assertFalse(np.isnan(val))
def backward_and_optimize(cost): def backward_and_optimize(self, cost):
pass pass
......
...@@ -434,9 +434,10 @@ class MultiThread(GradAllReduce): ...@@ -434,9 +434,10 @@ class MultiThread(GradAllReduce):
print("total endpoints: ", self.endpoints) print("total endpoints: ", self.endpoints)
print("rank: %d, ring_id: %d" % (self.rank, self.nrings)) print("rank: %d, ring_id: %d" % (self.rank, self.nrings))
for ring_id in range(self.nrings): for ring_id in range(self.nrings):
self._init_communicator( self._init_communicator(self.startup_program,
self.startup_program, self.current_endpoint, self.endpoints, self.current_endpoint, self.endpoints,
self.rank, ring_id, self.wait_port, True) self.rank, ring_id, self.wait_port)
else: else:
print("begin to _transpile_startup_program for single-node") print("begin to _transpile_startup_program for single-node")
block = self.startup_program.global_block() block = self.startup_program.global_block()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册