From 04f7d37e8064184359bbaca9bc576bed59353af1 Mon Sep 17 00:00:00 2001 From: Andreas Wilke Date: Wed, 20 Dec 2023 11:48:25 -0600 Subject: [PATCH] Update preprocess.sh --- src/templates/preprocess.sh | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) 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