Skip to content

Commit e99e5f2

Browse files
committed
feat(runs): add standalone model presets
1 parent bb65db4 commit e99e5f2

11 files changed

Lines changed: 258 additions & 10 deletions

File tree

README.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,10 @@ results directory, and MSA cache.
178178
run_experiments --list # show available presets
179179
run_experiments --show rf3 # inspect what will run
180180
run_experiments --dry-run rf3 # print commands without running
181-
run_experiments rf3 # run only the RF3 job from full_8gpu
181+
run_experiments rf3 # run the standalone RF3 preset
182+
run_experiments boltz # run Boltz2 X-ray + Boltz2 MD
183+
run_experiments boltz1 # run standalone Boltz1
184+
run_experiments protenix # run the standalone Protenix preset
182185
run_experiments # run the default full_8gpu preset
183186
```
184187

@@ -189,6 +192,11 @@ parallel. Run a subset with:
189192
run_experiments full_8gpu --jobs rf3,protenix
190193
```
191194

195+
Standalone presets are available for each model/model family: `boltz`,
196+
`boltz1`, `boltz2`, `boltz2_xrd`, `boltz2_md`, `rf3`, and `protenix`.
197+
Additional comparison presets include `protenix_dual`, `rf3_protenix`, and RF3
198+
variants.
199+
192200
Presets live in `experiments/*.toml` in your local checkout and on the pod at
193201
`/home/dev/workspace/experiments/*.toml`. To modify an experiment, edit or copy
194202
a preset locally, let ACTL sync it, then run it by name or path:

experiments/boltz.toml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
description = "Boltz2 X-ray and MD canonical occ-sweep jobs."
2+
3+
[defaults]
4+
DATA_DIR = "/data/inputs"
5+
RESULTS_DIR = "/data/results/boltz"
6+
MSA_CACHE_DIR = "/root/.sampleworks"
7+
PROTEINS_CSV = "${DATA_DIR}/proteins.csv"
8+
9+
[shared_args]
10+
proteins = "${PROTEINS_CSV}"
11+
scalers = "pure_guidance"
12+
partial-diffusion-step = 120
13+
ensemble-sizes = "8"
14+
gradient-normalization = true
15+
augmentation = true
16+
align-to-input = true
17+
18+
[[jobs]]
19+
name = "boltz2_xrd"
20+
env = "boltz"
21+
gpus = "0,1"
22+
output_subdir = "boltz2_xrd"
23+
args = { model = "boltz2", method = "X-RAY DIFFRACTION", gradient-weights = "0.0 0.05 0.1 0.2 0.35 0.5" }
24+
25+
[[jobs]]
26+
name = "boltz2_md"
27+
env = "boltz"
28+
gpus = "2,3"
29+
output_subdir = "boltz2_md"
30+
args = { model = "boltz2", method = "MD", gradient-weights = "0.0 0.05 0.1 0.2 0.35 0.5" }

experiments/boltz1.toml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
description = "Boltz1 canonical occ-sweep job."
2+
3+
[defaults]
4+
DATA_DIR = "/data/inputs"
5+
RESULTS_DIR = "/data/results/boltz1"
6+
MSA_CACHE_DIR = "/root/.sampleworks"
7+
PROTEINS_CSV = "${DATA_DIR}/proteins.csv"
8+
BOLTZ1_CHECKPOINT = "/checkpoints/boltz1_conf.ckpt"
9+
10+
[shared_args]
11+
proteins = "${PROTEINS_CSV}"
12+
model = "boltz1"
13+
scalers = "pure_guidance"
14+
partial-diffusion-step = 120
15+
ensemble-sizes = "8"
16+
gradient-weights = "0.0 0.05 0.1 0.2 0.35 0.5"
17+
model-checkpoint = "${BOLTZ1_CHECKPOINT}"
18+
gradient-normalization = true
19+
augmentation = true
20+
align-to-input = true
21+
22+
[[jobs]]
23+
name = "boltz1"
24+
env = "boltz"
25+
gpus = "0,1"
26+
output_subdir = "boltz1"
27+
args = {}

experiments/boltz2.toml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
description = "Boltz2 X-ray and MD canonical occ-sweep jobs."
2+
3+
[defaults]
4+
DATA_DIR = "/data/inputs"
5+
RESULTS_DIR = "/data/results/boltz2"
6+
MSA_CACHE_DIR = "/root/.sampleworks"
7+
PROTEINS_CSV = "${DATA_DIR}/proteins.csv"
8+
9+
[shared_args]
10+
proteins = "${PROTEINS_CSV}"
11+
scalers = "pure_guidance"
12+
partial-diffusion-step = 120
13+
ensemble-sizes = "8"
14+
gradient-normalization = true
15+
augmentation = true
16+
align-to-input = true
17+
18+
[[jobs]]
19+
name = "boltz2_xrd"
20+
env = "boltz"
21+
gpus = "0,1"
22+
output_subdir = "boltz2_xrd"
23+
args = { model = "boltz2", method = "X-RAY DIFFRACTION", gradient-weights = "0.0 0.05 0.1 0.2 0.35 0.5" }
24+
25+
[[jobs]]
26+
name = "boltz2_md"
27+
env = "boltz"
28+
gpus = "2,3"
29+
output_subdir = "boltz2_md"
30+
args = { model = "boltz2", method = "MD", gradient-weights = "0.0 0.05 0.1 0.2 0.35 0.5" }

experiments/boltz2_md.toml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
description = "Boltz2 MD canonical occ-sweep job."
2+
3+
[defaults]
4+
DATA_DIR = "/data/inputs"
5+
RESULTS_DIR = "/data/results/boltz2_md"
6+
MSA_CACHE_DIR = "/root/.sampleworks"
7+
PROTEINS_CSV = "${DATA_DIR}/proteins.csv"
8+
9+
[shared_args]
10+
proteins = "${PROTEINS_CSV}"
11+
model = "boltz2"
12+
method = "MD"
13+
scalers = "pure_guidance"
14+
partial-diffusion-step = 120
15+
ensemble-sizes = "8"
16+
gradient-weights = "0.0 0.05 0.1 0.2 0.35 0.5"
17+
gradient-normalization = true
18+
augmentation = true
19+
align-to-input = true
20+
21+
[[jobs]]
22+
name = "boltz2_md"
23+
env = "boltz"
24+
gpus = "0,1"
25+
output_subdir = "boltz2_md"
26+
args = {}

experiments/boltz2_xrd.toml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
description = "Boltz2 X-ray canonical occ-sweep job."
2+
3+
[defaults]
4+
DATA_DIR = "/data/inputs"
5+
RESULTS_DIR = "/data/results/boltz2_xrd"
6+
MSA_CACHE_DIR = "/root/.sampleworks"
7+
PROTEINS_CSV = "${DATA_DIR}/proteins.csv"
8+
9+
[shared_args]
10+
proteins = "${PROTEINS_CSV}"
11+
model = "boltz2"
12+
method = "X-RAY DIFFRACTION"
13+
scalers = "pure_guidance"
14+
partial-diffusion-step = 120
15+
ensemble-sizes = "8"
16+
gradient-weights = "0.0 0.05 0.1 0.2 0.35 0.5"
17+
gradient-normalization = true
18+
augmentation = true
19+
align-to-input = true
20+
21+
[[jobs]]
22+
name = "boltz2_xrd"
23+
env = "boltz"
24+
gpus = "0,1"
25+
output_subdir = "boltz2_xrd"
26+
args = {}

experiments/protenix.toml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
description = "Protenix canonical occ-sweep job."
2+
3+
[defaults]
4+
DATA_DIR = "/data/inputs"
5+
RESULTS_DIR = "/data/results/protenix"
6+
MSA_CACHE_DIR = "/root/.sampleworks"
7+
PROTEINS_CSV = "${DATA_DIR}/proteins.csv"
8+
9+
[shared_args]
10+
proteins = "${PROTEINS_CSV}"
11+
model = "protenix"
12+
scalers = "pure_guidance"
13+
partial-diffusion-step = 120
14+
ensemble-sizes = "8"
15+
gradient-weights = "0.0 0.05 0.1 0.2 0.35 0.5"
16+
gradient-normalization = true
17+
augmentation = true
18+
align-to-input = true
19+
20+
[[jobs]]
21+
name = "protenix"
22+
env = "protenix"
23+
gpus = "0,1"
24+
output_subdir = "protenix"
25+
args = {}

experiments/rf3.toml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
description = "RF3 canonical occ-sweep job."
2+
3+
[defaults]
4+
DATA_DIR = "/data/inputs"
5+
RESULTS_DIR = "/data/results/rf3"
6+
MSA_CACHE_DIR = "/root/.sampleworks"
7+
PROTEINS_CSV = "${DATA_DIR}/proteins.csv"
8+
RF3_CHECKPOINT = "/checkpoints/rf3_foundry_01_24_latest.ckpt"
9+
10+
[shared_args]
11+
proteins = "${PROTEINS_CSV}"
12+
model = "rf3"
13+
scalers = "pure_guidance"
14+
partial-diffusion-step = 120
15+
ensemble-sizes = "8"
16+
gradient-weights = "0.0 0.005 0.01 0.02 0.035 0.05 0.1"
17+
model-checkpoint = "${RF3_CHECKPOINT}"
18+
gradient-normalization = true
19+
augmentation = true
20+
align-to-input = true
21+
22+
[[jobs]]
23+
name = "rf3"
24+
env = "rf3"
25+
gpus = "0,1"
26+
output_subdir = "rf3"
27+
args = {}

src/sampleworks/runs/cli.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,16 +67,17 @@ def _build_parser() -> argparse.ArgumentParser:
6767
prog="sampleworks-runs",
6868
description=(
6969
"Run Sampleworks experiment presets. With no target, runs the "
70-
"full_8gpu preset. A target like 'rf3' or 'rf3,protenix' is a "
71-
"job shortcut from full_8gpu; use --preset for another TOML preset."
70+
"full_8gpu preset. A target like 'rf3', 'boltz', or 'protenix' "
71+
"runs that preset; comma-separated targets like 'rf3,protenix' "
72+
"select jobs from full_8gpu."
7273
),
7374
)
7475
parser.add_argument(
7576
"target",
7677
nargs="?",
7778
help=(
78-
"Job shortcut from full_8gpu (rf3, protenix, boltz2_xrd, "
79-
"boltz2_md, or comma-separated), or 'full'/'full_8gpu'."
79+
"Preset name from experiments/ (rf3, boltz, protenix, etc.), "
80+
"comma-separated job shortcut from full_8gpu, or 'full'/'full_8gpu'."
8081
),
8182
)
8283
parser.add_argument(
@@ -161,6 +162,9 @@ def _resolve_target(
161162
if target.endswith(".toml") or "/" in target:
162163
parser.error("pass custom preset paths with --preset path/to/preset.toml")
163164

165+
if "," not in target and target in loader.list_presets():
166+
return target, ""
167+
164168
return DEFAULT_PRESET, target
165169

166170

tests/runs/test_cli.py

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,17 @@ def test_list_prints_all_experiment_presets(capsys: pytest.CaptureFixture[str])
1414
assert exit_code == 0
1515
out = capsys.readouterr().out.splitlines()
1616
assert set(out) == {
17+
"boltz",
18+
"boltz1",
19+
"boltz2",
20+
"boltz2_md",
21+
"boltz2_xrd",
1722
"full_8gpu",
23+
"protenix",
24+
"protenix_dual",
25+
"rf3",
1826
"rf3_partial",
1927
"rf3_partial_chiral_off",
20-
"protenix_dual",
2128
"rf3_protenix",
2229
}
2330

@@ -69,6 +76,31 @@ def test_job_shortcut_filters_default_preset(
6976
assert "boltz2_md" not in out
7077

7178

79+
def test_model_target_uses_named_preset(
80+
monkeypatch: pytest.MonkeyPatch, capsys: pytest.CaptureFixture[str]
81+
) -> None:
82+
"""A single model target resolves to the matching standalone preset."""
83+
monkeypatch.setenv("HOME", "/home/test")
84+
exit_code = cli.main(["boltz", "--show"])
85+
assert exit_code == 0
86+
out = capsys.readouterr().out
87+
assert "name: boltz" in out
88+
assert "name: boltz2_xrd" in out
89+
assert "name: boltz2_md" in out
90+
91+
92+
def test_boltz1_target_uses_named_preset(
93+
monkeypatch: pytest.MonkeyPatch, capsys: pytest.CaptureFixture[str]
94+
) -> None:
95+
"""The Boltz1 model has its own standalone preset target."""
96+
monkeypatch.setenv("HOME", "/home/test")
97+
exit_code = cli.main(["boltz1", "--show"])
98+
assert exit_code == 0
99+
out = capsys.readouterr().out
100+
assert "name: boltz1" in out
101+
assert "output_subdir: boltz1" in out
102+
103+
72104
def test_jobs_filters_explicit_preset(
73105
monkeypatch: pytest.MonkeyPatch, capsys: pytest.CaptureFixture[str]
74106
) -> None:

0 commit comments

Comments
 (0)