-
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
Add version api #2985
Add version api #2985
Conversation
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 have a serious concern about our current versioning approach, which takes all Git commits between 0.9.0 and 0.10.0 as 0.9.0. This is not realistic.
Consider that when errors occur with an experiment, users should report and upload the log so could we help. The printed log should contain the real version/commit id, so could we reproduce the error and locate the bug.
The correct logic should be
if paddle.version.tagged:
print paddle.version # 0.10.0, 0.10.0rc1 or something
print paddle.version.major # 0
print paddle.version.minor # 10
print paddle.version.release # 0
print paddle.version.rc # 1, or 0 if not a release candidate
else:
print paddle.version # 1232131abdd3
print paddle.version.commit # 1232131abdd3
What do you think?
Thanks for @wangkuiyi , to distinguish
So how about the following logic? if paddle.version.tagged:
print paddle.version.full_version # 0.10.0, 0.10.0rc1 or something
print paddle.version.major # 0
print paddle.version.minor # 10
print paddle.version.patch # 0
print paddle.version.rc # 1, or 0 if not a release candidate
else:
print paddle.version.commit # 1232131abdd3 |
@Yancey1989 Completely agree! Thanks! |
Done with @wangkuiyi 's comments. |
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.
@Yancey1989 Can you please update this PR and merge the latest changes, so we can merge this.
|
||
|
||
需要注意的是: | ||
|
||
* `release/版本号`分支一旦建立,一般不允许再从`develop`分支合入`release/版本号`。这样保证`release/版本号`分支功能的封闭,方便测试人员测试PaddlePaddle的行为。 | ||
* 在`release/版本号`分支存在的时候,如果有bugfix的行为,需要将bugfix的分支同时merge到`master`, `develop`和`release/版本号`这三个分支。 | ||
|
||
# PaddlePaddle 分支规范 | ||
## PaddlePaddle 分支规范 |
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.
With markdownlint MD025, there is only one top-level header.
Seem CI failed at:
|
@typhoonzero , I'm debugging with this failed and will update this PR later. |
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 is a awesome feature.
Fixed #2924
We can use the version API as: