From 65f617eaf07a87c84475ad0010dea844422163e1 Mon Sep 17 00:00:00 2001 From: YurenHao0426 Date: Fri, 7 Aug 2026 13:18:15 -0500 Subject: feat: transfer released physical drift profile to Rain EP --- experiments/rain_ep_released_profile_r0.sh | 63 ++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100755 experiments/rain_ep_released_profile_r0.sh (limited to 'experiments/rain_ep_released_profile_r0.sh') diff --git a/experiments/rain_ep_released_profile_r0.sh b/experiments/rain_ep_released_profile_r0.sh new file mode 100755 index 0000000..7529fc5 --- /dev/null +++ b/experiments/rain_ep_released_profile_r0.sh @@ -0,0 +1,63 @@ +#!/usr/bin/env bash +set -euo pipefail + +ROOT=/home/yurenh2/sdil +AUTHOR=/scratch/yurenh2/energy-based-learning +PYTHON=/scratch/yurenh2/venvs/burstccn/bin/python +PROFILE="$ROOT/results/physical_bias/p0_state_dependence.json" +OUT="$ROOT/results/ep_bias/released_profile_r0" +mkdir -p "$OUT" +cd "$AUTHOR" + +run_cell() { + local gpu=$1 + local tag=$2 + local mode=$3 + local cadence=$4 + CUBLAS_WORKSPACE_CONFIG=:4096:8 CUDA_VISIBLE_DEVICES="$gpu" "$PYTHON" \ + "$ROOT/experiments/rain_ep_bias_train.py" \ + --author-root "$AUTHOR" --device cuda \ + --adapter dillavou --network-protocol comparative32 \ + --beta-policy fixed_positive --beta-value 0.25 \ + --mode "$mode" --bias-ratio 1 \ + --dillavou-drift-ratio 0 --dillavou-profile-json "$PROFILE" \ + --predictor-rate 1 --dillavou-calibration-steps 1 \ + --neutral-cadence "$cadence" --epochs 1 --schedule-epochs 100 \ + --train-limit 10000 --test-limit 2000 --batch-size 128 \ + --training-iterations 15 --inference-iterations 60 \ + --evaluation-split train_holdout --data-seed 6200 \ + --seed 1988 --beta-seed 7100 --deterministic \ + --output "$OUT/$tag.json" > "$OUT/$tag.log" 2>&1 +} + +run_cell 0 pep_clean clean 0 & +run_cell 1 profile_raw raw 0 & +run_cell 2 intercept_initial constant 0 & +run_cell 3 sdil_initial innovation 0 & +run_cell 4 intercept_c10 constant 10 & +run_cell 5 sdil_c10 innovation 10 & +run_cell 6 intercept_c50 constant 50 & +run_cell 7 sdil_c50 innovation 50 & +wait + +"$PYTHON" - "$OUT" <<'PY' +import json +from pathlib import Path +import sys + +root = Path(sys.argv[1]) +summary = {} +for path in sorted(root.glob("*.json")): + if path.name == "summary.json": + continue + report = json.loads(path.read_text()) + summary[path.stem] = { + "test_accuracy": report["final"]["test_accuracy"], + "test_cost": report["final"]["test_cost"], + "finite": report["final"]["finite"], + "wall_seconds": report["final"]["wall_seconds"], + "corrector": report["final"]["corrector"], + } +(root / "summary.json").write_text(json.dumps(summary, indent=2) + "\n") +print(json.dumps(summary, indent=2)) +PY -- cgit v1.2.3