-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Remove utils/CommandLineParser.h #989
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
Conversation
@@ -152,7 +152,7 @@ void initMain(int argc, char** argv) { | |||
line += ' '; | |||
} | |||
LOG(INFO) << "commandline: " << line; | |||
ParseCommandLineFlags(&argc, argv, true); | |||
gflags::ParseCommandLineFlags(&argc, &argv, true); |
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.
有个bug,gflags的namespace不一定是gflags。
gflags的不同版本里面有区别。这个namespace有的时候是google,有的时候是gflags
paddle/utils/CommandLineParser.cpp 这里有对namespace的特殊性进行处理。。
不过,如果我们依赖确定某个版本的gflags就没这个问题了。。。
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.
我之前也check了一下,应该是老版有这个问题
Line 159 in 46bd5f5
# First try the (older) google namespace. Note that the output variable |
@@ -152,6 +152,11 @@ void initMain(int argc, char** argv) { | |||
line += ' '; | |||
} | |||
LOG(INFO) << "commandline: " << line; | |||
|
|||
#ifndef GFLAGS_GFLAGS_H_ |
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.
后期可以移到common.h
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.
Excellent.
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.
@@ -152,6 +152,11 @@ void initMain(int argc, char** argv) { | |||
line += ' '; | |||
} | |||
LOG(INFO) << "commandline: " << line; | |||
|
|||
#ifndef GFLAGS_GFLAGS_H_ |
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.
Excellent.
* add bart * add unimo * add roberta * add roformer * modify transformer-rst
#956
Follow C++ style: https://github.com/PaddlePaddle/cpp-primer-digest/blame/master/README.md#L63