Skip to content
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

Dev add bert automated test #203

Open
wants to merge 26 commits into
base: test_oneflow_release
Choose a base branch
from

Conversation

luqiang-guo
Copy link

Add docker image multi-machine startup script and bert multi-machine execution script.

ouyangyu and others added 18 commits January 12, 2021 15:29
util.py  Add GPU memory for printing.
analysis.py Analyze log files to get loss and GPU memory.
result_analysis.py Compare the two results to generate a png image.
stitching_pic.py Stitching pictures.
train_perbert.sh  Training script.
train_perbert_list.sh Training list.
util.py  Add GPU memory for printing.
analysis.py Analyze log files to get loss and GPU memory.
result_analysis.py Compare the two results to generate a png image.
stitching_pic.py Stitching pictures.
train_perbert.sh  Training script.
train_perbert_list.sh Training list.
@luqiang-guo luqiang-guo added documentation Improvements or additions to documentation enhancement New feature or request and removed documentation Improvements or additions to documentation labels Jun 22, 2021
@jackalcooper
Copy link
Contributor

能不能把那些bash脚本改成python的,复杂的bash脚本很难维护

@jackalcooper
Copy link
Contributor

这个测试能做到无人值守吗,就是脚本自己能判断精度和性能是否达标

@luqiang-guo
Copy link
Author

试能做到无人值守吗,就是脚本自己能判断精度和

可以做到自己判断精度,而且还可以出一个分析报告。

@luqiang-guo
Copy link
Author

能不能把那些bash脚本改成python的,复杂的bash脚本很难维护

之前试着改过python的方式,但是尝试失败了。主要问题是我需要非阻塞的在其他机上执行启动脚本的命令。

@jackalcooper
Copy link
Contributor

能不能把那些bash脚本改成python的,复杂的bash脚本很难维护

之前试着改过python的方式,但是尝试失败了。主要问题是我需要非阻塞的在其他机上执行启动脚本的命令。

用 subprocess 模块的poll 或者 async await 都可以做到在python里面的非阻塞

@luqiang-guo
Copy link
Author

能不能把那些bash脚本改成python的,复杂的bash脚本很难维护

之前试着改过python的方式,但是尝试失败了。主要问题是我需要非阻塞的在其他机上执行启动脚本的命令。

用 subprocess 模块的poll 或者 async await 都可以做到在python里面的非阻塞

好的,我后面用async await 修改

@luqiang-guo luqiang-guo added documentation Improvements or additions to documentation and removed enhancement New feature or request documentation Improvements or additions to documentation labels Jun 22, 2021
if __name__ == "__main__":
main()


Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

空行处理一下

PRINT_ITER=1
ITER_NUM=130

NODE_IPS='10.10.0.2','10.10.0.3','10.10.0.4','10.10.0.5'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个ip地址改成10.11.0.2


NODE_IPS='10.10.0.2','10.10.0.3','10.10.0.4','10.10.0.5'

# INIT_MODEL=/opt/initial_model
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

删掉


# ###############################################################################
# # f32 adam
# ###############################################################################
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个显得有点臃肿,能通过传参数不?

@@ -0,0 +1,134 @@
import json
import matplotlib.pyplot as plt
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

建议加requirements.txt

PYTHON="python3.8"
DOCKER_USER=root

multi_machine()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

用subprocess 或async处理下吧

# param 5
IS_F32=$5

declare -a host_list=("10.10.0.2" "10.10.0.3" "10.10.0.4" "10.10.0.5")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

10.11.0.2

########################################################################################
ALL_NODES=4

declare -a host_list=("10.11.0.2" "10.11.0.3" "10.11.0.4" "10.11.0.5")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

上面不是定义了?


#######################################################################################
# 2 run single
########################################################################################
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里应该也能通过传参解决

@@ -0,0 +1,74 @@
BENCH_ROOT_DIR=/home/oyy/workspace/OneFlow-Benchmark/LanguageModeling/BERT
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/path/to/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants