Fix paths, improve error handling
This commit is contained in:
parent
06f013bc5c
commit
c511593594
12
Training/train.sh
Normal file → Executable file
12
Training/train.sh
Normal file → Executable file
@ -27,7 +27,7 @@
|
|||||||
|
|
||||||
########### PATHS ######################################################################
|
########### PATHS ######################################################################
|
||||||
|
|
||||||
WORK_DIR="~/Projects/CapCollectorServer/Training"
|
WORK_DIR="${HOME}/Projects/CapCollectorServer/Training"
|
||||||
BACKUP_DIR="${WORK_DIR}/backup"
|
BACKUP_DIR="${WORK_DIR}/backup"
|
||||||
IMAGE_DIR="${WORK_DIR}/images"
|
IMAGE_DIR="${WORK_DIR}/images"
|
||||||
VERSION_FILE="${WORK_DIR}/classifier.version"
|
VERSION_FILE="${WORK_DIR}/classifier.version"
|
||||||
@ -36,12 +36,18 @@ MODEL_FILE="${WORK_DIR}/classifier.mlmodel"
|
|||||||
TRAINING_ITERATIONS="17"
|
TRAINING_ITERATIONS="17"
|
||||||
SSH_PORT="5432"
|
SSH_PORT="5432"
|
||||||
SERVER="pi@pi4"
|
SERVER="pi@pi4"
|
||||||
SERVER_ROOT_PATH="/data/public/capserver"
|
SERVER_ROOT_PATH="/data/servers/caps/Public"
|
||||||
|
|
||||||
########################################################################################
|
########################################################################################
|
||||||
|
|
||||||
echo "[INFO] Working in directory ${WORK_DIR}"
|
echo "[INFO] Working in directory ${WORK_DIR}"
|
||||||
cd ${WORK_DIR}
|
cd $WORK_DIR
|
||||||
|
|
||||||
|
retVal=$?
|
||||||
|
if [ $retVal -ne 0 ]; then
|
||||||
|
echo '[ERROR] Directory not found'
|
||||||
|
return $retVal
|
||||||
|
fi
|
||||||
|
|
||||||
echo "[INFO] Getting classifier version from server..."
|
echo "[INFO] Getting classifier version from server..."
|
||||||
scp -P $SSH_PORT ${SERVER}:/${SERVER_ROOT_PATH}/classifier.version $WORK_DIR
|
scp -P $SSH_PORT ${SERVER}:/${SERVER_ROOT_PATH}/classifier.version $WORK_DIR
|
||||||
|
Loading…
Reference in New Issue
Block a user