-
Notifications
You must be signed in to change notification settings - Fork 109
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
[workflow][kunlunxin] add klx training pre-pr-check workflow #318
Conversation
3242369
to
95f38ac
Compare
9e7ddd9
to
2fac175
Compare
2bb78a8
to
4892099
Compare
19b5dd7
to
9f1076d
Compare
klx-training-remove-image 支持输入image_id 和 image_name: tag_name两种方式。 by image_id |
t5_small 模型的验证过程 【Succeed】 |
a2ef133
to
4eea1e0
Compare
如果ci过程太长,cancel job后,镜像可以自动删除。 https://github.com/yuzhou03/FlagPerf/actions/runs/6967552812/job/18959709463 |
354a960
to
3dd3fd1
Compare
30f290f
to
c7f7fcc
Compare
2b6b695
to
98dae59
Compare
b41112d
to
74fbe9a
Compare
d3ddfb1
to
21a4a09
Compare
21a4a09
to
31360a3
Compare
测试workflow完整示例可参考:https://github.com/dynamicheart/FlagPerf/actions/runs/6977313432/job/18987019681?pr=2
开发人员使用CI指南
KLX使用的CI机器为44,需要再44上准备数据集,在第二步填入对应的数据集在host上的路径。
PR的标题(强制)需按照

[kunlunxin][MODEL_NAME][DATASET_PATH] xxx
的格式即可自动触发CI。PR的描述里可以传入三个参数(可选):MAX_EPOCH
、PIP_SOURCE
、MAX_SAMPLES_TERMINATION
:runner部署【面向CI后台部署人员】
需要部署self-hosted runner,并且打上三个标签:self-hosted、klx、r480,并且设置代理,使其可以与github通信。
部署self-hosted runner的方法:链接
注意点:
示例:
http_prpxy=<YOUR_PROXY_ADDR> && https_prpxy=<YOUR_PROXY_ADDR> && config.sh 以及 http_prpxy=<YOUR_PROXY_ADDR> && https_prpxy=<YOUR_PROXY_ADDR>
&& run.sh./config.sh --url https://github.com/\<username\>/FlagPerf --token <YOUR_TOKEN>
之前,需要先刷新github的文档页面获取最新token,否则可能会因为tokenk过期,返回请求接口 404 NOT Found错误。为保证安全,建议在self-hosted runner机器上,新建一个ci用户(无sudo权限),使用ci用户来运行self-hosted runner程序。注意点:
127.0.0.1
),才能使用run.py一键启动程序;【已完成】需要修改run.py在训练失败时返回错误码/或者提供其他机制能够使得actions可以判断训练是否成功。(可能可以考虑使用rank0.log日志文件里面的
Event.FINISHED
事件)【已完成】需要建立一个机制(例如,设置max_epoch),使得1x1和1x8可以在适当的时间中断训练,防止ci时间过长。
max_epoch=1
以及max_samples_termination=20
【已完成】每次运行时会将run.py里面的VERSION设置为
v0.1_<model_name>_<timestamp>
,保证每次运行都会进行新镜像的构建,并且在运行结束时删除该镜像,回收空间。此外,还额外提供了一个workflow: klx-training-remove-image,可以手动触发删除无用镜像。特性说明
本workflow包含的机制有:
FINISHED
判断训练是否成功解决的问题有:
其它使用方法
【补充】手动触发的方法:
选择klx-training-test-manually workflow,传入case、dataset路径等参数,手动触发:
手动触发ci的教程:https://docs.github.com/en/actions/using-workflows/manually-running-a-workflow
【补充】清理镜像workflow可参考:
https://github.com/dynamicheart/FlagPerf/actions/runs/6940580129