-
Notifications
You must be signed in to change notification settings - Fork 5.9k
Refactor version management to use version.txt with date suffix for develop builds
#76314
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
|
你的PR提交成功,感谢你对开源项目的贡献! |
cmake/version.cmake
Outdated
| # Print the last commit date | ||
| message(STATUS "Last commit date: ${DATE_ONLY}") | ||
| if(NOT PADDLE_VERSION) | ||
| set(PADDLE_VERSION "dev${DATE_ONLY}") |
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.
为什么不能基于文件管理?
https://github.com/pytorch/pytorch/blob/main/version.txt
这是不符合版本号规范的 https://peps.python.org/pep-0440/
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.
只需对之前逻辑略作修改,伪码如下
def get_paddle_version():
if has_env("PADDLE_VERSION"):
return get_env("PADDLE_VERSION") # release version
default_version = read_from_file(f"{project_root}/version.txt")
default_version.endswith(".dev")
date_suffix = get_date_from_last_commit()
version = default_version + date_suffix
return version # develop version每次拉分支时更新源分支版本号,这可以通过 GitHub Actions 来自动完成
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.
读version.txt文件加到cmake里了
version.txt with date suffix for nightly builds
version.txt with date suffix for nightly buildsversion.txt with date suffix for develop builds
SigureMo
left a comment
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.
| CCACHE_DIR: /root/.ccache/formers | ||
| CFS_DIR: /home/data/cfs | ||
| paddle_whl: /workspace/dist/paddlepaddle_gpu-0.0.0-cp310-cp310-linux_x86_64.whl | ||
| paddle_whl: /workspace/dist/*.whl |
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 吧?paddlepaddle_gpu*.whl 可以么?
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.
一样的吧,这个目录就只有一个whl包
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.
我不管我不管,xpu过了先合🐶
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.
可以先合,后面改一下


PR Category
Environment Adaptation
PR Types
Others
Description
修改手动编包和nightly包默认情况读取version.txt指定版本并添加日期后缀,需要每次拉新版本分支后更新version.txt文件
若不想采用这种格式,可在编包前指定环境变量PADDLE_VERSION为自己想要的版本,比如0.0.0
流水线除distribute仍保留0.0.0格式
pcard-67164