-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun_cl.sh
More file actions
executable file
·89 lines (80 loc) · 3.17 KB
/
run_cl.sh
File metadata and controls
executable file
·89 lines (80 loc) · 3.17 KB
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
#!/usr/bin/env bash
# run_cl_experiments.sh — Full Ch06 CL experiment suite
#
# Runs:
# 1. train_separate.py – per-condition separate-model baseline (all datasets, all signal groups)
# 2. train_cl.py – CL strategies (all scenarios, all strategies, 10 seeds)
#
# Usage (from repo root):
# bash run_cl.sh # full run, 10 seeds
# bash run_cl.sh --smoke-test # 1-epoch sanity check, seed 23452 only
#
# Results land in:
# continual/results/separate/ (train_separate.py)
# continual/results/seed_<N>/ (train_cl.py)
#
# Seed selection policy (for reviewer transparency):
# 10 seeds drawn via: random.seed(2026); random.sample(range(10000, 99999), 10)
# Sorted: 23452 25613 39266 51875 75865 77085 82949 88778 91459 94829
# Reproducible and non-cherry-picked. 95% CI uses t_{9, 0.025} = 2.262.
#
# Requires: conda environment "torch"
# ---------------------------------------------------------------------------
set -euo pipefail
SMOKE_TEST=false
if [[ "${1:-}" == "--smoke-test" ]]; then
SMOKE_TEST=true
fi
# 10 random seeds: random.seed(2026); random.sample(range(10000, 99999), 10)
SEEDS=(23452 25613 39266 51875 75865 77085 82949 88778 91459 94829)
# ---------------------------------------------------------------------------
# 1. Separate-model LOCO-CV baseline
# ---------------------------------------------------------------------------
echo "========================================================"
echo " STEP 1 — Separate-model LOCO-CV baseline"
echo "========================================================"
if $SMOKE_TEST; then
python train_separate.py \
--datasets all \
--signal_groups AC DC AC_table DC_table internals internals_v2 internals_v3 \
--seed "${SEEDS[0]}" \
--smoke_test
else
for SEED in "${SEEDS[@]}"; do
echo ""
echo " --- Seed ${SEED} ---"
python train_separate.py \
--datasets all \
--signal_groups AC DC AC_table DC_table internals internals_v2 internals_v3 \
--seed "$SEED"
echo " [DONE] seed ${SEED}"
done
fi
echo " [DONE] train_separate.py"
echo ""
# ---------------------------------------------------------------------------
# 2. CL strategies — one run per seed
# ---------------------------------------------------------------------------
echo "========================================================"
echo " STEP 2 — Continual Learning strategies"
echo "========================================================"
if $SMOKE_TEST; then
python train_cl.py \
--scenarios scenario_1 scenario_2 scenario_3 scenario_4 scenario_5 scenario_6 \
--seed "${SEEDS[0]}" \
--smoke-test
else
for SEED in "${SEEDS[@]}"; do
echo ""
echo " --- Seed ${SEED} ---"
python train_cl.py \
--scenarios scenario_1 scenario_2 scenario_3 scenario_4 scenario_5 scenario_6 \
--seed "$SEED"
echo " [DONE] seed ${SEED}"
done
fi
echo ""
echo "========================================================"
echo " All CL experiments complete."
echo " Results: continual/results/"
echo "========================================================"