Skip to content

Commit 3db6936

Browse files
committed
Debug
1 parent 8ec394a commit 3db6936

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

Pilot1/Uno/train.sh

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,12 @@ set -eu
1010
### Path to your CANDLEized model's main Python script###
1111
CANDLE_MODEL=/usr/local/Benchmarks/Pilot1/Uno/uno_baseline_keras2.py
1212

13-
if (( $# < 2 )) ; then
14-
echo "Uno/train.sh: Illegal number of parameters: given: ${#}"
13+
set -x
14+
15+
ARGC=$#
16+
17+
if (( $ARGC < 2 )) ; then
18+
echo "Uno/train.sh: Illegal number of parameters: given: ${ARGC}"
1519
echo "CUDA_VISIBLE_DEVICES and CANDLE_DATA_DIR are required"
1620
exit -1
1721
fi
@@ -20,12 +24,11 @@ CUDA_VISIBLE_DEVICES=$1 ; shift
2024
CANDLE_DATA_DIR=$1 ; shift
2125
CANDLE_CONFIG=0
2226

23-
set -x
24-
if (( $# == 2 )) ; then
27+
if (( $ARGC == 2 )) ; then
2528
CMD=( python ${CANDLE_MODEL} )
2629
echo "CMD2 = ${CMD[@]}"
27-
elif (( $# >= 3 )) ; then
28-
# if original $3 is a file, set candle_config and passthrough $@
30+
elif (( $ARGC >= 3 )) ; then
31+
# If original $3 is a file, set candle_config and passthrough $@
2932
CANDLE_CONFIG=$1
3033
if [[ -f $CANDLE_CONFIG ]] ; then
3134
echo "Uno/train.sh: found CANDLE_CONFIG=$CANDLE_CONFIG"

0 commit comments

Comments
 (0)