-
Notifications
You must be signed in to change notification settings - Fork 1
/
run_local.sh
executable file
·44 lines (34 loc) · 1.18 KB
/
run_local.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/bin/bash
set -ex
set -o pipefail
# Default number of steps and batch size for the challenge
N_STEP=16
N_BATCH=8
# Input args
CODE_DIR=$1
N_REPEAT=$2
# Where output goes
DB_ROOT=./output
DBID=run_$(date +"%Y%m%d_%H%M%S")
# Setup vars
OPT=$(basename $CODE_DIR)
OPT_ROOT=$(dirname $CODE_DIR)
# Check that bayesmark is installed in this environment
which bayesmark-init
which bayesmark-launch
which bayesmark-exp
which bayesmark-agg
which bayesmark-anal
# Ensure output folder exists
mkdir -p $DB_ROOT
# Copy the baseline file in, we can skip this but we must include RandomSearch in the -o list
! test -d $DB_ROOT/$DBID/ # Check the folder does not yet exist
bayesmark-init -dir $DB_ROOT -b $DBID
# By default, runs on all models (-c), data (-d), metrics (-m)
bayesmark-launch -dir $DB_ROOT -b $DBID -n $N_STEP -r $N_REPEAT -p $N_BATCH -o RandomSearch $OPT --opt-root $OPT_ROOT -v -c SVM DT -d boston wine
# To run on all problems use instead (slower):
# bayesmark-launch -dir $DB_ROOT -b $DBID -n $N_STEP -r $N_REPEAT -p $N_BATCH -o $OPT --opt-root $OPT_ROOT -v
# Now aggregate the results
bayesmark-agg -dir $DB_ROOT -b $DBID
# And analyze the scores
bayesmark-anal -dir $DB_ROOT -b $DBID -v