Skip to content

Commit

Permalink
Update preprocess.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
wilke authored Dec 20, 2023
1 parent 2bac956 commit 04f7d37
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions src/templates/preprocess.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 04f7d37

Please sign in to comment.