Skip to content

Commit

Permalink
Add default train path for run.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
viewfinder-annn committed Dec 28, 2023
1 parent 99fe85e commit 052c93c
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions egs/svc/_template/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,6 @@ if [ -z "$gpu" ]; then
gpu="0"
fi

if [ -z "$resume" ]; then
resume=false
fi

if [ -z "$resume_from_ckpt_path" ]; then
resume_from_ckpt_path=""
fi
Expand All @@ -97,14 +93,20 @@ if [ $running_stage -eq 2 ]; then

if [ "$resume" = true ]; then
echo "Resume from the existing experiment..."
CUDA_VISIBLE_DEVICES="$gpu" accelerate launch "${work_dir}"/bins/svc/train.py \
--config "$exp_config" \
--exp_name "$exp_name" \
--log_level info \
--resume \
--resume_from_ckpt_path "$resume_from_ckpt_path" \
--resume_type "$resume_type"
else
echo "Start a new experiment..."
CUDA_VISIBLE_DEVICES="$gpu" accelerate launch "${work_dir}"/bins/svc/train.py \
--config "$exp_config" \
--exp_name "$exp_name" \
--log_level info
fi
CUDA_VISIBLE_DEVICES="$gpu" accelerate launch "${work_dir}"/bins/svc/train.py \
--config "$exp_config" \
--exp_name "$exp_name" \
--log_level info \
--resume \
--resume_from_ckpt_path "$resume_from_ckpt_path" \
--resume_type "$resume_type"
fi

######## Inference/Conversion ###########
Expand Down

0 comments on commit 052c93c

Please sign in to comment.