diff --git a/src/templates/preprocess.sh b/src/templates/preprocess.sh index a82f07f..2aa8af6 100755 --- a/src/templates/preprocess.sh +++ b/src/templates/preprocess.sh @@ -31,15 +31,21 @@ fi if [ $# -eq 2 ] ; then CANDLE_DATA_DIR=$1 ; shift - CONFIG_FILE=$1 ; shift - CMD="python ${CANDLE_MODEL} --config_file ${CONFIG_FILE}" + + # if $2 is a file, then set candle_config + if [ -f $CANDLE_DATA_DIR/$1 ] ; then + CONFIG_FILE=$1 ; shift + CMD="python ${CANDLE_MODEL} --config_file ${CONFIG_FILE}" + else + CMD="python ${CANDLE_MODEL} $@" + echo "CMD = $CMD" elif [ $# -ge 3 ] ; then - CUDA_VISIBLE_DEVICES=$1 ; shift + CANDLE_DATA_DIR=$1 ; shift - # if $3 is a file, then set candle_config + # if $2 is a file, then set candle_config if [ -f $CANDLE_DATA_DIR/$1 ] ; then echo "$1 is a file" CANDLE_CONFIG=$1 ; shift