Upload 2-parameter conditional DDPM (HI emulation, CAMELS LH params_2, epoch 200) with full training/eval/posterior toolchain
Browse files- README.md +5 -5
- args.json +1 -1
- args.txt +1 -1
- cross_model/check_poster_env.py +2 -2
- cross_model/compare_posterior_inference.py +2 -2
- cross_model/ddpm_posterior_corrected.py +2 -2
- cross_model/poster.py +2 -2
- cross_model/run_compare_posterior.sh +4 -4
- cross_model/run_vlb_inference_1000grid.sh +5 -5
- cross_model/run_vlb_inference_200grid.sh +5 -5
- cross_model/scripts/compare_ddpm_models.py +3 -3
- cross_model/scripts/ddpm_posterior_six_anchors.py +2 -2
- cross_model/scripts/ddpm_triangle_integration.py +2 -2
- cross_model/scripts/run_ddpm_comparison.sh +9 -9
- cross_model/scripts/run_ddpm_figure6.sh +4 -4
- cross_model/scripts/run_ddpm_figure6_suite.py +2 -2
- cross_model/scripts/run_ddpm_posterior_corrected.sh +4 -4
- cross_model/scripts/run_ddpm_posterior_six_anchors.sh +6 -6
- cross_model/scripts/run_poster.sh +7 -7
- cross_model/scripts/run_posterior_inference.sh +5 -5
- cross_model/scripts/run_triangle_ddpm_both.sh +3 -3
- inference_example.py +2 -2
- scripts/shell/evaluate_conditional.sh +4 -4
- scripts/shell/run_ddim_investigation_2param.sh +6 -6
- scripts/shell/train_conditional.sh +4 -4
- src/ddim_investigation_2param.py +3 -3
README.md
CHANGED
|
@@ -70,7 +70,7 @@ This checkpoint is **epoch 200** of the training run carried out under
|
|
| 70 |
| `cross_model/README.md` | How to point these scripts at locally-downloaded weights/data |
|
| 71 |
|
| 72 |
These cross-model scripts default to the original cluster paths (e.g.
|
| 73 |
-
`/
|
| 74 |
this repo, supply `--bundle-2param`, `--bundle-6param`, `--data-2param`,
|
| 75 |
`--data-6param` to override.
|
| 76 |
|
|
@@ -105,7 +105,7 @@ import sys, torch, json
|
|
| 105 |
from pathlib import Path
|
| 106 |
|
| 107 |
# 1) Download all needed files
|
| 108 |
-
repo = "
|
| 109 |
ckpt_path = hf_hub_download(repo, "model.pt")
|
| 110 |
args_path = hf_hub_download(repo, "args.json")
|
| 111 |
# Pull the bundled source files so we can import the model classes.
|
|
@@ -161,15 +161,15 @@ layout used by `src/dataset_conditional.py` is:
|
|
| 161 |
```
|
| 162 |
|
| 163 |
Images are rescaled to `[-1, 1]`; labels are z-scored using train-split
|
| 164 |
-
statistics.
|
| 165 |
-
`/
|
| 166 |
|
| 167 |
## Intended use & limitations
|
| 168 |
|
| 169 |
- Intended for **research** on diffusion emulators for cosmological fields.
|
| 170 |
- The 2-label setup is a simplified subset of the full CAMELS LH parameter
|
| 171 |
space; see the companion **6-parameter** model
|
| 172 |
-
(`
|
| 173 |
- Outputs are 256 × 256 single-channel maps in the model's normalised range.
|
| 174 |
Apply the inverse of any data-pipeline preprocessing before physical
|
| 175 |
interpretation.
|
|
|
|
| 70 |
| `cross_model/README.md` | How to point these scripts at locally-downloaded weights/data |
|
| 71 |
|
| 72 |
These cross-model scripts default to the original cluster paths (e.g.
|
| 73 |
+
`<CAMELS_LH_DATA_DIR>/params_2`). After downloading
|
| 74 |
this repo, supply `--bundle-2param`, `--bundle-6param`, `--data-2param`,
|
| 75 |
`--data-6param` to override.
|
| 76 |
|
|
|
|
| 105 |
from pathlib import Path
|
| 106 |
|
| 107 |
# 1) Download all needed files
|
| 108 |
+
repo = "collins909/DDPM-2param"
|
| 109 |
ckpt_path = hf_hub_download(repo, "model.pt")
|
| 110 |
args_path = hf_hub_download(repo, "args.json")
|
| 111 |
# Pull the bundled source files so we can import the model classes.
|
|
|
|
| 161 |
```
|
| 162 |
|
| 163 |
Images are rescaled to `[-1, 1]`; labels are z-scored using train-split
|
| 164 |
+
statistics. Point your training/eval scripts at the local directory that contains those
|
| 165 |
+
files (e.g. via `--data_dir <CAMELS_LH_DATA_DIR>/params_2`).
|
| 166 |
|
| 167 |
## Intended use & limitations
|
| 168 |
|
| 169 |
- Intended for **research** on diffusion emulators for cosmological fields.
|
| 170 |
- The 2-label setup is a simplified subset of the full CAMELS LH parameter
|
| 171 |
space; see the companion **6-parameter** model
|
| 172 |
+
(`collins909/DDPM-6param`) for the full conditioning.
|
| 173 |
- Outputs are 256 × 256 single-channel maps in the model's normalised range.
|
| 174 |
Apply the inverse of any data-pipeline preprocessing before physical
|
| 175 |
interpretation.
|
args.json
CHANGED
|
@@ -23,7 +23,7 @@
|
|
| 23 |
"num_workers": 4,
|
| 24 |
"early_stop_patience": 100,
|
| 25 |
"use_amp": false,
|
| 26 |
-
"data_dir": "/
|
| 27 |
"normalize_labels": true,
|
| 28 |
"output_dir": "outputs_conditional_2label",
|
| 29 |
"resume": "outputs_conditional_2label_20260401_164603/checkpoints/checkpoint_epoch_160.pt",
|
|
|
|
| 23 |
"num_workers": 4,
|
| 24 |
"early_stop_patience": 100,
|
| 25 |
"use_amp": false,
|
| 26 |
+
"data_dir": "<DDPM_ROOT>/data/LH_data/params_2",
|
| 27 |
"normalize_labels": true,
|
| 28 |
"output_dir": "outputs_conditional_2label",
|
| 29 |
"resume": "outputs_conditional_2label_20260401_164603/checkpoints/checkpoint_epoch_160.pt",
|
args.txt
CHANGED
|
@@ -14,7 +14,7 @@ ema_decay: 0.9999
|
|
| 14 |
num_workers: 4
|
| 15 |
early_stop_patience: 100
|
| 16 |
use_amp: False
|
| 17 |
-
data_dir: /
|
| 18 |
normalize_labels: True
|
| 19 |
output_dir: outputs_conditional_2label
|
| 20 |
resume: outputs_conditional_2label_20260401_164603/checkpoints/checkpoint_epoch_160.pt
|
|
|
|
| 14 |
num_workers: 4
|
| 15 |
early_stop_patience: 100
|
| 16 |
use_amp: False
|
| 17 |
+
data_dir: <DDPM_ROOT>/data/LH_data/params_2
|
| 18 |
normalize_labels: True
|
| 19 |
output_dir: outputs_conditional_2label
|
| 20 |
resume: outputs_conditional_2label_20260401_164603/checkpoints/checkpoint_epoch_160.pt
|
cross_model/check_poster_env.py
CHANGED
|
@@ -4,7 +4,7 @@ import json
|
|
| 4 |
import os
|
| 5 |
import time
|
| 6 |
|
| 7 |
-
_LOG = "/
|
| 8 |
|
| 9 |
|
| 10 |
def _log(hypothesis_id: str, location: str, message: str, data: dict) -> None:
|
|
@@ -24,7 +24,7 @@ def _log(hypothesis_id: str, location: str, message: str, data: dict) -> None:
|
|
| 24 |
|
| 25 |
def main() -> None:
|
| 26 |
# region agent log
|
| 27 |
-
root = "/
|
| 28 |
cwd = os.getcwd()
|
| 29 |
poster_path = os.path.join(root, "poster.py")
|
| 30 |
poster_ci = os.path.join(root, "Poster.py")
|
|
|
|
| 4 |
import os
|
| 5 |
import time
|
| 6 |
|
| 7 |
+
_LOG = "<DDPM_ROOT>/Models/.cursor/debug-a1359c.log"
|
| 8 |
|
| 9 |
|
| 10 |
def _log(hypothesis_id: str, location: str, message: str, data: dict) -> None:
|
|
|
|
| 24 |
|
| 25 |
def main() -> None:
|
| 26 |
# region agent log
|
| 27 |
+
root = "<DDPM_ROOT>/Models"
|
| 28 |
cwd = os.getcwd()
|
| 29 |
poster_path = os.path.join(root, "poster.py")
|
| 30 |
poster_ci = os.path.join(root, "Poster.py")
|
cross_model/compare_posterior_inference.py
CHANGED
|
@@ -471,11 +471,11 @@ def parse_args() -> argparse.Namespace:
|
|
| 471 |
)
|
| 472 |
p.add_argument(
|
| 473 |
"--data-2param", type=Path,
|
| 474 |
-
default=Path("/
|
| 475 |
)
|
| 476 |
p.add_argument(
|
| 477 |
"--data-6param", type=Path,
|
| 478 |
-
default=Path("/
|
| 479 |
)
|
| 480 |
p.add_argument(
|
| 481 |
"--bundle-2param", type=Path,
|
|
|
|
| 471 |
)
|
| 472 |
p.add_argument(
|
| 473 |
"--data-2param", type=Path,
|
| 474 |
+
default=Path("<DDPM_ROOT>/data/LH_data/params_2"),
|
| 475 |
)
|
| 476 |
p.add_argument(
|
| 477 |
"--data-6param", type=Path,
|
| 478 |
+
default=Path("<DDPM_ROOT>/data/LH_data/params_6"),
|
| 479 |
)
|
| 480 |
p.add_argument(
|
| 481 |
"--bundle-2param", type=Path,
|
cross_model/ddpm_posterior_corrected.py
CHANGED
|
@@ -724,9 +724,9 @@ def parse_args() -> argparse.Namespace:
|
|
| 724 |
p.add_argument("--output-dir", type=Path,
|
| 725 |
default=MODELS_ROOT / "ddpm_posterior_corrected_fullviz_out")
|
| 726 |
p.add_argument("--data-2param", type=Path,
|
| 727 |
-
default=Path("/
|
| 728 |
p.add_argument("--data-6param", type=Path,
|
| 729 |
-
default=Path("/
|
| 730 |
p.add_argument("--bundle-2param", type=Path,
|
| 731 |
default=MODELS_ROOT / "notebook_model_weights" / "2param_epoch200")
|
| 732 |
p.add_argument("--bundle-6param", type=Path,
|
|
|
|
| 724 |
p.add_argument("--output-dir", type=Path,
|
| 725 |
default=MODELS_ROOT / "ddpm_posterior_corrected_fullviz_out")
|
| 726 |
p.add_argument("--data-2param", type=Path,
|
| 727 |
+
default=Path("<DDPM_ROOT>/data/LH_data/params_2"))
|
| 728 |
p.add_argument("--data-6param", type=Path,
|
| 729 |
+
default=Path("<DDPM_ROOT>/data/LH_data/params_6"))
|
| 730 |
p.add_argument("--bundle-2param", type=Path,
|
| 731 |
default=MODELS_ROOT / "notebook_model_weights" / "2param_epoch200")
|
| 732 |
p.add_argument("--bundle-6param", type=Path,
|
cross_model/poster.py
CHANGED
|
@@ -889,11 +889,11 @@ def parse_args() -> argparse.Namespace:
|
|
| 889 |
)
|
| 890 |
p.add_argument(
|
| 891 |
"--data-2param", type=Path,
|
| 892 |
-
default=Path("/
|
| 893 |
)
|
| 894 |
p.add_argument(
|
| 895 |
"--data-6param", type=Path,
|
| 896 |
-
default=Path("/
|
| 897 |
)
|
| 898 |
p.add_argument(
|
| 899 |
"--bundle-2param", type=Path,
|
|
|
|
| 889 |
)
|
| 890 |
p.add_argument(
|
| 891 |
"--data-2param", type=Path,
|
| 892 |
+
default=Path("<DDPM_ROOT>/data/LH_data/params_2"),
|
| 893 |
)
|
| 894 |
p.add_argument(
|
| 895 |
"--data-6param", type=Path,
|
| 896 |
+
default=Path("<DDPM_ROOT>/data/LH_data/params_6"),
|
| 897 |
)
|
| 898 |
p.add_argument(
|
| 899 |
"--bundle-2param", type=Path,
|
cross_model/run_compare_posterior.sh
CHANGED
|
@@ -1,12 +1,12 @@
|
|
| 1 |
#!/bin/bash
|
| 2 |
-
#SBATCH --account=
|
| 3 |
#SBATCH --partition=l40s
|
| 4 |
#SBATCH --nodes=1
|
| 5 |
#SBATCH --ntasks=8
|
| 6 |
#SBATCH --gres=gpu:l40s:1
|
| 7 |
#SBATCH --time=06:00:00
|
| 8 |
#SBATCH --job-name=cmp_post
|
| 9 |
-
#SBATCH --mail-user=
|
| 10 |
#SBATCH --output=slurm-cmp-post-%j.out
|
| 11 |
#SBATCH --error=slurm-cmp-post-%j.err
|
| 12 |
|
|
@@ -14,7 +14,7 @@
|
|
| 14 |
#
|
| 15 |
# Defaults: 30x30 grid, 4 anchors, 8 DDPM draws / pt, 20 marg draws.
|
| 16 |
# Submit:
|
| 17 |
-
# sbatch /
|
| 18 |
#
|
| 19 |
# Smoke test (much faster):
|
| 20 |
# sbatch run_compare_posterior.sh --grid 16 --n-pk-samples 4 \
|
|
@@ -22,7 +22,7 @@
|
|
| 22 |
|
| 23 |
set -euo pipefail
|
| 24 |
|
| 25 |
-
ROOT="/
|
| 26 |
cd "$ROOT"
|
| 27 |
|
| 28 |
module load python/miniconda3-py3.12-usr
|
|
|
|
| 1 |
#!/bin/bash
|
| 2 |
+
#SBATCH --account=<your-slurm-account>
|
| 3 |
#SBATCH --partition=l40s
|
| 4 |
#SBATCH --nodes=1
|
| 5 |
#SBATCH --ntasks=8
|
| 6 |
#SBATCH --gres=gpu:l40s:1
|
| 7 |
#SBATCH --time=06:00:00
|
| 8 |
#SBATCH --job-name=cmp_post
|
| 9 |
+
#SBATCH --mail-user=<your-email> # replace before submitting
|
| 10 |
#SBATCH --output=slurm-cmp-post-%j.out
|
| 11 |
#SBATCH --error=slurm-cmp-post-%j.err
|
| 12 |
|
|
|
|
| 14 |
#
|
| 15 |
# Defaults: 30x30 grid, 4 anchors, 8 DDPM draws / pt, 20 marg draws.
|
| 16 |
# Submit:
|
| 17 |
+
# sbatch <DDPM_ROOT>/Models/run_compare_posterior.sh
|
| 18 |
#
|
| 19 |
# Smoke test (much faster):
|
| 20 |
# sbatch run_compare_posterior.sh --grid 16 --n-pk-samples 4 \
|
|
|
|
| 22 |
|
| 23 |
set -euo pipefail
|
| 24 |
|
| 25 |
+
ROOT="<DDPM_ROOT>/Models"
|
| 26 |
cd "$ROOT"
|
| 27 |
|
| 28 |
module load python/miniconda3-py3.12-usr
|
cross_model/run_vlb_inference_1000grid.sh
CHANGED
|
@@ -1,12 +1,12 @@
|
|
| 1 |
#!/bin/bash
|
| 2 |
-
#SBATCH --account=
|
| 3 |
#SBATCH --partition=l40s
|
| 4 |
#SBATCH --nodes=1
|
| 5 |
#SBATCH --ntasks=8
|
| 6 |
#SBATCH --gres=gpu:l40s:1
|
| 7 |
#SBATCH --time=48:00:00
|
| 8 |
#SBATCH --job-name=vlb_infer_1000
|
| 9 |
-
#SBATCH --mail-user=
|
| 10 |
#SBATCH --output=slurm-vlb-infer-1000-%j.out
|
| 11 |
#SBATCH --error=slurm-vlb-infer-1000-%j.err
|
| 12 |
|
|
@@ -16,7 +16,7 @@
|
|
| 16 |
# plus field0X_combined.png (contours + L_0 posterior side-by-side).
|
| 17 |
#
|
| 18 |
# Submit:
|
| 19 |
-
# sbatch /
|
| 20 |
#
|
| 21 |
# Default: grid_size=1000, n_fields=9, span=0.10, generates mosaic + combined figures.
|
| 22 |
# Est. runtime: ~18-24 hours on L40S.
|
|
@@ -31,7 +31,7 @@
|
|
| 31 |
|
| 32 |
set -euo pipefail
|
| 33 |
|
| 34 |
-
ROOT="/
|
| 35 |
cd "$ROOT"
|
| 36 |
|
| 37 |
module load python/miniconda3-py3.12-usr
|
|
@@ -41,7 +41,7 @@ OUT="${OUTPUT_DIR:-${ROOT}/vlb_inference_outputs_1000grid}"
|
|
| 41 |
|
| 42 |
CHK="${CHECKPOINT:-${ROOT}/notebook_model_weights/6param_best/best_model.pt}"
|
| 43 |
ARGS="${TRAINING_ARGS:-${ROOT}/notebook_model_weights/6param_best/args.json}"
|
| 44 |
-
DATA="${DATA_DIR:-/
|
| 45 |
|
| 46 |
mkdir -p "${OUT}"
|
| 47 |
RUN_LOG="${CUSTOM_LOG:-${OUT}/run_log.txt}"
|
|
|
|
| 1 |
#!/bin/bash
|
| 2 |
+
#SBATCH --account=<your-slurm-account>
|
| 3 |
#SBATCH --partition=l40s
|
| 4 |
#SBATCH --nodes=1
|
| 5 |
#SBATCH --ntasks=8
|
| 6 |
#SBATCH --gres=gpu:l40s:1
|
| 7 |
#SBATCH --time=48:00:00
|
| 8 |
#SBATCH --job-name=vlb_infer_1000
|
| 9 |
+
#SBATCH --mail-user=<your-email> # replace before submitting
|
| 10 |
#SBATCH --output=slurm-vlb-infer-1000-%j.out
|
| 11 |
#SBATCH --error=slurm-vlb-infer-1000-%j.err
|
| 12 |
|
|
|
|
| 16 |
# plus field0X_combined.png (contours + L_0 posterior side-by-side).
|
| 17 |
#
|
| 18 |
# Submit:
|
| 19 |
+
# sbatch <DDPM_ROOT>/Models/scripts/run_vlb_inference_1000grid.sh
|
| 20 |
#
|
| 21 |
# Default: grid_size=1000, n_fields=9, span=0.10, generates mosaic + combined figures.
|
| 22 |
# Est. runtime: ~18-24 hours on L40S.
|
|
|
|
| 31 |
|
| 32 |
set -euo pipefail
|
| 33 |
|
| 34 |
+
ROOT="<DDPM_ROOT>/Models"
|
| 35 |
cd "$ROOT"
|
| 36 |
|
| 37 |
module load python/miniconda3-py3.12-usr
|
|
|
|
| 41 |
|
| 42 |
CHK="${CHECKPOINT:-${ROOT}/notebook_model_weights/6param_best/best_model.pt}"
|
| 43 |
ARGS="${TRAINING_ARGS:-${ROOT}/notebook_model_weights/6param_best/args.json}"
|
| 44 |
+
DATA="${DATA_DIR:-<DDPM_ROOT>/data/LH_data/params_6}"
|
| 45 |
|
| 46 |
mkdir -p "${OUT}"
|
| 47 |
RUN_LOG="${CUSTOM_LOG:-${OUT}/run_log.txt}"
|
cross_model/run_vlb_inference_200grid.sh
CHANGED
|
@@ -1,12 +1,12 @@
|
|
| 1 |
#!/bin/bash
|
| 2 |
-
#SBATCH --account=
|
| 3 |
#SBATCH --partition=l40s
|
| 4 |
#SBATCH --nodes=1
|
| 5 |
#SBATCH --ntasks=8
|
| 6 |
#SBATCH --gres=gpu:l40s:1
|
| 7 |
#SBATCH --time=12:00:00
|
| 8 |
#SBATCH --job-name=vlb_infer_200
|
| 9 |
-
#SBATCH --mail-user=
|
| 10 |
#SBATCH --output=slurm-vlb-infer-200-%j.out
|
| 11 |
#SBATCH --error=slurm-vlb-infer-200-%j.err
|
| 12 |
|
|
@@ -19,7 +19,7 @@
|
|
| 19 |
# Est. runtime: ~2-3 hours on L40S.
|
| 20 |
#
|
| 21 |
# Submit:
|
| 22 |
-
# sbatch /
|
| 23 |
#
|
| 24 |
# Override via --export or command-line args:
|
| 25 |
# sbatch --export=OUTPUT_DIR=/path/custom_output run_vlb_inference_200grid.sh
|
|
@@ -29,7 +29,7 @@
|
|
| 29 |
|
| 30 |
set -euo pipefail
|
| 31 |
|
| 32 |
-
ROOT="/
|
| 33 |
cd "$ROOT"
|
| 34 |
|
| 35 |
module load python/miniconda3-py3.12-usr
|
|
@@ -39,7 +39,7 @@ OUT="${OUTPUT_DIR:-${ROOT}/vlb_inference_outputs_200grid}"
|
|
| 39 |
|
| 40 |
CHK="${CHECKPOINT:-${ROOT}/notebook_model_weights/6param_best/best_model.pt}"
|
| 41 |
ARGS="${TRAINING_ARGS:-${ROOT}/notebook_model_weights/6param_best/args.json}"
|
| 42 |
-
DATA="${DATA_DIR:-/
|
| 43 |
|
| 44 |
mkdir -p "${OUT}"
|
| 45 |
RUN_LOG="${CUSTOM_LOG:-${OUT}/run_log.txt}"
|
|
|
|
| 1 |
#!/bin/bash
|
| 2 |
+
#SBATCH --account=<your-slurm-account>
|
| 3 |
#SBATCH --partition=l40s
|
| 4 |
#SBATCH --nodes=1
|
| 5 |
#SBATCH --ntasks=8
|
| 6 |
#SBATCH --gres=gpu:l40s:1
|
| 7 |
#SBATCH --time=12:00:00
|
| 8 |
#SBATCH --job-name=vlb_infer_200
|
| 9 |
+
#SBATCH --mail-user=<your-email> # replace before submitting
|
| 10 |
#SBATCH --output=slurm-vlb-infer-200-%j.out
|
| 11 |
#SBATCH --error=slurm-vlb-infer-200-%j.err
|
| 12 |
|
|
|
|
| 19 |
# Est. runtime: ~2-3 hours on L40S.
|
| 20 |
#
|
| 21 |
# Submit:
|
| 22 |
+
# sbatch <DDPM_ROOT>/Models/run_vlb_inference_200grid.sh
|
| 23 |
#
|
| 24 |
# Override via --export or command-line args:
|
| 25 |
# sbatch --export=OUTPUT_DIR=/path/custom_output run_vlb_inference_200grid.sh
|
|
|
|
| 29 |
|
| 30 |
set -euo pipefail
|
| 31 |
|
| 32 |
+
ROOT="<DDPM_ROOT>/Models"
|
| 33 |
cd "$ROOT"
|
| 34 |
|
| 35 |
module load python/miniconda3-py3.12-usr
|
|
|
|
| 39 |
|
| 40 |
CHK="${CHECKPOINT:-${ROOT}/notebook_model_weights/6param_best/best_model.pt}"
|
| 41 |
ARGS="${TRAINING_ARGS:-${ROOT}/notebook_model_weights/6param_best/args.json}"
|
| 42 |
+
DATA="${DATA_DIR:-<DDPM_ROOT>/data/LH_data/params_6}"
|
| 43 |
|
| 44 |
mkdir -p "${OUT}"
|
| 45 |
RUN_LOG="${CUSTOM_LOG:-${OUT}/run_log.txt}"
|
cross_model/scripts/compare_ddpm_models.py
CHANGED
|
@@ -47,7 +47,7 @@ from compare_ddpm_training_curves import ( # noqa: E402
|
|
| 47 |
)
|
| 48 |
|
| 49 |
DEFAULT_SLURM_6 = Path(
|
| 50 |
-
"/
|
| 51 |
)
|
| 52 |
# Bundled train/val (no 2-param Slurm log in-repo); see ``ddpm_2param_training_loss.json``.
|
| 53 |
DEFAULT_DDPM2_TRAINING = (Path(__file__).resolve().parent / "ddpm_2param_training_loss.json")
|
|
@@ -635,8 +635,8 @@ def main(argv: Sequence[str] | None = None) -> None:
|
|
| 635 |
type=Path,
|
| 636 |
default=MODELS_ROOT / "ddpm_comparison_out",
|
| 637 |
)
|
| 638 |
-
p.add_argument("--data-2param", type=Path, default=Path("/
|
| 639 |
-
p.add_argument("--data-6param", type=Path, default=Path("/
|
| 640 |
p.add_argument(
|
| 641 |
"--bundle-2param",
|
| 642 |
type=Path,
|
|
|
|
| 47 |
)
|
| 48 |
|
| 49 |
DEFAULT_SLURM_6 = Path(
|
| 50 |
+
"<DDPM_ROOT>/april_26/ddpm_hi_lh6/scripts/shell/slurm-698243.out"
|
| 51 |
)
|
| 52 |
# Bundled train/val (no 2-param Slurm log in-repo); see ``ddpm_2param_training_loss.json``.
|
| 53 |
DEFAULT_DDPM2_TRAINING = (Path(__file__).resolve().parent / "ddpm_2param_training_loss.json")
|
|
|
|
| 635 |
type=Path,
|
| 636 |
default=MODELS_ROOT / "ddpm_comparison_out",
|
| 637 |
)
|
| 638 |
+
p.add_argument("--data-2param", type=Path, default=Path("<DDPM_ROOT>/data/LH_data/params_2"))
|
| 639 |
+
p.add_argument("--data-6param", type=Path, default=Path("<DDPM_ROOT>/data/LH_data/params_6"))
|
| 640 |
p.add_argument(
|
| 641 |
"--bundle-2param",
|
| 642 |
type=Path,
|
cross_model/scripts/ddpm_posterior_six_anchors.py
CHANGED
|
@@ -323,8 +323,8 @@ def main() -> None:
|
|
| 323 |
description="Six-anchor surrogate posteriors: DDPM-2 and DDPM-6 (extra dims min vs max)."
|
| 324 |
)
|
| 325 |
p.add_argument("--output-dir", type=Path, default=MODELS_ROOT / "ddpm_posterior_six_anchors_out")
|
| 326 |
-
p.add_argument("--data-2param", type=Path, default=Path("/
|
| 327 |
-
p.add_argument("--data-6param", type=Path, default=Path("/
|
| 328 |
p.add_argument(
|
| 329 |
"--bundle-2param",
|
| 330 |
type=Path,
|
|
|
|
| 323 |
description="Six-anchor surrogate posteriors: DDPM-2 and DDPM-6 (extra dims min vs max)."
|
| 324 |
)
|
| 325 |
p.add_argument("--output-dir", type=Path, default=MODELS_ROOT / "ddpm_posterior_six_anchors_out")
|
| 326 |
+
p.add_argument("--data-2param", type=Path, default=Path("<DDPM_ROOT>/data/LH_data/params_2"))
|
| 327 |
+
p.add_argument("--data-6param", type=Path, default=Path("<DDPM_ROOT>/data/LH_data/params_6"))
|
| 328 |
p.add_argument(
|
| 329 |
"--bundle-2param",
|
| 330 |
type=Path,
|
cross_model/scripts/ddpm_triangle_integration.py
CHANGED
|
@@ -109,11 +109,11 @@ def main() -> None:
|
|
| 109 |
|
| 110 |
ld = args.label_dim
|
| 111 |
if ld == 2:
|
| 112 |
-
data_dir = args.data_dir or Path("/
|
| 113 |
bundle = args.bundle or MODELS_ROOT / "notebook_model_weights" / "2param_epoch200"
|
| 114 |
ck_name = args.checkpoint_name or "checkpoint_epoch_200.pt"
|
| 115 |
else:
|
| 116 |
-
data_dir = args.data_dir or Path("/
|
| 117 |
bundle = args.bundle or MODELS_ROOT / "notebook_model_weights" / "6param_best"
|
| 118 |
ck_name = args.checkpoint_name or "best_model.pt"
|
| 119 |
|
|
|
|
| 109 |
|
| 110 |
ld = args.label_dim
|
| 111 |
if ld == 2:
|
| 112 |
+
data_dir = args.data_dir or Path("<DDPM_ROOT>/data/LH_data/params_2")
|
| 113 |
bundle = args.bundle or MODELS_ROOT / "notebook_model_weights" / "2param_epoch200"
|
| 114 |
ck_name = args.checkpoint_name or "checkpoint_epoch_200.pt"
|
| 115 |
else:
|
| 116 |
+
data_dir = args.data_dir or Path("<DDPM_ROOT>/data/LH_data/params_6")
|
| 117 |
bundle = args.bundle or MODELS_ROOT / "notebook_model_weights" / "6param_best"
|
| 118 |
ck_name = args.checkpoint_name or "best_model.pt"
|
| 119 |
|
cross_model/scripts/run_ddpm_comparison.sh
CHANGED
|
@@ -1,33 +1,33 @@
|
|
| 1 |
#!/bin/bash
|
| 2 |
-
#SBATCH --account=
|
| 3 |
#SBATCH --partition=l40s
|
| 4 |
#SBATCH --nodes=1
|
| 5 |
#SBATCH --ntasks=8
|
| 6 |
#SBATCH --gres=gpu:l40s:1
|
| 7 |
#SBATCH --time=24:00:00
|
| 8 |
#SBATCH --job-name=ddpm_compare
|
| 9 |
-
#SBATCH --mail-user=
|
| 10 |
#SBATCH --output=slurm-ddpm-compare-%j.out
|
| 11 |
#SBATCH --error=slurm-ddpm-compare-%j.err
|
| 12 |
|
| 13 |
# DDPM-2 vs DDPM-6 comparison (same cluster layout as 6-param training — see reference below).
|
| 14 |
#
|
| 15 |
# Reference training script (Slurm + module + paths pattern):
|
| 16 |
-
# /
|
| 17 |
#
|
| 18 |
# Submit from anywhere:
|
| 19 |
-
# sbatch /
|
| 20 |
#
|
| 21 |
# Extra CLI args for compare_ddpm_models.py pass through, e.g. LHS off:
|
| 22 |
-
# sbatch /
|
| 23 |
#
|
| 24 |
# Override output dir (optional):
|
| 25 |
-
# sbatch --export=OUTPUT_DIR=/
|
| 26 |
-
# /
|
| 27 |
#
|
| 28 |
# Optional: override DDPM-2 train/val for the combined loss plot (default: bundled JSON in Models/scripts/):
|
| 29 |
# sbatch --export=SLURM_2PARAM=/path/to/slurm-2param-ddpm.out \
|
| 30 |
-
# /
|
| 31 |
#
|
| 32 |
# Interactive (same module as training script):
|
| 33 |
# module load python/miniconda3-py3.12-usr
|
|
@@ -35,7 +35,7 @@
|
|
| 35 |
|
| 36 |
set -euo pipefail
|
| 37 |
|
| 38 |
-
ROOT="/
|
| 39 |
cd "$ROOT"
|
| 40 |
|
| 41 |
module load python/miniconda3-py3.12-usr
|
|
|
|
| 1 |
#!/bin/bash
|
| 2 |
+
#SBATCH --account=<your-slurm-account>
|
| 3 |
#SBATCH --partition=l40s
|
| 4 |
#SBATCH --nodes=1
|
| 5 |
#SBATCH --ntasks=8
|
| 6 |
#SBATCH --gres=gpu:l40s:1
|
| 7 |
#SBATCH --time=24:00:00
|
| 8 |
#SBATCH --job-name=ddpm_compare
|
| 9 |
+
#SBATCH --mail-user=<your-email> # replace before submitting
|
| 10 |
#SBATCH --output=slurm-ddpm-compare-%j.out
|
| 11 |
#SBATCH --error=slurm-ddpm-compare-%j.err
|
| 12 |
|
| 13 |
# DDPM-2 vs DDPM-6 comparison (same cluster layout as 6-param training — see reference below).
|
| 14 |
#
|
| 15 |
# Reference training script (Slurm + module + paths pattern):
|
| 16 |
+
# <DDPM_ROOT>/april_26/ddpm_hi_lh6/scripts/shell/train_conditional_lh6.sh
|
| 17 |
#
|
| 18 |
# Submit from anywhere:
|
| 19 |
+
# sbatch <DDPM_ROOT>/Models/scripts/run_ddpm_comparison.sh
|
| 20 |
#
|
| 21 |
# Extra CLI args for compare_ddpm_models.py pass through, e.g. LHS off:
|
| 22 |
+
# sbatch <DDPM_ROOT>/Models/scripts/run_ddpm_comparison.sh --skip-lhs-r2
|
| 23 |
#
|
| 24 |
# Override output dir (optional):
|
| 25 |
+
# sbatch --export=OUTPUT_DIR=<DDPM_ROOT>/Models/ddpm_comparison_out_ab \
|
| 26 |
+
# <DDPM_ROOT>/Models/scripts/run_ddpm_comparison.sh
|
| 27 |
#
|
| 28 |
# Optional: override DDPM-2 train/val for the combined loss plot (default: bundled JSON in Models/scripts/):
|
| 29 |
# sbatch --export=SLURM_2PARAM=/path/to/slurm-2param-ddpm.out \
|
| 30 |
+
# <DDPM_ROOT>/Models/scripts/run_ddpm_comparison.sh
|
| 31 |
#
|
| 32 |
# Interactive (same module as training script):
|
| 33 |
# module load python/miniconda3-py3.12-usr
|
|
|
|
| 35 |
|
| 36 |
set -euo pipefail
|
| 37 |
|
| 38 |
+
ROOT="<DDPM_ROOT>/Models"
|
| 39 |
cd "$ROOT"
|
| 40 |
|
| 41 |
module load python/miniconda3-py3.12-usr
|
cross_model/scripts/run_ddpm_figure6.sh
CHANGED
|
@@ -1,22 +1,22 @@
|
|
| 1 |
#!/bin/bash
|
| 2 |
-
#SBATCH --account=
|
| 3 |
#SBATCH --partition=l40s
|
| 4 |
#SBATCH --nodes=1
|
| 5 |
#SBATCH --ntasks=8
|
| 6 |
#SBATCH --gres=gpu:l40s:1
|
| 7 |
#SBATCH --time=24:00:00
|
| 8 |
#SBATCH --job-name=ddpm_fig6
|
| 9 |
-
#SBATCH --mail-user=
|
| 10 |
#SBATCH --output=slurm-ddpm-figure6-%j.out
|
| 11 |
#SBATCH --error=slurm-ddpm-figure6-%j.err
|
| 12 |
|
| 13 |
# Figure 6 style (arXiv:2409.09101-inspired) surrogate posteriors for DDPM-2 / DDPM-6.
|
| 14 |
-
# sbatch /
|
| 15 |
# sbatch --export=OUTPUT_DIR=/path/to/out,TEST_INDEX=42 .../run_ddpm_figure6.sh --no-six-grid
|
| 16 |
#
|
| 17 |
set -euo pipefail
|
| 18 |
|
| 19 |
-
ROOT="/
|
| 20 |
cd "$ROOT"
|
| 21 |
module load python/miniconda3-py3.12-usr
|
| 22 |
|
|
|
|
| 1 |
#!/bin/bash
|
| 2 |
+
#SBATCH --account=<your-slurm-account>
|
| 3 |
#SBATCH --partition=l40s
|
| 4 |
#SBATCH --nodes=1
|
| 5 |
#SBATCH --ntasks=8
|
| 6 |
#SBATCH --gres=gpu:l40s:1
|
| 7 |
#SBATCH --time=24:00:00
|
| 8 |
#SBATCH --job-name=ddpm_fig6
|
| 9 |
+
#SBATCH --mail-user=<your-email> # replace before submitting
|
| 10 |
#SBATCH --output=slurm-ddpm-figure6-%j.out
|
| 11 |
#SBATCH --error=slurm-ddpm-figure6-%j.err
|
| 12 |
|
| 13 |
# Figure 6 style (arXiv:2409.09101-inspired) surrogate posteriors for DDPM-2 / DDPM-6.
|
| 14 |
+
# sbatch <DDPM_ROOT>/Models/scripts/run_ddpm_figure6.sh
|
| 15 |
# sbatch --export=OUTPUT_DIR=/path/to/out,TEST_INDEX=42 .../run_ddpm_figure6.sh --no-six-grid
|
| 16 |
#
|
| 17 |
set -euo pipefail
|
| 18 |
|
| 19 |
+
ROOT="<DDPM_ROOT>/Models"
|
| 20 |
cd "$ROOT"
|
| 21 |
module load python/miniconda3-py3.12-usr
|
| 22 |
|
cross_model/scripts/run_ddpm_figure6_suite.py
CHANGED
|
@@ -35,8 +35,8 @@ from ddpm_figure6_integration import ( # noqa: E402
|
|
| 35 |
def main() -> None:
|
| 36 |
p = argparse.ArgumentParser(description="DDPM Figure-6 style posterior suite.")
|
| 37 |
p.add_argument("--output-dir", type=Path, default=MODELS_ROOT / "ddpm_figure6_out")
|
| 38 |
-
p.add_argument("--data-2param", type=Path, default=Path("/
|
| 39 |
-
p.add_argument("--data-6param", type=Path, default=Path("/
|
| 40 |
p.add_argument(
|
| 41 |
"--bundle-2param",
|
| 42 |
type=Path,
|
|
|
|
| 35 |
def main() -> None:
|
| 36 |
p = argparse.ArgumentParser(description="DDPM Figure-6 style posterior suite.")
|
| 37 |
p.add_argument("--output-dir", type=Path, default=MODELS_ROOT / "ddpm_figure6_out")
|
| 38 |
+
p.add_argument("--data-2param", type=Path, default=Path("<DDPM_ROOT>/data/LH_data/params_2"))
|
| 39 |
+
p.add_argument("--data-6param", type=Path, default=Path("<DDPM_ROOT>/data/LH_data/params_6"))
|
| 40 |
p.add_argument(
|
| 41 |
"--bundle-2param",
|
| 42 |
type=Path,
|
cross_model/scripts/run_ddpm_posterior_corrected.sh
CHANGED
|
@@ -1,12 +1,12 @@
|
|
| 1 |
#!/bin/bash
|
| 2 |
-
#SBATCH --account=
|
| 3 |
#SBATCH --partition=l40s
|
| 4 |
#SBATCH --nodes=1
|
| 5 |
#SBATCH --ntasks=8
|
| 6 |
#SBATCH --gres=gpu:l40s:1
|
| 7 |
#SBATCH --time=48:00:00
|
| 8 |
#SBATCH --job-name=ddpm_post_corr
|
| 9 |
-
#SBATCH --mail-user=
|
| 10 |
#SBATCH --output=slurm-ddpm-post-corr-%j.out
|
| 11 |
#SBATCH --error=slurm-ddpm-post-corr-%j.err
|
| 12 |
|
|
@@ -14,7 +14,7 @@
|
|
| 14 |
# Separate from poster.py — default output dir is ddpm_posterior_corrected_fullviz_out.
|
| 15 |
#
|
| 16 |
# Submit:
|
| 17 |
-
# sbatch /
|
| 18 |
#
|
| 19 |
# Extra args pass through to the Python script:
|
| 20 |
# sbatch .../run_ddpm_posterior_corrected.sh --ddpm2-only --grid 20 --n-ddpm-samples 4 --no-ppc
|
|
@@ -29,7 +29,7 @@
|
|
| 29 |
|
| 30 |
set -euo pipefail
|
| 31 |
|
| 32 |
-
ROOT="/
|
| 33 |
cd "$ROOT"
|
| 34 |
|
| 35 |
module load python/miniconda3-py3.12-usr
|
|
|
|
| 1 |
#!/bin/bash
|
| 2 |
+
#SBATCH --account=<your-slurm-account>
|
| 3 |
#SBATCH --partition=l40s
|
| 4 |
#SBATCH --nodes=1
|
| 5 |
#SBATCH --ntasks=8
|
| 6 |
#SBATCH --gres=gpu:l40s:1
|
| 7 |
#SBATCH --time=48:00:00
|
| 8 |
#SBATCH --job-name=ddpm_post_corr
|
| 9 |
+
#SBATCH --mail-user=<your-email> # replace before submitting
|
| 10 |
#SBATCH --output=slurm-ddpm-post-corr-%j.out
|
| 11 |
#SBATCH --error=slurm-ddpm-post-corr-%j.err
|
| 12 |
|
|
|
|
| 14 |
# Separate from poster.py — default output dir is ddpm_posterior_corrected_fullviz_out.
|
| 15 |
#
|
| 16 |
# Submit:
|
| 17 |
+
# sbatch <DDPM_ROOT>/Models/scripts/run_ddpm_posterior_corrected.sh
|
| 18 |
#
|
| 19 |
# Extra args pass through to the Python script:
|
| 20 |
# sbatch .../run_ddpm_posterior_corrected.sh --ddpm2-only --grid 20 --n-ddpm-samples 4 --no-ppc
|
|
|
|
| 29 |
|
| 30 |
set -euo pipefail
|
| 31 |
|
| 32 |
+
ROOT="<DDPM_ROOT>/Models"
|
| 33 |
cd "$ROOT"
|
| 34 |
|
| 35 |
module load python/miniconda3-py3.12-usr
|
cross_model/scripts/run_ddpm_posterior_six_anchors.sh
CHANGED
|
@@ -1,23 +1,23 @@
|
|
| 1 |
#!/bin/bash
|
| 2 |
-
#SBATCH --account=
|
| 3 |
#SBATCH --partition=l40s
|
| 4 |
#SBATCH --nodes=1
|
| 5 |
#SBATCH --ntasks=8
|
| 6 |
#SBATCH --gres=gpu:l40s:1
|
| 7 |
#SBATCH --time=48:00:00
|
| 8 |
#SBATCH --job-name=ddpm_post6
|
| 9 |
-
#SBATCH --mail-user=
|
| 10 |
#SBATCH --output=slurm-ddpm-posterior-six-%j.out
|
| 11 |
#SBATCH --error=slurm-ddpm-posterior-six-%j.err
|
| 12 |
|
| 13 |
# Six-anchor surrogate posteriors (DDPM-2 + DDPM-6 with extra dims min/max).
|
| 14 |
#
|
| 15 |
# Submit from anywhere:
|
| 16 |
-
# sbatch /
|
| 17 |
#
|
| 18 |
# Override output directory:
|
| 19 |
-
# sbatch --export=OUTPUT_DIR=/
|
| 20 |
-
# /
|
| 21 |
#
|
| 22 |
# Extra CLI passes through to ddpm_posterior_six_anchors.py, e.g. only DDPM-6 panels:
|
| 23 |
# sbatch .../run_ddpm_posterior_six_anchors.sh --ddpm6-only --grid 12
|
|
@@ -28,7 +28,7 @@
|
|
| 28 |
|
| 29 |
set -euo pipefail
|
| 30 |
|
| 31 |
-
ROOT="/
|
| 32 |
cd "$ROOT"
|
| 33 |
|
| 34 |
module load python/miniconda3-py3.12-usr
|
|
|
|
| 1 |
#!/bin/bash
|
| 2 |
+
#SBATCH --account=<your-slurm-account>
|
| 3 |
#SBATCH --partition=l40s
|
| 4 |
#SBATCH --nodes=1
|
| 5 |
#SBATCH --ntasks=8
|
| 6 |
#SBATCH --gres=gpu:l40s:1
|
| 7 |
#SBATCH --time=48:00:00
|
| 8 |
#SBATCH --job-name=ddpm_post6
|
| 9 |
+
#SBATCH --mail-user=<your-email> # replace before submitting
|
| 10 |
#SBATCH --output=slurm-ddpm-posterior-six-%j.out
|
| 11 |
#SBATCH --error=slurm-ddpm-posterior-six-%j.err
|
| 12 |
|
| 13 |
# Six-anchor surrogate posteriors (DDPM-2 + DDPM-6 with extra dims min/max).
|
| 14 |
#
|
| 15 |
# Submit from anywhere:
|
| 16 |
+
# sbatch <DDPM_ROOT>/Models/scripts/run_ddpm_posterior_six_anchors.sh
|
| 17 |
#
|
| 18 |
# Override output directory:
|
| 19 |
+
# sbatch --export=OUTPUT_DIR=<DDPM_ROOT>/Models/my_post_out \
|
| 20 |
+
# <DDPM_ROOT>/Models/scripts/run_ddpm_posterior_six_anchors.sh
|
| 21 |
#
|
| 22 |
# Extra CLI passes through to ddpm_posterior_six_anchors.py, e.g. only DDPM-6 panels:
|
| 23 |
# sbatch .../run_ddpm_posterior_six_anchors.sh --ddpm6-only --grid 12
|
|
|
|
| 28 |
|
| 29 |
set -euo pipefail
|
| 30 |
|
| 31 |
+
ROOT="<DDPM_ROOT>/Models"
|
| 32 |
cd "$ROOT"
|
| 33 |
|
| 34 |
module load python/miniconda3-py3.12-usr
|
cross_model/scripts/run_poster.sh
CHANGED
|
@@ -1,12 +1,12 @@
|
|
| 1 |
#!/bin/bash
|
| 2 |
-
#SBATCH --account=
|
| 3 |
#SBATCH --partition=l40s
|
| 4 |
#SBATCH --nodes=1
|
| 5 |
#SBATCH --ntasks=8
|
| 6 |
#SBATCH --gres=gpu:l40s:1
|
| 7 |
#SBATCH --time=24:00:00
|
| 8 |
#SBATCH --job-name=ddpm_poster
|
| 9 |
-
#SBATCH --mail-user=
|
| 10 |
#SBATCH --output=slurm-ddpm-poster-%j.out
|
| 11 |
#SBATCH --error=slurm-ddpm-poster-%j.err
|
| 12 |
|
|
@@ -14,22 +14,22 @@
|
|
| 14 |
# stochastic averaging, calibrated sigma_pk, MC marginalisation for 6-param, etc.
|
| 15 |
#
|
| 16 |
# Submit from anywhere:
|
| 17 |
-
# sbatch /
|
| 18 |
#
|
| 19 |
# Override output directory:
|
| 20 |
-
# sbatch --export=OUTPUT_DIR=/
|
| 21 |
-
# /
|
| 22 |
#
|
| 23 |
# Extra CLI passes through to poster.py, e.g. DDPM-2 only (faster debug):
|
| 24 |
# sbatch .../run_poster.sh --ddpm2-only --grid 14 --n-pk-samples 4 --n-marg-samples 1 --no-ppc
|
| 25 |
#
|
| 26 |
# Interactive (same module as other Models scripts):
|
| 27 |
# module load python/miniconda3-py3.12-usr
|
| 28 |
-
# bash /
|
| 29 |
|
| 30 |
set -euo pipefail
|
| 31 |
|
| 32 |
-
ROOT="/
|
| 33 |
cd "$ROOT"
|
| 34 |
|
| 35 |
module load python/miniconda3-py3.12-usr
|
|
|
|
| 1 |
#!/bin/bash
|
| 2 |
+
#SBATCH --account=<your-slurm-account>
|
| 3 |
#SBATCH --partition=l40s
|
| 4 |
#SBATCH --nodes=1
|
| 5 |
#SBATCH --ntasks=8
|
| 6 |
#SBATCH --gres=gpu:l40s:1
|
| 7 |
#SBATCH --time=24:00:00
|
| 8 |
#SBATCH --job-name=ddpm_poster
|
| 9 |
+
#SBATCH --mail-user=<your-email> # replace before submitting
|
| 10 |
#SBATCH --output=slurm-ddpm-poster-%j.out
|
| 11 |
#SBATCH --error=slurm-ddpm-poster-%j.err
|
| 12 |
|
|
|
|
| 14 |
# stochastic averaging, calibrated sigma_pk, MC marginalisation for 6-param, etc.
|
| 15 |
#
|
| 16 |
# Submit from anywhere:
|
| 17 |
+
# sbatch <DDPM_ROOT>/Models/scripts/run_poster.sh
|
| 18 |
#
|
| 19 |
# Override output directory:
|
| 20 |
+
# sbatch --export=OUTPUT_DIR=<DDPM_ROOT>/Models/my_poster_out \
|
| 21 |
+
# <DDPM_ROOT>/Models/scripts/run_poster.sh
|
| 22 |
#
|
| 23 |
# Extra CLI passes through to poster.py, e.g. DDPM-2 only (faster debug):
|
| 24 |
# sbatch .../run_poster.sh --ddpm2-only --grid 14 --n-pk-samples 4 --n-marg-samples 1 --no-ppc
|
| 25 |
#
|
| 26 |
# Interactive (same module as other Models scripts):
|
| 27 |
# module load python/miniconda3-py3.12-usr
|
| 28 |
+
# bash <DDPM_ROOT>/Models/scripts/run_poster.sh --help
|
| 29 |
|
| 30 |
set -euo pipefail
|
| 31 |
|
| 32 |
+
ROOT="<DDPM_ROOT>/Models"
|
| 33 |
cd "$ROOT"
|
| 34 |
|
| 35 |
module load python/miniconda3-py3.12-usr
|
cross_model/scripts/run_posterior_inference.sh
CHANGED
|
@@ -1,12 +1,12 @@
|
|
| 1 |
#!/bin/bash
|
| 2 |
-
#SBATCH --account=
|
| 3 |
#SBATCH --partition=l40s
|
| 4 |
#SBATCH --nodes=1
|
| 5 |
#SBATCH --ntasks=8
|
| 6 |
#SBATCH --gres=gpu:l40s:1
|
| 7 |
#SBATCH --time=48:00:00
|
| 8 |
#SBATCH --job-name=vlb_infer
|
| 9 |
-
#SBATCH --mail-user=
|
| 10 |
#SBATCH --output=slurm-vlb-infer-%j.out
|
| 11 |
#SBATCH --error=slurm-vlb-infer-%j.err
|
| 12 |
|
|
@@ -15,7 +15,7 @@
|
|
| 15 |
# Defaults match bundled 6-param checkpoint + LH test data (override via env).
|
| 16 |
#
|
| 17 |
# Submit:
|
| 18 |
-
# sbatch /
|
| 19 |
#
|
| 20 |
# Defaults (posterior_inference.py): n_fields=9, grid_size=10000 (needs --allow_huge_grid),
|
| 21 |
# mosaic figure posterior_L0_mosaic_3x3.png at ~10000×10000 px.
|
|
@@ -31,7 +31,7 @@
|
|
| 31 |
|
| 32 |
set -euo pipefail
|
| 33 |
|
| 34 |
-
ROOT="/
|
| 35 |
cd "$ROOT"
|
| 36 |
|
| 37 |
module load python/miniconda3-py3.12-usr
|
|
@@ -41,7 +41,7 @@ OUT="${OUTPUT_DIR:-${ROOT}/vlb_inference_outputs}"
|
|
| 41 |
|
| 42 |
CHK="${CHECKPOINT:-${ROOT}/notebook_model_weights/6param_best/best_model.pt}"
|
| 43 |
ARGS="${TRAINING_ARGS:-${ROOT}/notebook_model_weights/6param_best/args.json}"
|
| 44 |
-
DATA="${DATA_DIR:-/
|
| 45 |
|
| 46 |
mkdir -p "${OUT}"
|
| 47 |
RUN_LOG="${CUSTOM_LOG:-${OUT}/run_log.txt}"
|
|
|
|
| 1 |
#!/bin/bash
|
| 2 |
+
#SBATCH --account=<your-slurm-account>
|
| 3 |
#SBATCH --partition=l40s
|
| 4 |
#SBATCH --nodes=1
|
| 5 |
#SBATCH --ntasks=8
|
| 6 |
#SBATCH --gres=gpu:l40s:1
|
| 7 |
#SBATCH --time=48:00:00
|
| 8 |
#SBATCH --job-name=vlb_infer
|
| 9 |
+
#SBATCH --mail-user=<your-email> # replace before submitting
|
| 10 |
#SBATCH --output=slurm-vlb-infer-%j.out
|
| 11 |
#SBATCH --error=slurm-vlb-infer-%j.err
|
| 12 |
|
|
|
|
| 15 |
# Defaults match bundled 6-param checkpoint + LH test data (override via env).
|
| 16 |
#
|
| 17 |
# Submit:
|
| 18 |
+
# sbatch <DDPM_ROOT>/Models/scripts/run_posterior_inference.sh
|
| 19 |
#
|
| 20 |
# Defaults (posterior_inference.py): n_fields=9, grid_size=10000 (needs --allow_huge_grid),
|
| 21 |
# mosaic figure posterior_L0_mosaic_3x3.png at ~10000×10000 px.
|
|
|
|
| 31 |
|
| 32 |
set -euo pipefail
|
| 33 |
|
| 34 |
+
ROOT="<DDPM_ROOT>/Models"
|
| 35 |
cd "$ROOT"
|
| 36 |
|
| 37 |
module load python/miniconda3-py3.12-usr
|
|
|
|
| 41 |
|
| 42 |
CHK="${CHECKPOINT:-${ROOT}/notebook_model_weights/6param_best/best_model.pt}"
|
| 43 |
ARGS="${TRAINING_ARGS:-${ROOT}/notebook_model_weights/6param_best/args.json}"
|
| 44 |
+
DATA="${DATA_DIR:-<DDPM_ROOT>/data/LH_data/params_6}"
|
| 45 |
|
| 46 |
mkdir -p "${OUT}"
|
| 47 |
RUN_LOG="${CUSTOM_LOG:-${OUT}/run_log.txt}"
|
cross_model/scripts/run_triangle_ddpm_both.sh
CHANGED
|
@@ -1,12 +1,12 @@
|
|
| 1 |
#!/bin/bash
|
| 2 |
-
#SBATCH --account=
|
| 3 |
#SBATCH --partition=l40s
|
| 4 |
#SBATCH --nodes=1
|
| 5 |
#SBATCH --ntasks=8
|
| 6 |
#SBATCH --gres=gpu:l40s:1
|
| 7 |
#SBATCH --time=12:00:00
|
| 8 |
#SBATCH --job-name=ddpm_triangle
|
| 9 |
-
#SBATCH --mail-user=
|
| 10 |
#SBATCH --output=slurm-ddpm-triangle-%j.out
|
| 11 |
#SBATCH --error=slurm-ddpm-triangle-%j.err
|
| 12 |
|
|
@@ -24,7 +24,7 @@
|
|
| 24 |
|
| 25 |
set -euo pipefail
|
| 26 |
|
| 27 |
-
ROOT="/
|
| 28 |
cd "$ROOT"
|
| 29 |
|
| 30 |
module load python/miniconda3-py3.12-usr
|
|
|
|
| 1 |
#!/bin/bash
|
| 2 |
+
#SBATCH --account=<your-slurm-account>
|
| 3 |
#SBATCH --partition=l40s
|
| 4 |
#SBATCH --nodes=1
|
| 5 |
#SBATCH --ntasks=8
|
| 6 |
#SBATCH --gres=gpu:l40s:1
|
| 7 |
#SBATCH --time=12:00:00
|
| 8 |
#SBATCH --job-name=ddpm_triangle
|
| 9 |
+
#SBATCH --mail-user=<your-email> # replace before submitting
|
| 10 |
#SBATCH --output=slurm-ddpm-triangle-%j.out
|
| 11 |
#SBATCH --error=slurm-ddpm-triangle-%j.err
|
| 12 |
|
|
|
|
| 24 |
|
| 25 |
set -euo pipefail
|
| 26 |
|
| 27 |
+
ROOT="<DDPM_ROOT>/Models"
|
| 28 |
cd "$ROOT"
|
| 29 |
|
| 30 |
module load python/miniconda3-py3.12-usr
|
inference_example.py
CHANGED
|
@@ -43,8 +43,8 @@ from huggingface_hub import hf_hub_download
|
|
| 43 |
# Defaults -- adjust here or override via CLI flags
|
| 44 |
# --------------------------------------------------------------------------
|
| 45 |
DEFAULT_REPOS = {
|
| 46 |
-
"2param": "
|
| 47 |
-
"6param": "
|
| 48 |
}
|
| 49 |
|
| 50 |
# All files we expect to find in every uploaded repo. We download each one
|
|
|
|
| 43 |
# Defaults -- adjust here or override via CLI flags
|
| 44 |
# --------------------------------------------------------------------------
|
| 45 |
DEFAULT_REPOS = {
|
| 46 |
+
"2param": "collins909/DDPM-2param",
|
| 47 |
+
"6param": "collins909/DDPM-6param",
|
| 48 |
}
|
| 49 |
|
| 50 |
# All files we expect to find in every uploaded repo. We download each one
|
scripts/shell/evaluate_conditional.sh
CHANGED
|
@@ -1,12 +1,12 @@
|
|
| 1 |
#!/bin/bash
|
| 2 |
-
#SBATCH --account=
|
| 3 |
#SBATCH --partition=l40s
|
| 4 |
#SBATCH --nodes=1
|
| 5 |
#SBATCH --ntasks=4
|
| 6 |
#SBATCH --gres=gpu:l40s:1
|
| 7 |
#SBATCH --time=02:00:00
|
| 8 |
#SBATCH --job-name=ddpm_hi_eval
|
| 9 |
-
#SBATCH --mail-user=
|
| 10 |
#SBATCH --output=slurm-eval-%j.out
|
| 11 |
#SBATCH --error=slurm-eval-%j.err
|
| 12 |
|
|
@@ -27,7 +27,7 @@
|
|
| 27 |
|
| 28 |
set -euo pipefail
|
| 29 |
|
| 30 |
-
cd /
|
| 31 |
|
| 32 |
module load python/miniconda3-py3.12-usr
|
| 33 |
|
|
@@ -61,7 +61,7 @@ if [[ ! -f "${CHECKPOINT}" ]]; then
|
|
| 61 |
exit 1
|
| 62 |
fi
|
| 63 |
|
| 64 |
-
DATA_DIR="${DATA_DIR:-/
|
| 65 |
OUTPUT_DIR="${OUTPUT_DIR:-evaluation_outputs}"
|
| 66 |
|
| 67 |
echo "==============================================="
|
|
|
|
| 1 |
#!/bin/bash
|
| 2 |
+
#SBATCH --account=<your-slurm-account>
|
| 3 |
#SBATCH --partition=l40s
|
| 4 |
#SBATCH --nodes=1
|
| 5 |
#SBATCH --ntasks=4
|
| 6 |
#SBATCH --gres=gpu:l40s:1
|
| 7 |
#SBATCH --time=02:00:00
|
| 8 |
#SBATCH --job-name=ddpm_hi_eval
|
| 9 |
+
#SBATCH --mail-user=<your-email> # replace before submitting
|
| 10 |
#SBATCH --output=slurm-eval-%j.out
|
| 11 |
#SBATCH --error=slurm-eval-%j.err
|
| 12 |
|
|
|
|
| 27 |
|
| 28 |
set -euo pipefail
|
| 29 |
|
| 30 |
+
cd <DDPM_ROOT>/Models/2param_DDPM_HI_Emulation
|
| 31 |
|
| 32 |
module load python/miniconda3-py3.12-usr
|
| 33 |
|
|
|
|
| 61 |
exit 1
|
| 62 |
fi
|
| 63 |
|
| 64 |
+
DATA_DIR="${DATA_DIR:-<DDPM_ROOT>/data/LH_data/params_2}"
|
| 65 |
OUTPUT_DIR="${OUTPUT_DIR:-evaluation_outputs}"
|
| 66 |
|
| 67 |
echo "==============================================="
|
scripts/shell/run_ddim_investigation_2param.sh
CHANGED
|
@@ -1,30 +1,30 @@
|
|
| 1 |
#!/bin/bash
|
| 2 |
-
#SBATCH --account=
|
| 3 |
#SBATCH --partition=l40s
|
| 4 |
#SBATCH --nodes=1
|
| 5 |
#SBATCH --ntasks=4
|
| 6 |
#SBATCH --gres=gpu:l40s:1
|
| 7 |
#SBATCH --time=08:00:00
|
| 8 |
#SBATCH --job-name=ddim2param
|
| 9 |
-
#SBATCH --mail-user=
|
| 10 |
#SBATCH --output=slurm-ddim-invest-%j.out
|
| 11 |
#SBATCH --error=slurm-ddim-invest-%j.err
|
| 12 |
|
| 13 |
set -euo pipefail
|
| 14 |
|
| 15 |
-
ROOT="/
|
| 16 |
cd "$ROOT"
|
| 17 |
|
| 18 |
module load python/miniconda3-py3.12-usr
|
| 19 |
|
| 20 |
-
CHECKPOINT="${CHECKPOINT:-/
|
| 21 |
-
OUTPUT_DIR="${OUTPUT_DIR:-/
|
| 22 |
STEPS="${STEPS:-1500 1000 500 250 100 50}"
|
| 23 |
NUM_SAMPLES="${NUM_SAMPLES:-100}"
|
| 24 |
IMAGE_SIZE="${IMAGE_SIZE:-64}"
|
| 25 |
DEVICE="${DEVICE:-cuda}"
|
| 26 |
RUN_ID="${RUN_ID:-post-fix}"
|
| 27 |
-
CAMELS_DATA="${CAMELS_DATA:-/
|
| 28 |
PK_COMPARE_SAMPLES="${PK_COMPARE_SAMPLES:-100}"
|
| 29 |
|
| 30 |
if [[ ! -f "${CHECKPOINT}" ]]; then
|
|
|
|
| 1 |
#!/bin/bash
|
| 2 |
+
#SBATCH --account=<your-slurm-account>
|
| 3 |
#SBATCH --partition=l40s
|
| 4 |
#SBATCH --nodes=1
|
| 5 |
#SBATCH --ntasks=4
|
| 6 |
#SBATCH --gres=gpu:l40s:1
|
| 7 |
#SBATCH --time=08:00:00
|
| 8 |
#SBATCH --job-name=ddim2param
|
| 9 |
+
#SBATCH --mail-user=<your-email> # replace before submitting
|
| 10 |
#SBATCH --output=slurm-ddim-invest-%j.out
|
| 11 |
#SBATCH --error=slurm-ddim-invest-%j.err
|
| 12 |
|
| 13 |
set -euo pipefail
|
| 14 |
|
| 15 |
+
ROOT="<DDPM_ROOT>/Models/2param_DDPM_HI_Emulation"
|
| 16 |
cd "$ROOT"
|
| 17 |
|
| 18 |
module load python/miniconda3-py3.12-usr
|
| 19 |
|
| 20 |
+
CHECKPOINT="${CHECKPOINT:-<DDPM_ROOT>/Models/notebook_model_weights/2param_epoch200/checkpoint_epoch_200.pt}"
|
| 21 |
+
OUTPUT_DIR="${OUTPUT_DIR:-<DDPM_ROOT>/Models/ddim_investigation_2param_out}"
|
| 22 |
STEPS="${STEPS:-1500 1000 500 250 100 50}"
|
| 23 |
NUM_SAMPLES="${NUM_SAMPLES:-100}"
|
| 24 |
IMAGE_SIZE="${IMAGE_SIZE:-64}"
|
| 25 |
DEVICE="${DEVICE:-cuda}"
|
| 26 |
RUN_ID="${RUN_ID:-post-fix}"
|
| 27 |
+
CAMELS_DATA="${CAMELS_DATA:-<DDPM_ROOT>/data/LH_data/params_2/train_LH.npy}"
|
| 28 |
PK_COMPARE_SAMPLES="${PK_COMPARE_SAMPLES:-100}"
|
| 29 |
|
| 30 |
if [[ ! -f "${CHECKPOINT}" ]]; then
|
scripts/shell/train_conditional.sh
CHANGED
|
@@ -1,17 +1,17 @@
|
|
| 1 |
#!/bin/bash
|
| 2 |
-
#SBATCH --account=
|
| 3 |
#SBATCH --partition=l40s
|
| 4 |
#SBATCH --nodes=1
|
| 5 |
#SBATCH --ntasks=8
|
| 6 |
#SBATCH --gres=gpu:l40s:1
|
| 7 |
#SBATCH --time=48:00:00
|
| 8 |
#SBATCH --job-name=ddpm_hi_april26
|
| 9 |
-
#SBATCH --mail-user=
|
| 10 |
#SBATCH --output=slurm-%j.out
|
| 11 |
#SBATCH --error=slurm-%j.err
|
| 12 |
|
| 13 |
# Project root (this repo)
|
| 14 |
-
cd /
|
| 15 |
|
| 16 |
module load python/miniconda3-py3.12-usr
|
| 17 |
|
|
@@ -38,7 +38,7 @@ python train_conditional.py \
|
|
| 38 |
--base_channels 64 \
|
| 39 |
--channel_multipliers 1 2 4 8 \
|
| 40 |
--attention_levels 2 3 \
|
| 41 |
-
--data_dir /
|
| 42 |
--output_dir outputs_conditional_2label
|
| 43 |
|
| 44 |
# To resume (e.g. epoch 100 → 150): use scripts/shell/resume_conditional_epoch100_50more.sh
|
|
|
|
| 1 |
#!/bin/bash
|
| 2 |
+
#SBATCH --account=<your-slurm-account>
|
| 3 |
#SBATCH --partition=l40s
|
| 4 |
#SBATCH --nodes=1
|
| 5 |
#SBATCH --ntasks=8
|
| 6 |
#SBATCH --gres=gpu:l40s:1
|
| 7 |
#SBATCH --time=48:00:00
|
| 8 |
#SBATCH --job-name=ddpm_hi_april26
|
| 9 |
+
#SBATCH --mail-user=<your-email> # replace before submitting
|
| 10 |
#SBATCH --output=slurm-%j.out
|
| 11 |
#SBATCH --error=slurm-%j.err
|
| 12 |
|
| 13 |
# Project root (this repo)
|
| 14 |
+
cd <DDPM_ROOT>/Models/2param_DDPM_HI_Emulation
|
| 15 |
|
| 16 |
module load python/miniconda3-py3.12-usr
|
| 17 |
|
|
|
|
| 38 |
--base_channels 64 \
|
| 39 |
--channel_multipliers 1 2 4 8 \
|
| 40 |
--attention_levels 2 3 \
|
| 41 |
+
--data_dir <DDPM_ROOT>/data/LH_data/params_2 \
|
| 42 |
--output_dir outputs_conditional_2label
|
| 43 |
|
| 44 |
# To resume (e.g. epoch 100 → 150): use scripts/shell/resume_conditional_epoch100_50more.sh
|
src/ddim_investigation_2param.py
CHANGED
|
@@ -21,7 +21,7 @@ from diffusion_conditional import GaussianDiffusion, ConditionalDiffusionModel
|
|
| 21 |
from unet_conditional import ConditionalUNet
|
| 22 |
|
| 23 |
|
| 24 |
-
DEBUG_LOG_PATH = "/
|
| 25 |
DEBUG_SESSION_ID = "a1359c"
|
| 26 |
|
| 27 |
|
|
@@ -45,7 +45,7 @@ def parse_args() -> argparse.Namespace:
|
|
| 45 |
parser.add_argument(
|
| 46 |
"--checkpoint",
|
| 47 |
type=str,
|
| 48 |
-
default="/
|
| 49 |
help="Path to trained checkpoint",
|
| 50 |
)
|
| 51 |
parser.add_argument("--output_dir", type=str, default="ddim_investigation_2param_out")
|
|
@@ -57,7 +57,7 @@ def parse_args() -> argparse.Namespace:
|
|
| 57 |
parser.add_argument("--label_dim", type=int, default=2)
|
| 58 |
parser.add_argument("--base_channels", type=int, default=64)
|
| 59 |
parser.add_argument("--timesteps", type=int, default=1500)
|
| 60 |
-
parser.add_argument("--camels_data", type=str, default="/
|
| 61 |
parser.add_argument("--pk_compare_samples", type=int, default=100)
|
| 62 |
parser.add_argument("--box_size", type=float, default=25.0)
|
| 63 |
parser.add_argument("--run_id", type=str, default="pre-fix")
|
|
|
|
| 21 |
from unet_conditional import ConditionalUNet
|
| 22 |
|
| 23 |
|
| 24 |
+
DEBUG_LOG_PATH = "<DDPM_ROOT>/Models/.cursor/debug-a1359c.log"
|
| 25 |
DEBUG_SESSION_ID = "a1359c"
|
| 26 |
|
| 27 |
|
|
|
|
| 45 |
parser.add_argument(
|
| 46 |
"--checkpoint",
|
| 47 |
type=str,
|
| 48 |
+
default="<DDPM_ROOT>/Models/notebook_model_weights/2param_epoch200/checkpoint_epoch_200.pt",
|
| 49 |
help="Path to trained checkpoint",
|
| 50 |
)
|
| 51 |
parser.add_argument("--output_dir", type=str, default="ddim_investigation_2param_out")
|
|
|
|
| 57 |
parser.add_argument("--label_dim", type=int, default=2)
|
| 58 |
parser.add_argument("--base_channels", type=int, default=64)
|
| 59 |
parser.add_argument("--timesteps", type=int, default=1500)
|
| 60 |
+
parser.add_argument("--camels_data", type=str, default="<DDPM_ROOT>/data/LH_data/params_2/train_LH.npy")
|
| 61 |
parser.add_argument("--pk_compare_samples", type=int, default=100)
|
| 62 |
parser.add_argument("--box_size", type=float, default=25.0)
|
| 63 |
parser.add_argument("--run_id", type=str, default="pre-fix")
|