forked from parimarjan/learned-cardinalities
-
Notifications
You must be signed in to change notification settings - Fork 0
/
hyp_sweep.sh
123 lines (113 loc) · 2.75 KB
/
hyp_sweep.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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
ALG=$1
LOSS_FUNC=$2
NN_TYPE=$3
USE_VAL_SET=2
NUM_WORKERS=0
NO7=0
LOSSES=qerr,join-loss
#LOSSES=qerr
#FLOW_FEATS=(1 0)
FLOW_FEATS=(1)
WEIGHTED_MSES=(0.0)
ONE_HOT_ESTS=(1)
REL_ESTS=(1)
RES_DIR=all_results/vldb/default/hyp_sweep_mscn
EVAL_JOB=0
BATCH_NORM=0
MB_SIZE=4
DECAYS=(0.1)
LRS=(0.0001)
MAX_EPOCHS=(10)
HLS=(256)
NORM_FLOW_LOSS=(0)
NUM_MSE_ANCHORING=(-3)
PRIORITY=(0.0)
PR_NORM=flow4
REP_EPOCH=1
BUCKETS=10
DEBUG_RATIO=10
NUM_HLS=4
LOAD_QUERY_TOGETHER=0
JOB_FEATS=1
TEST_FEATS=1
SAMPLE_BITMAP=1
SAMPLE_BITMAP_BUCKETS=1000
EVAL_EPOCH=4000
NUM_PAR=16
USE_SET_PADDING=3
for i in "${!PRIORITY[@]}";
do
for onehot in "${!ONE_HOT_ESTS[@]}";
do
for rel in "${!REL_ESTS[@]}";
do
for j in "${!DECAYS[@]}";
do
for k in "${!NUM_MSE_ANCHORING[@]}";
do
for ff in "${!FLOW_FEATS[@]}";
do
for lr in "${!LRS[@]}";
do
for hl in "${!HLS[@]}";
do
for max_epoch in "${!MAX_EPOCHS[@]}";
do
for norm in "${!NORM_FLOW_LOSS[@]}";
do
CMD="time python3 main.py --algs $ALG -n -1 \
--debug_set 0 --debug_ratio $DEBUG_RATIO \
--no7a $NO7 \
--losses $LOSSES \
--use_batch_norm $BATCH_NORM \
--query_mb_size $MB_SIZE \
--use_set_padding $USE_SET_PADDING \
--use_val_set $USE_VAL_SET \
--loss_func $LOSS_FUNC \
--nn_type $NN_TYPE \
--num_workers $NUM_WORKERS \
--load_query_together $LOAD_QUERY_TOGETHER \
--sampling_priority_alpha ${PRIORITY[$i]} \
--priority_normalize_type $PR_NORM \
--reprioritize_epoch $REP_EPOCH \
--add_job_features $JOB_FEATS \
--add_test_features $TEST_FEATS \
--weighted_mse 0.00 \
--max_epochs ${MAX_EPOCHS[$max_epoch]} \
--hidden_layer_size ${HLS[$hl]} \
--cost_model nested_loop_index7 \
--num_mse_anchoring ${NUM_MSE_ANCHORING[$k]} \
--weight_decay ${DECAYS[$j]} \
--normalize_flow_loss ${NORM_FLOW_LOSS[$norm]} \
--flow_features ${FLOW_FEATS[$ff]} \
--lr ${LRS[$lr]} \
--feat_rel_pg_ests ${REL_ESTS[$rel]} \
--feat_rel_pg_ests_onehot ${ONE_HOT_ESTS[$onehot]} \
--feat_pg_est_one_hot ${ONE_HOT_ESTS[$onehot]} \
--max_discrete_featurizing_buckets $BUCKETS \
--exp_prefix default \
--result_dir $RES_DIR \
--eval_epoch $EVAL_EPOCH --join_loss_pool_num $NUM_PAR \
--eval_epoch_jerr $EVAL_EPOCH --eval_epoch_flow_err $EVAL_EPOCH \
--eval_epoch_plan_err 40 \
--optimizer_name adamw \
--num_hidden_layers $NUM_HLS \
--test_diff_templates 0 --diff_templates_type 3 \
--sample_bitmap $SAMPLE_BITMAP \
--sample_bitmap_num 1000 \
--sample_bitmap_buckets $SAMPLE_BITMAP_BUCKETS \
--min_qerr 1.00 \
--eval_on_job $EVAL_JOB \
--feat_tolerance 0"
echo $CMD
eval $CMD
done
done
done
done
done
done
done
done
done
done