diff --git a/prepare_yaml_file.py b/prepare_yaml_file.py index 4c864328..9ea58734 100644 --- a/prepare_yaml_file.py +++ b/prepare_yaml_file.py @@ -41,7 +41,7 @@ def main(): if run_type == "lora_sft": config['max_steps'] = max_steps - with open(f'{output_dir}/{run_name}.yml', 'w', encoding='utf-8') as f: + with open(f'{output_dir}/{run_name}.yaml', 'w', encoding='utf-8') as f: yaml.dump(data=config, stream=f, allow_unicode=True) if __name__ == "__main__": diff --git a/run_once.sh b/run_once.sh index d084847a..fdef74a1 100644 --- a/run_once.sh +++ b/run_once.sh @@ -18,14 +18,15 @@ output_dir="./results/${run_name}" if [ ! -d "$output_dir" ]; then mkdir -p "$output_dir" - echo "路径不存在,已创建: $output_dir" + echo "output_dir created: $output_dir" else - echo "路径已存在: $output_dir" + echo "output_dir exists: $output_dir" fi -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} +# 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} +echo "yaml file save to {output_dir}/{run_name}.yaml" # export USE_MODELSCOPE_HUB=1