From c073bb3b2c1381d2967785b956381be231fa6583 Mon Sep 17 00:00:00 2001 From: tangwei12 Date: Wed, 20 Jun 2018 12:51:44 +0800 Subject: [PATCH] code style --- python/paddle/fluid/framework.py | 7 +++---- python/paddle/fluid/transpiler/distribute_transpiler.py | 9 +++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/python/paddle/fluid/framework.py b/python/paddle/fluid/framework.py index c389c4aef..ca1184527 100644 --- a/python/paddle/fluid/framework.py +++ b/python/paddle/fluid/framework.py @@ -382,8 +382,7 @@ class Operator(object): 'rnn_memory_helper_grad', 'conditional_block', 'while', 'send', 'recv', 'listen_and_serv', 'parallel_do', 'save_combine', 'load_combine', 'ncclInit', 'channel_create', 'channel_close', 'channel_send', - 'channel_recv', 'select', 'checkpoint_notify' - , 'gen_nccl_id' + 'channel_recv', 'select', 'checkpoint_notify', 'gen_nccl_id' } def __init__(self, @@ -1022,7 +1021,7 @@ class Block(object): name=var.name, persistable=var.persistable, type=var.type) elif var.type == core.VarDesc.VarType.RAW: ret_var = self.create_var( - name=var.name, persistable=var.persistable, type=var.type) + name=var.name, persistable=var.persistable, type=var.type) elif var.type == core.VarDesc.VarType.SELECTED_ROWS: ret_var = self.create_var( name=var.name, @@ -1465,7 +1464,7 @@ def get_var(name, program=None): Args: name(str): name of the variable program(Program|None): program object. - If None, default_global_program() will be used. + If None, default_global_program() will be used. Returns: Variable diff --git a/python/paddle/fluid/transpiler/distribute_transpiler.py b/python/paddle/fluid/transpiler/distribute_transpiler.py index b9c67dbf9..5bbeeeaed 100644 --- a/python/paddle/fluid/transpiler/distribute_transpiler.py +++ b/python/paddle/fluid/transpiler/distribute_transpiler.py @@ -865,16 +865,17 @@ class DistributeTranspiler: """ 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.append_op( type='save', inputs={'X': [self.table_name]}, outputs={}, - attrs={ - 'file_path': self.table_name - }) + attrs={'file_path': self.table_name}) return checkpoint_save_block.idx -- GitLab