File size: 2,747 Bytes
d1988f5
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
#!/usr/bin/env bash
# Full CPU experiment suite for LNPBench.
#
# Ordered by scientific priority so that a partial run still yields a coherent
# paper: primary external comparison first, then variance, ablations, the
# secondary protocols, and finally the case study.  Every stage is resumable
# (`--resume`), so the script can be restarted at any time and will skip rows
# that already exist in its output file.
#
#   nohup bash scripts/run_suite.sh > /tmp/suite.log 2>&1 &
#
set -u
cd "$(dirname "$0")/.."
export PYTHONPATH=src
export OMP_NUM_THREADS=${OMP_NUM_THREADS:-4}
export MKL_NUM_THREADS=${OMP_NUM_THREADS}
PY=${PYTHON:-python}

COMMON="--device cpu --epochs 50 --batch-size 192 --save-preds --resume"

stage() { echo; echo "==================== $* ===================="; date; }

stage "N1 primary external comparison, fold 0"
$PY scripts/run_benchmark.py --models mlp_fp lion agile phcausal physset \
    --protocols external --folds 0 $COMMON --out results/benchmark_neural.csv

stage "N2 SeqCausal speed probe (LM_2019 fold 0)"
$PY scripts/run_benchmark.py --models seqcausal --protocols external \
    --studies LM_2019 --folds 0 $COMMON --out results/benchmark_neural.csv

stage "N3 remaining folds for our two set-based methods"
$PY scripts/run_benchmark.py --models phcausal physset \
    --protocols external --folds 1 2 3 4 $COMMON --out results/benchmark_neural.csv

stage "N4 SeqCausal remaining folds (if N2 was affordable)"
$PY scripts/run_benchmark.py --models seqcausal \
    --protocols external --folds 1 2 3 4 $COMMON --out results/benchmark_neural.csv

stage "N5 remaining folds for the published neural baselines"
$PY scripts/run_benchmark.py --models lion agile mlp_fp \
    --protocols external --folds 1 2 3 4 $COMMON --out results/benchmark_neural.csv

stage "ABL ablations on LM_2019, folds 0-1"
$PY scripts/run_benchmark.py \
    --models phcausal_no_adv phcausal_no_cond phcausal_no_disentangle phcausal_no_ortho \
             phcausal_no_phys phcausal_no_rank \
             physset_no_dual physset_no_mdaux physset_no_rank \
             seqcausal_no_causal seqcausal_no_gdro seqcausal_no_mamba \
    --protocols external --studies LM_2019 --folds 0 1 $COMMON \
    --out results/benchmark_ablation.csv

stage "P2 amine-disjoint split, 3 seeds"
$PY scripts/run_benchmark.py --models lion phcausal physset xgboost \
    --protocols amine --seeds 0 1 2 $COMMON --out results/benchmark_amine.csv

stage "P3 study-stratified 5-fold CV"
$PY scripts/run_benchmark.py --models phcausal physset xgboost \
    --protocols cv5 $COMMON --out results/benchmark_cv5.csv

stage "ANALYSIS"
$PY scripts/analyze.py || true
$PY scripts/report.py || true
$PY scripts/make_figures.py || true

echo; echo "suite finished"; date