-
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
Contribute and logging #5181
Contribute and logging #5181
Conversation
CONTRIBUTING.md
Outdated
When we run a PaddlePaddle application or test, we can specify a verbose threshold. For example: | ||
|
||
```bash | ||
GLOG_v=3 python ../python/paddle/v2/framework/tests/test_recurrent_op.py |
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 a module example GLOG_vmodule=buddy_allocator=2 GLOG_v=10 python ../python/paddle/v2/framework/tests/test_recurrent_op.py
. This will set the vlog level of buddy_allocator to be 2 and the rest to be 10
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
CONTRIBUTING.md
Outdated
| 1 | reserved | | ||
| 2 | DL model compilation, including the building of backward pass and adding optimizer, feed, init operators | | ||
| 3 | DL model execution. For example, in operators | | ||
| 4 | More detailed information than above. | |
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.
Maybe the simplest way to define the max level of the vlog is corresponding with our namespace.
framework
should use VLOG(1)
as its highest VLOG level. Since the framework is our core code. VLOG(2)
and VLOG(3)
could be used in framework
for unimportant logs.
operators
should use VLOG(3)
as its highest VLOG level, since it is the middle level of our framework. operators
will invoke platform, memories, eigen, etc.
platform
, memory
should use VLOG(5)
as their highest VLOG level, since they are usually invoked at the end our code.
namespace | max vlog level |
---|---|
framework | 1 |
operators | 3 |
memory/platform | 5 |
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
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.
- removes doc/.../contribute_to_paddle_cn.md.
cn ->en ?
- After this PR, should we update the contribute_to_paddle_cn.md?
- In contribute_to_paddle_cn, 提交代码的一些约定 is not in contribute_to_paddle_en.md now. Should this PR add these?
CONTRIBUTING.md
Outdated
|
||
1. Build and test | ||
|
||
Users can build PaddlePaddle natively on Linux and Mac OS X. But to unify the building environment and to make it easy for debugging, the recommended way is [using Docker](https://github.com/PaddlePaddle/Paddle/blob/develop/doc/howto/dev/contribute_to_paddle_en.md). |
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.
Is the URL of using Docker
correct?
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.
Corrected it to be (https://github.com/PaddlePaddle/Paddle/blob/develop/doc/howto/dev/build_en.md).
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.
It is not. Thanks for pointing out. I am correcting it.
clang-formater.......................................(no files to check)Skipped | ||
[my-cool-stuff c703c041] add test file | ||
1 file changed, 0 insertions(+), 0 deletions(-) | ||
create mode 100644 233 |
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.
Can we remain the result of git commit
? Maybe this result is useful for new developers since they can confirm their pre-commit
run successfully.
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. Done.
- Make sure the compiler option `WITH_STYLE_CHECK` is on and the compiler | ||
passes the code style check. | ||
- All code must have unit test. | ||
- Pass all unit tests. |
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.
Can we remain these Code Requirements?
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.
Good idea. I moving it after the Workflow section, as the Code Standard section.
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.
I removed the Chinese version of this document because I noticed that we haven't been able to keep the Chinese and English version consistent with each other.
In contribute_to_paddle_cn, 提交代码的一些约定 is not in contribute_to_paddle_en.md now. Should this PR add these?
Actually, I translated this part but scattered the information around various parts of the new English version.
- Make sure the compiler option `WITH_STYLE_CHECK` is on and the compiler | ||
passes the code style check. | ||
- All code must have unit test. | ||
- Pass all unit tests. |
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.
Good idea. I moving it after the Workflow section, as the Code Standard section.
CONTRIBUTING.md
Outdated
|
||
1. Build and test | ||
|
||
Users can build PaddlePaddle natively on Linux and Mac OS X. But to unify the building environment and to make it easy for debugging, the recommended way is [using Docker](https://github.com/PaddlePaddle/Paddle/blob/develop/doc/howto/dev/contribute_to_paddle_en.md). |
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.
It is not. Thanks for pointing out. I am correcting it.
clang-formater.......................................(no files to check)Skipped | ||
[my-cool-stuff c703c041] add test file | ||
1 file changed, 0 insertions(+), 0 deletions(-) | ||
create mode 100644 233 |
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. Done.
… contribute_and_logging
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
|
This PR
/CONTRIBUTE.md
,doc/.../contribute_to_paddle_en.md
into/CONTRIBUTE.md
, anddoc/.../contribute_to_paddle_cn.md
.