From 5d5e0656b28b1ec9f27c73aff8bb4edcac719c17 Mon Sep 17 00:00:00 2001 From: Qiao Longfei Date: Mon, 26 Nov 2018 19:02:23 +0800 Subject: [PATCH] clean code --- .../tests/unittests/test_dist_transpiler.py | 51 ------------------- 1 file changed, 51 deletions(-) diff --git a/python/paddle/fluid/tests/unittests/test_dist_transpiler.py b/python/paddle/fluid/tests/unittests/test_dist_transpiler.py index dbc458376..3a905d4a0 100644 --- a/python/paddle/fluid/tests/unittests/test_dist_transpiler.py +++ b/python/paddle/fluid/tests/unittests/test_dist_transpiler.py @@ -582,57 +582,6 @@ class TestDistLookupTable(TestDistLookupTableBase): startup_ops) -class TestRemoteLookupTable(TestDistLookupTableBase): - def net_conf(self): - self.network_with_table( - is_sparse=True, is_distributed=False, remote_prefetch=True) - - def transpiler_test_impl(self): - pserver1, startup1 = self.get_pserver(self.pserver1_ep) - - self.assertEqual(len(pserver1.blocks), 6) - # 0 listen_and_serv - # 1 optimize for fc_w or fc_b adam - self.assertEqual([op.type for op in pserver1.blocks[1].ops], - ["sum", "scale", "adam", "scale", "scale"]) - # 4 prefetch -> lookup_sparse_table for data0 - self.assertEqual([op.type for op in pserver1.blocks[2].ops], - ["sum", "scale", "adam", "scale", "scale"]) - # 2 optimize for table sgd - self.assertEqual([op.type for op in pserver1.blocks[3].ops], - ["sum", "sgd"]) - # 3 prefetch -> lookup_sparse_table for data0 - self.assertEqual([op.type for op in pserver1.blocks[4].ops], - ["lookup_sparse_table"]) - # 5 save table - self.assertEqual([op.type for op in pserver1.blocks[5].ops], ["save"]) - - trainer, trainer_startup = self.get_trainer() - self.assertEqual(len(trainer.blocks), 1) - ops = [ - 'split_ids', 'prefetch', 'merge_ids', 'sequence_pool', - 'sequence_pool', 'lookup_table', 'sequence_pool', 'concat', 'mul', - 'elementwise_add', 'cross_entropy', 'mean', 'fill_constant', - 'mean_grad', 'cross_entropy_grad', 'elementwise_add_grad', 'send', - 'mul_grad', 'send', 'concat_grad', 'sequence_pool_grad', - 'lookup_table_grad', 'split_selected_rows', 'send', - 'sequence_pool_grad', 'lookup_table_grad', 'sequence_pool_grad', - 'lookup_table_grad', 'sum', 'split_ids', 'send', 'send_barrier', - 'recv', 'recv', 'recv', 'fetch_barrier', 'concat' - ] - self.assertEqual([op.type for op in trainer.blocks[0].ops], ops) - startup_ops = [ - 'fill_constant', 'fill_constant', 'fill_constant', 'fill_constant', - 'fill_constant', 'fill_constant', 'fill_constant', 'fill_constant', - 'fill_constant', 'fill_constant', 'fill_constant', 'fill_constant', - 'fill_constant', 'fill_constant', 'uniform_random', - 'uniform_random', 'recv', 'recv', 'recv', 'fetch_barrier', 'concat', - 'fake_init' - ] - self.assertEqual([op.type for op in trainer_startup.blocks[0].ops], - startup_ops) - - class TestAsyncLocalLookupTable(TestDistLookupTableBase): def net_conf(self): self.network_with_table(is_sparse=True, is_distributed=False) -- GitLab