-
Notifications
You must be signed in to change notification settings - Fork 5.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test code for issue #729 #734
Conversation
@@ -16,20 +16,23 @@ if [ -z $1 ]; then | |||
do | |||
base_protostr=$protostr/$file | |||
new_protostr=$protostr/$file.unittest | |||
diff $base_protostr $new_protostr -u | |||
diff $base_protostr $new_protostr -u && | |||
diff $protostr/$file $protostr/$file.non_file_config.unittest -u | |||
done | |||
else | |||
for file in ${configs[*]} | |||
do | |||
if ! $1 $protostr/$file.protostr $protostr/$file.protostr.unittest; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually in this branch, if statement used for check whether is different between $protostr/$file.protostr
$protostr/$file.protostr.unittest
. The rest diff
command just used to show where is the difference.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See #657
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
@@ -16,20 +16,23 @@ if [ -z $1 ]; then | |||
do | |||
base_protostr=$protostr/$file | |||
new_protostr=$protostr/$file.unittest | |||
diff $base_protostr $new_protostr -u | |||
diff $base_protostr $new_protostr -u && |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
because of set -e
is added, &&
is not needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok
fi | ||
done | ||
|
||
for file in ${whole_configs[*]} | ||
do | ||
do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bad indent.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok
|
||
import sys | ||
import getopt | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add
if __name__ == '__main__'
to python code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After #450 PR, Developing Paddle need use pre-commit
tools to check code style, auto-format code, etc. Please try to use pre-commit
tool.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok
|
||
cmdstr = """ | ||
from paddle.trainer.config_parser import * | ||
from paddle.trainer_config_helpers import * |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This implementation is too tricky. Maybe the simplest implementation is just to write a single file to test parse_config
from a python function with a very simple neural network. Although the test-coverage is not full we could test this mechanism work well or not.
其他点都按照你说的修改。 |
See #450; we use this tool to manage our pre-commit.
不是的。在这个分支中,是if语句在判断两个protofile是不是一致,而不是后面的diff语句。后面的diff语句仅仅是作为错误输出提示用户的。 所以,那个if语句,应该改成类似于
这里有一个问题,是import的东西可能不仅仅是这两个包。用户也可以 其实,应该将生成的脚本改成类似于
|
已经按照要求进行了修改。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. THX.
fix the kubectl address test=develop
test code for issue #729