PANDA / scripts /common /rerun_all_discovery.sh
bryan7264's picture
Correction pass: gate-matched Dahlin, retracted unsupported claims, complete HF-placode DEG set, restyled figures
141bacd verified
Raw
History Blame Contribute Delete
1.25 kB
#!/usr/bin/env bash
PANDA_ROOT="${PANDA_ROOT:-$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)}"
# Phase C: rerun all mechanistic discovery on new checkpoints.
# Runs analysis scripts 70-85 for each system with both variants where applicable.
set -euo pipefail
cd "$PANDA_ROOT"
LDLIBS=$(python -c "import site,os; print(os.path.join(site.getsitepackages()[0],'nvidia','cusparselt','lib'))" 2>/dev/null || echo "")
echo "=== Phase C: mechanistic discovery reruns ==="
# All rely on the panda import + checkpoints/ + data/corpus/*/harmonized/
run() {
local name="$1"; shift
LD_LIBRARY_PATH="$LDLIBS" nohup python -u "$@" > "logs/${name}.log" 2>&1 &
disown
echo "launched $name"
}
# 70 β€” prototype geometry (fast, no GPU)
run rerun_70_proto python scripts/analysis/70_prototype_geometry.py
# 80 β€” prototype-gene attribution (both systems, both variants)
CUDA_VISIBLE_DEVICES=2 run rerun_80_attr_marker python scripts/analysis/80_prototype_gene_attribution.py
# 82 β€” co-attribution modules
run rerun_82_coatt python scripts/analysis/82_gene_coattribution_modules.py
# 83 β€” training trajectory
run rerun_83_traj python scripts/analysis/83_prototype_training_trajectory.py
echo "kick off complete β€” check logs/rerun_*.log"