提交 6d107b0f 编写于 作者: M minqiyang

Fix the test_desc_clone's problem

上级 6d9b9cb4
......@@ -192,12 +192,6 @@ function build() {
cd ${PADDLE_ROOT}/build
cat <<EOF
============================================
CPUINFO ...
============================================
EOF
cat /proc/cpuinfo
cat <<EOF
============================================
Building in /paddle/build ...
============================================
EOF
......
......@@ -120,7 +120,7 @@ def reader_creator(data_file,
file = file.strip()
batch = None
with open(file, 'rb') as f:
batch = pickle.load(f)
batch = pickle.loads(f.read())
data = batch['data']
labels = batch['label']
for sample, label in zip(data, batch['label']):
......
......@@ -64,7 +64,7 @@ if(WITH_DISTRIBUTE)
endif()
py_test_modules(test_parallel_executor_crf MODULES test_parallel_executor_crf SERIAL)
py_test_modules(test_parallel_executor_fetch_feed MODULES test_parallel_executor_fetch_feed SERIAL)
set_tests_properties(test_parallel_executor_fetch_feed PROPERTIES TIMEOUT 300)
set_tests_properties(test_parallel_executor_fetch_feed PROPERTIES TIMEOUT 500)
py_test_modules(test_dist_transformer MODULES test_dist_transformer SERIAL)
py_test_modules(test_dist_se_resnext MODULES test_dist_se_resnext SERIAL)
py_test_modules(test_parallel_executor_transformer MODULES test_parallel_executor_transformer SERIAL)
......
......@@ -120,8 +120,8 @@ def operator_equal(a, b):
raise ValueError("In operator_equal not equal:{0}\n".format(k))
elif isinstance(v, collections.OrderedDict):
v0 = sorted(six.iteritems(v), key=lambda x: x[0])
v1 = sorted(six.iteritems(b.__dict__[k]), key=lambda x: x[0])
v0 = sorted(list(six.iteritems(v)), key=lambda x: x[0])
v1 = sorted(list(six.iteritems(b.__dict__[k])), key=lambda x: x[0])
if v0 != v1:
raise ValueError("In operator_equal not equal:{0}\n".format(k))
......@@ -139,17 +139,15 @@ def block_equal(a, b):
continue
elif k == "ops":
assert (len(a.ops) == len(b.ops))
for i in range(0, len(a.ops)):
if not operator_equal(a.ops[i], b.ops[i]):
raise ValueError("In block_equal not equal:{0}\n".format(k))
assert (len(a.ops) == len(b.ops))
elif isinstance(v, collections.OrderedDict):
v0 = sorted(six.iteritems(v), key=lambda x: x[0])
v1 = sorted(six.iteritems(b.__dict__[k]), key=lambda x: x[0])
if v0 != v1:
raise ValueError("In block_equal not equal:{0}\n".format(k))
for key, value in six.iteritems(v):
if str(value) != str(b.__dict__[k][key]):
raise ValueError("In block_equal not equal:{0}\n".format(k))
elif (v != b.__dict__[k]):
raise ValueError("In block_equal not equal:{0}\n".format(k))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册