replacing / with - in init_checkpoint string for printing

This commit is contained in:
Swetha Mandava 2019-12-13 19:00:40 -08:00
parent b4384a51e3
commit 23d56b7cee
2 changed files with 6 additions and 4 deletions

View file

@ -45,9 +45,10 @@ else
use_xla_tag="" use_xla_tag=""
fi fi
num_gpu=1
ckpt_str=${init_checkpoint//\//-}
export GBS=$(expr $batch_size \* $num_gpu) export GBS=$(expr $batch_size \* $num_gpu)
printf -v TAG "tf_bert_finetuning_glue_%s_inf_%s_%s_gbs%d_ckpt_%s" "$task_name" "$bert_model" "$precision" $GBS "$init_checkpoint" printf -v TAG "tf_bert_finetuning_glue_%s_inf_%s_%s_gbs%d_ckpt_%s" "$task_name" "$bert_model" "$precision" $GBS "$ckpt_str"
DATESTAMP=`date +'%y%m%d%H%M%S'` DATESTAMP=`date +'%y%m%d%H%M%S'`
#Edit to save logs & checkpoints in a different directory #Edit to save logs & checkpoints in a different directory
RESULTS_DIR=/results RESULTS_DIR=/results
@ -75,4 +76,4 @@ $mpi_command python run_classifier.py \
--doc_stride=$doc_stride \ --doc_stride=$doc_stride \
--output_dir=$RESULTS_DIR \ --output_dir=$RESULTS_DIR \
--horovod "$use_fp16" \ --horovod "$use_fp16" \
$use_xla_tag |& tee $LOGFILE $use_xla_tag |& tee $LOGFILE

View file

@ -54,7 +54,8 @@ else
use_xla_tag="" use_xla_tag=""
fi fi
printf -v TAG "tf_bert_finetuning_squad_%s_inf_%s_gbs%d_ckpt_%s" "$bert_model" "$precision" $batch_size "$init_checkpoint" ckpt_str=${init_checkpoint//\//-}
printf -v TAG "tf_bert_finetuning_squad_%s_inf_%s_gbs%d_ckpt_%s" "$bert_model" "$precision" $batch_size "$ckpt_str"
DATESTAMP=`date +'%y%m%d%H%M%S'` DATESTAMP=`date +'%y%m%d%H%M%S'`
#Edit to save logs & checkpoints in a different directory #Edit to save logs & checkpoints in a different directory
RESULTS_DIR=/results RESULTS_DIR=/results