Skip to content

Commit fcded22

Browse files
m9hclaude
andcommitted
Add high-fidelity training script (5K neurons, 2s sim, 200 epochs)
4h walltime per recording for proper convergence. Targets the 6 baseline Sharf organoid recordings. Previous fast runs achieved 79% FR ratio; this should reach >95% with longer sims and more epochs. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 01c7ccb commit fcded22

1 file changed

Lines changed: 61 additions & 0 deletions

File tree

scripts/slurm_train_hifi.sh

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
#!/usr/bin/env bash
2+
#SBATCH --job-name=bl1-hifi
3+
#SBATCH --partition=gpu
4+
#SBATCH --gres=gpu:1
5+
#SBATCH --cpus-per-task=8
6+
#SBATCH --mem=64G
7+
#SBATCH --time=04:00:00
8+
#SBATCH --output=/data/datasets/bl1/results/sharf_2022/hifi_logs/%x_%A_%a.out
9+
#SBATCH --error=/data/datasets/bl1/results/sharf_2022/hifi_logs/%x_%A_%a.err
10+
# ---------------------------------------------------------------------------
11+
# High-fidelity training: 5K neurons, 2000ms sim, 200 epochs
12+
#
13+
# sbatch --array=0-9 scripts/slurm_train_hifi.sh # 10 baseline recordings
14+
# sbatch scripts/slurm_train_hifi.sh 0 # single recording
15+
# ---------------------------------------------------------------------------
16+
17+
set -euo pipefail
18+
19+
PROJECT_DIR="/home/mhough/dev/bl1"
20+
VENV="${PROJECT_DIR}/.venv/bin"
21+
DATA_DIR="/data/datasets/bl1/zenodo_sharf_2022"
22+
OUT_DIR="/data/datasets/bl1/results/sharf_2022/hifi"
23+
24+
# Use baseline recordings (best-characterized, ~0.3-0.86 Hz)
25+
mapfile -t FILES < <(ls -1 "${DATA_DIR}"/7month_*.raw.h5 2>/dev/null | sort)
26+
27+
IDX="${SLURM_ARRAY_TASK_ID:-${1:-0}}"
28+
if [[ $IDX -ge ${#FILES[@]} ]]; then
29+
echo "Index $IDX out of range (${#FILES[@]} files)"
30+
exit 1
31+
fi
32+
33+
FILE="${FILES[$IDX]}"
34+
BASENAME=$(basename "$FILE" .raw.h5)
35+
36+
echo "============================================================"
37+
echo "BL-1 High-Fidelity Training"
38+
echo "============================================================"
39+
echo " Job ID: ${SLURM_JOB_ID:-local}"
40+
echo " Recording: ${BASENAME}"
41+
echo " Config: 5K neurons, 2000ms sim, 200 epochs"
42+
echo " Date: $(date)"
43+
echo "============================================================"
44+
45+
mkdir -p "${OUT_DIR}/${BASENAME}"
46+
47+
cd "${PROJECT_DIR}"
48+
49+
"${VENV}/python" scripts/train_culture.py \
50+
--n-neurons 5000 \
51+
--n-epochs 200 \
52+
--sim-duration-ms 2000 \
53+
--lr 5e-5 \
54+
--surrogate-beta 5.0 \
55+
--auto-noise \
56+
--from-recording "${FILE}" \
57+
--output-dir "${OUT_DIR}/${BASENAME}"
58+
59+
echo ""
60+
echo "Job complete: ${BASENAME}"
61+
echo "============================================================"

0 commit comments

Comments
 (0)