Skip to content

Commit

Permalink
test=develop
Browse files Browse the repository at this point in the history
  • Loading branch information
xjqbest committed Aug 6, 2020
1 parent 68e2363 commit a07cc1f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 42 deletions.
1 change: 0 additions & 1 deletion python/paddle/fleet/dataset/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
from paddle.fluid.proto import data_feed_pb2
from google.protobuf import text_format
import paddle.fluid.core as core
__all__ = ['DatasetFactory', 'InMemoryDataset', 'QueueDataset']


class DatasetFactory(object):
Expand Down
43 changes: 2 additions & 41 deletions python/paddle/fluid/tests/unittests/test_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -896,9 +896,6 @@ def test_dataset_fleet2(self):
"""
Testcase for InMemoryDataset from create to run.
"""

self.skipTest("parameter server will add pslib UT later")

with open("test_in_memory_dataset2_run2_a.txt", "w") as f:
data = "1 1 2 3 3 4 5 5 5 5 1 1\n"
data += "1 2 2 3 4 4 6 6 6 6 1 2\n"
Expand All @@ -914,7 +911,7 @@ def test_dataset_fleet2(self):
train_program = fluid.Program()
startup_program = fluid.Program()
scope = fluid.Scope()
from paddle.fluid.incubate.fleet.parameter_server.distribute_transpiler import fleet
from paddle.fluid.incubate.fleet.parameter_server.pslib import fleet
with fluid.program_guard(train_program, startup_program):
slots = ["slot1_ff", "slot2_ff", "slot3_ff", "slot4_ff"]
slots_vars = []
Expand Down Expand Up @@ -972,10 +969,9 @@ def test_dataset_fleet2(self):
dataset.set_hdfs_config("", "")
d = paddle.fleet.DatasetBase()
try:
d._prepare_to_run()
dataset.set_feed_type("MultiSlotInMemoryDataFeed")
except:
print("warning: catch expected error")
dataset.set_feed_type("MultiSlotInMemoryDataFeed")
dataset.thread_num = 0
try:
dataset._prepare_to_run()
Expand Down Expand Up @@ -1023,41 +1019,6 @@ def test_dataset_fleet2(self):
dataset.global_shuffle()
except:
print("warning: catch expected error")
dataset = paddle.fleet.BoxPSDataset()
dataset.set_date(20200805)
try:
dataset.begin_pass()
except:
print("warning: catch expected error")
try:
dataset.end_pass(False)
except:
print("warning: catch expected error")
try:
dataset.wait_preload_done()
except:
print("warning: catch expected error")
try:
dataset.load_into_memory()
except:
print("warning: catch expected error")
try:
dataset.preload_into_memory()
except:
print("warning: catch expected error")
dataset.is_user_set_queue_num = True
try:
dataset._dynamic_adjust_before_train(1)
except:
print("warning: catch expected error")
try:
dataset._dynamic_adjust_after_train()
except:
print("warning: catch expected error")
try:
dataset.slots_shuffle([])
except:
print("warning: catch expected error")

os.remove("./test_in_memory_dataset2_run2_a.txt")
os.remove("./test_in_memory_dataset2_run2_b.txt")
Expand Down

0 comments on commit a07cc1f

Please sign in to comment.