提交 c073bb3b 编写于 作者: T tangwei12

code style

上级 298588f8
...@@ -382,8 +382,7 @@ class Operator(object): ...@@ -382,8 +382,7 @@ class Operator(object):
'rnn_memory_helper_grad', 'conditional_block', 'while', 'send', 'recv', 'rnn_memory_helper_grad', 'conditional_block', 'while', 'send', 'recv',
'listen_and_serv', 'parallel_do', 'save_combine', 'load_combine', 'listen_and_serv', 'parallel_do', 'save_combine', 'load_combine',
'ncclInit', 'channel_create', 'channel_close', 'channel_send', 'ncclInit', 'channel_create', 'channel_close', 'channel_send',
'channel_recv', 'select', 'checkpoint_notify' 'channel_recv', 'select', 'checkpoint_notify', 'gen_nccl_id'
, 'gen_nccl_id'
} }
def __init__(self, def __init__(self,
......
...@@ -865,16 +865,17 @@ class DistributeTranspiler: ...@@ -865,16 +865,17 @@ class DistributeTranspiler:
""" """
import os import os
pserver_program.global_block().create_var(name="loopup_table_path", persistable=True, type=core.VarDesc.VarType.RAW) pserver_program.global_block().create_var(
name="loopup_table_path",
persistable=True,
type=core.VarDesc.VarType.RAW)
checkpoint_save_block = pserver_program.create_block(pre_block_idx) checkpoint_save_block = pserver_program.create_block(pre_block_idx)
checkpoint_save_block.append_op( checkpoint_save_block.append_op(
type='save', type='save',
inputs={'X': [self.table_name]}, inputs={'X': [self.table_name]},
outputs={}, outputs={},
attrs={ attrs={'file_path': self.table_name})
'file_path': self.table_name
})
return checkpoint_save_block.idx return checkpoint_save_block.idx
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册