From bc4f16ca6f4bcb938683086c0eb325366729cd25 Mon Sep 17 00:00:00 2001 From: dongdaxiang Date: Mon, 17 Dec 2018 10:24:46 +0800 Subject: [PATCH] remove some comments --- paddle/fluid/API.spec | 4 ++-- python/paddle/fluid/distributed/helper.py | 6 +----- python/paddle/fluid/distributed/node.py | 4 ---- python/paddle/fluid/distributed/ps_instance.py | 3 --- 4 files changed, 3 insertions(+), 14 deletions(-) diff --git a/paddle/fluid/API.spec b/paddle/fluid/API.spec index e15694514..fe2ee3f98 100644 --- a/paddle/fluid/API.spec +++ b/paddle/fluid/API.spec @@ -37,14 +37,14 @@ paddle.fluid.DataFeedDesc.desc ArgSpec(args=['self'], varargs=None, keywords=Non paddle.fluid.DataFeedDesc.set_batch_size ArgSpec(args=['self', 'batch_size'], varargs=None, keywords=None, defaults=None) paddle.fluid.DataFeedDesc.set_dense_slots ArgSpec(args=['self', 'dense_slots_name'], varargs=None, keywords=None, defaults=None) paddle.fluid.DataFeedDesc.set_use_slots ArgSpec(args=['self', 'use_slots_name'], varargs=None, keywords=None, defaults=None) -paddle.fluid.AsyncExecutor.__init__ ArgSpec(args=['self', 'place'], varargs=None, keywords=None, defaults=(None,)) +paddle.fluid.AsyncExecutor.__init__ ArgSpec(args=['self', 'place', 'run_mode'], varargs=None, keywords=None, defaults=(None, '')) paddle.fluid.AsyncExecutor.config_distributed_nodes ArgSpec(args=['self'], varargs=None, keywords=None, defaults=None) paddle.fluid.AsyncExecutor.download_data ArgSpec(args=['self', 'afs_path', 'local_path', 'fs_default_name', 'ugi', 'file_cnt', 'hadoop_home', 'process_num'], varargs=None, keywords=None, defaults=('$HADOOP_HOME', 12)) paddle.fluid.AsyncExecutor.get_instance ArgSpec(args=['self'], varargs=None, keywords=None, defaults=None) paddle.fluid.AsyncExecutor.init_model ArgSpec(args=['self'], varargs=None, keywords=None, defaults=None) paddle.fluid.AsyncExecutor.init_server ArgSpec(args=['self', 'dist_desc'], varargs=None, keywords=None, defaults=None) paddle.fluid.AsyncExecutor.init_worker ArgSpec(args=['self', 'dist_desc', 'startup_program'], varargs=None, keywords=None, defaults=None) -paddle.fluid.AsyncExecutor.run ArgSpec(args=['self', 'program', 'data_feed', 'filelist', 'thread_num', 'fetch', 'debug'], varargs=None, keywords=None, defaults=(False,)) +paddle.fluid.AsyncExecutor.run ArgSpec(args=['self', 'program', 'data_feed', 'filelist', 'thread_num', 'fetch', 'mode', 'debug'], varargs=None, keywords=None, defaults=('', False)) paddle.fluid.AsyncExecutor.save_model ArgSpec(args=['self', 'save_path'], varargs=None, keywords=None, defaults=None) paddle.fluid.AsyncExecutor.stop ArgSpec(args=['self'], varargs=None, keywords=None, defaults=None) paddle.fluid.io.save_vars ArgSpec(args=['executor', 'dirname', 'main_program', 'vars', 'predicate', 'filename'], varargs=None, keywords=None, defaults=(None, None, None, None)) diff --git a/python/paddle/fluid/distributed/helper.py b/python/paddle/fluid/distributed/helper.py index cdde5403c..06d3d0315 100644 --- a/python/paddle/fluid/distributed/helper.py +++ b/python/paddle/fluid/distributed/helper.py @@ -28,7 +28,7 @@ class FileSystem(object): def __init__(self, fs_type="afs", - uri="afs://tianqi.afs.baidu.com:9902", + uri="afs://xx", user=None, passwd=None, hadoop_bin=""): @@ -37,10 +37,6 @@ class FileSystem(object): assert hadoop_bin != None import ps_pb2 as pslib self.fs_client = pslib.FsClientParameter() - #if fs_type == "afs": - # fs_client.fs_type = pslib.FsApiType.AFS - #else: - # fs_client.fs_type = pslib.FsApiType.HDFS self.fs_client.uri = uri self.fs_client.user = user self.fs_client.passwd = passwd diff --git a/python/paddle/fluid/distributed/node.py b/python/paddle/fluid/distributed/node.py index 117da9cff..41e0d64e0 100644 --- a/python/paddle/fluid/distributed/node.py +++ b/python/paddle/fluid/distributed/node.py @@ -75,8 +75,6 @@ class DownpourServer(Server): table.accessor.embedx_dim = 8 table.accessor.embedx_threshold = 5 table.accessor.fea_dim = 11 - #table.accessor.fea_dim = abs(reduce(lambda x, y: x * y, - # slot_value_var[0].shape, 1)) table.accessor.downpour_accessor_param.nonclk_coeff = 0.1 table.accessor.downpour_accessor_param.click_coeff = 2 table.accessor.downpour_accessor_param.base_threshold = 0.2 @@ -134,8 +132,6 @@ class DownpourWorker(Worker): def __init__(self, window): self.window = window self.worker_ = pslib.DownpourTrainerParameter() - #self.worker_.pull_dense_per_batch = window - #self.worker_.push_dense_per_batch = window def add_sparse_table(self, table_id, learning_rate, slot_key_vars, slot_value_vars): diff --git a/python/paddle/fluid/distributed/ps_instance.py b/python/paddle/fluid/distributed/ps_instance.py index 91f53102b..d3ce3ce69 100644 --- a/python/paddle/fluid/distributed/ps_instance.py +++ b/python/paddle/fluid/distributed/ps_instance.py @@ -59,9 +59,6 @@ class PaddlePSInstance(object): else: self._node_type = -1 - #if self._rankid == 0: - #print "node type: ", self._node_type - def _split_comm(self): if self.is_server(): self._comm = self.dh.comm.Split(self._node_type) -- GitLab