chore: sort run_once
This commit is contained in:
parent
36840f0310
commit
ba90bf1625
43
run_once.sh
43
run_once.sh
|
@ -23,35 +23,32 @@ else
|
||||||
echo "output_dir exists: $output_dir"
|
echo "output_dir exists: $output_dir"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
# echo "${run_type} ${model} ${gpu_cnt} ${max_steps} ${run_name} ${output_dir}"
|
# echo "${run_type} ${model} ${gpu_cnt} ${max_steps} ${run_name} ${output_dir}"
|
||||||
python prepare_yaml_file.py ${run_type} ${model} ${max_steps} ${run_name} ${output_dir}
|
python prepare_yaml_file.py ${run_type} ${model} ${max_steps} ${run_name} ${output_dir}
|
||||||
|
|
||||||
export USE_MODELSCOPE_HUB=1
|
export USE_MODELSCOPE_HUB=1
|
||||||
|
|
||||||
echo "Start recording gpu status "
|
# echo "Start recording gpu status "
|
||||||
# 0 means not printing gpu status
|
# # 0 means not printing gpu status
|
||||||
python gpu_status.py ${output_dir} 1 10 &
|
# python gpu_status.py ${output_dir} 1 10 &
|
||||||
gpu_status_pid=$!
|
# gpu_status_pid=$!
|
||||||
echo "${gpu_status_pid}"
|
# echo "${gpu_status_pid}"
|
||||||
|
|
||||||
sleep 60
|
if [ "${gpu_cnt}"="1" ]; then
|
||||||
|
ASCEND_RT_VISIBLE_DEVICES=0 llamafactory-cli train ${output_dir}/${run_name}.yml \
|
||||||
|
| tee ${output_dir}/log.txt" &
|
||||||
|
train_pid=$!
|
||||||
|
echo "Start train"
|
||||||
|
else
|
||||||
|
FORCE_TORCHRUN=1 llamafactory-cli train ${output_dir}/${run_name}.yml \
|
||||||
|
| tee ${output_dir}/log.txt" &
|
||||||
|
train_pid=$!
|
||||||
|
echo "Start train"
|
||||||
|
fi
|
||||||
|
|
||||||
# if [ "${gpu_cnt}"="1" ]; then
|
wait $train_pid
|
||||||
# ASCEND_RT_VISIBLE_DEVICES=0 llamafactory-cli train ${output_dir}/${run_name}.yml \
|
echo "Train ended"
|
||||||
# | tee ${output_dir}/log.txt" &
|
|
||||||
# train_pid=$!
|
|
||||||
# echo "Start train"
|
|
||||||
# else
|
|
||||||
# FORCE_TORCHRUN=1 llamafactory-cli train ${output_dir}/${run_name}.yml \
|
|
||||||
# | tee ${output_dir}/log.txt" &
|
|
||||||
# train_pid=$!
|
|
||||||
# echo "Start train"
|
|
||||||
# fi
|
|
||||||
|
|
||||||
# wait $train_pid
|
|
||||||
# echo "Train ended"
|
|
||||||
# sleep 90
|
# sleep 90
|
||||||
|
# kill $gpu_status_pid
|
||||||
kill $gpu_status_pid
|
# echo "Gpu status ended"
|
||||||
echo "Gpu status ended"
|
|
Loading…
Reference in New Issue