Fix experiment runner

This commit is contained in:
Viktor Lofgren 2023-11-15 14:03:17 +01:00
parent 1cbf23e7e7
commit 8a5b853fae

View File

@ -2,11 +2,14 @@
set -e set -e
export EXPERIMENT_RUNNER_OPTS="--enable-preview"
EXPERIMENT=$1 EXPERIMENT=$1
SAMPLE_NAME=crawl-${2:-m} SAMPLE_NAME=crawl-${2:-m}
ARGS=${@:3} ARGS=${@:3}
export EXPERIMENT_RUNNER_OPTS="--enable-preview"
SAMPLE_DIR="node-1/samples/${SAMPLE_NAME}/" SAMPLE_DIR_BASE="node-1/samples/"
SAMPLE_DIR="${SAMPLE_DIR_BASE}${SAMPLE_NAME}/"
echo "args = $ARGS" echo "args = $ARGS"
@ -45,17 +48,17 @@ tar xf ../code/tools/experiment-runner/build/distributions/experiment-runner.tar
## Download the sample if necessary ## Download the sample if necessary
if [ ! -d ${SAMPLE_DIR} ]; then if [ ! -d ${SAMPLE_DIR} ]; then
mkdir -p samples/ mkdir -p ${SAMPLE_DIR_BASE}
SAMPLE_TARBALL=samples/${SAMPLE_NAME}.tar.gz SAMPLE_TARBALL=${SAMPLE_DIR_BASE}${SAMPLE_NAME}.tar.gz
download_model ${SAMPLE_TARBALL} https://downloads.marginalia.nu/${SAMPLE_TARBALL} || rm ${SAMPLE_TARBALL} download_model ${SAMPLE_TARBALL} https://downloads.marginalia.nu/samples/${SAMPLE_NAME}.tar.gz || rm ${SAMPLE_TARBALL}
if [ ! -f ${SAMPLE_TARBALL} ]; then if [ ! -f ${SAMPLE_TARBALL} ]; then
echo "!! Failed" echo "!! Failed"
exit 255 exit 255
fi fi
mkdir -p samples/${SAMPLE_NAME} mkdir -p ${SAMPLE_DIR_BASE}/${SAMPLE_NAME}
if [ ! -f $SAMPLE_DIR/plan.yaml ]; then if [ ! -f $SAMPLE_DIR/plan.yaml ]; then
echo "Uncompressing" echo "Uncompressing"
tar zxf ${SAMPLE_TARBALL} --strip-components=1 -C ${SAMPLE_DIR} tar zxf ${SAMPLE_TARBALL} --strip-components=1 -C ${SAMPLE_DIR}