Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
BaiXuePrincess
Paddle
提交
64022143
P
Paddle
项目概览
BaiXuePrincess
/
Paddle
与 Fork 源项目一致
Fork自
PaddlePaddle / Paddle
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
64022143
编写于
1月 13, 2017
作者:
Y
Yu Yang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix unittest
上级
6243853f
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
14 addition
and
21 deletion
+14
-21
python/paddle/trainer_config_helpers/tests/CMakeLists.txt
python/paddle/trainer_config_helpers/tests/CMakeLists.txt
+6
-14
python/paddle/trainer_config_helpers/tests/configs/run_tests.sh
.../paddle/trainer_config_helpers/tests/configs/run_tests.sh
+8
-6
python/paddle/utils/dump_config.py
python/paddle/utils/dump_config.py
+0
-1
未找到文件。
python/paddle/trainer_config_helpers/tests/CMakeLists.txt
浏览文件 @
64022143
...
@@ -9,17 +9,9 @@ add_test(NAME test_reset_hook
...
@@ -9,17 +9,9 @@ add_test(NAME test_reset_hook
${
PYTHON_EXECUTABLE
}
${
PROJ_ROOT
}
/python/paddle/trainer_config_helpers/tests/test_reset_hook.py
${
PYTHON_EXECUTABLE
}
${
PROJ_ROOT
}
/python/paddle/trainer_config_helpers/tests/test_reset_hook.py
WORKING_DIRECTORY
${
PROJ_ROOT
}
/python/paddle
)
WORKING_DIRECTORY
${
PROJ_ROOT
}
/python/paddle
)
if
(
PROTOBUF_3
)
add_paddle_exe
(
protobuf_equal ProtobufEqualMain.cpp
)
add_paddle_exe
(
protobuf_equal
add_test
(
NAME test_layerHelpers
ProtobufEqualMain.cpp
)
add_test
(
NAME test_layerHelpers
COMMAND
COMMAND
${
PROJ_ROOT
}
/python/paddle/trainer_config_helpers/tests/configs/run_tests.sh
${
PYTHON_EXECUTABLE
}
${
PROJ_ROOT
}
/python/paddle/trainer_config_helpers/tests/configs/run_tests.sh
${
PYTHON_EXECUTABLE
}
${
CMAKE_CURRENT_BINARY_DIR
}
/protobuf_equal
${
CMAKE_CURRENT_BINARY_DIR
}
/protobuf_equal
)
)
else
()
add_test
(
NAME test_layerHelpers
COMMAND
${
PROJ_ROOT
}
/python/paddle/trainer_config_helpers/tests/configs/run_tests.sh
${
PYTHON_EXECUTABLE
}
)
endif
()
python/paddle/trainer_config_helpers/tests/configs/run_tests.sh
浏览文件 @
64022143
...
@@ -2,16 +2,18 @@
...
@@ -2,16 +2,18 @@
cd
`
dirname
$0
`
cd
`
dirname
$0
`
set
-e
set
-e
PYTHON_EXEC
=
$1
COMPARE_PROTO_UTIL
=
$2
protostr
=
`
dirname
$0
`
/protostr
protostr
=
`
dirname
$0
`
/protostr
files
=
`
ls
$protostr
|
grep
-v
"unittest"
`
files
=
`
ls
$protostr
|
grep
-v
"unittest"
`
./generate_protostr.sh
$
1
./generate_protostr.sh
$
{
PYTHON_EXEC
}
.
./file_list.sh
.
./file_list.sh
if
[
-z
$
1
]
;
then
if
[
-z
$
{
COMPARE_PROTO_UTIL
}
]
;
then
for
file
in
$files
for
file
in
$files
do
do
base_protostr
=
$protostr
/
$file
base_protostr
=
$protostr
/
$file
...
@@ -22,20 +24,20 @@ if [ -z $1 ]; then
...
@@ -22,20 +24,20 @@ if [ -z $1 ]; then
else
else
for
file
in
${
configs
[*]
}
for
file
in
${
configs
[*]
}
do
do
if
!
$
1
$protostr
/
$file
.protostr
$protostr
/
$file
.protostr.unittest
;
then
if
!
$
{
COMPARE_PROTO_UTIL
}
$protostr
/
$file
.protostr
$protostr
/
$file
.protostr.unittest
;
then
diff
$protostr
/
$file
.protostr
$protostr
/
$file
.protostr.unittest
-u
diff
$protostr
/
$file
.protostr
$protostr
/
$file
.protostr.unittest
-u
fi
fi
if
!
$
1
$protostr
/
$file
.protostr
$protostr
/
$file
.protostr.non_file_config.unittest
;
then
if
!
$
{
COMPARE_PROTO_UTIL
}
$protostr
/
$file
.protostr
$protostr
/
$file
.protostr.non_file_config.unittest
;
then
diff
$protostr
/
$file
.protostr
$protostr
/
$file
.protostr.non_file_config.unittest
-u
diff
$protostr
/
$file
.protostr
$protostr
/
$file
.protostr.non_file_config.unittest
-u
fi
fi
done
done
for
file
in
${
whole_configs
[*]
}
for
file
in
${
whole_configs
[*]
}
do
do
if
!
$
1
$protostr
/
$file
.protostr
$protostr
/
$file
.protostr.unittest
--whole
;
then
if
!
$
{
COMPARE_PROTO_UTIL
}
$protostr
/
$file
.protostr
$protostr
/
$file
.protostr.unittest
--whole
;
then
diff
$protostr
/
$file
.protostr
$protostr
/
$file
.protostr.unittest
-u
diff
$protostr
/
$file
.protostr
$protostr
/
$file
.protostr.unittest
-u
fi
fi
if
!
$
1
$protostr
/
$file
.protostr
$protostr
/
$file
.protostr.non_file_config.unittest
--whole
;
then
if
!
$
{
COMPARE_PROTO_UTIL
}
$protostr
/
$file
.protostr
$protostr
/
$file
.protostr.non_file_config.unittest
--whole
;
then
diff
$protostr
/
$file
.protostr
$protostr
/
$file
.protostr.non_file_config.unittest
-u
diff
$protostr
/
$file
.protostr
$protostr
/
$file
.protostr.non_file_config.unittest
-u
fi
fi
done
done
...
...
python/paddle/utils/dump_config.py
浏览文件 @
64022143
...
@@ -21,7 +21,6 @@ __all__ = []
...
@@ -21,7 +21,6 @@ __all__ = []
if
__name__
==
'__main__'
:
if
__name__
==
'__main__'
:
whole_conf
=
False
whole_conf
=
False
binary
=
False
binary
=
False
print
sys
.
argv
if
len
(
sys
.
argv
)
==
2
:
if
len
(
sys
.
argv
)
==
2
:
conf
=
parse_config
(
sys
.
argv
[
1
],
''
)
conf
=
parse_config
(
sys
.
argv
[
1
],
''
)
elif
len
(
sys
.
argv
)
==
3
:
elif
len
(
sys
.
argv
)
==
3
:
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录