Skip to content

Commit 211ddc8

Browse files
committed
update subnet
1 parent 2252f1f commit 211ddc8

11 files changed

Lines changed: 956 additions & 3042 deletions

case_study1/load_results_benchmark.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ def model_sampler_key(_model: str, _sampler: str) -> str:
1717

1818
benchmarks = list(
1919
(m, mlp, t, s) for s, m, mlp, t in itertools.product(
20-
SAMPLER_SETTINGS, MODELS.keys(), ['mlp', 'time_mlp'], sbibm.get_available_tasks()
20+
SAMPLER_SETTINGS, MODELS.keys(), ['time_mlp'], sbibm.get_available_tasks()
2121
) if is_compatible(m, s)
2222
)
2323
BASE = Path(__file__).resolve().parent
-18 Bytes
Binary file not shown.
565 Bytes
Binary file not shown.

case_study1/plots/c2st_benchmark_results.csv

Lines changed: 944 additions & 3034 deletions
Large diffs are not rendered by default.
0 Bytes
Binary file not shown.
17 Bytes
Binary file not shown.

case_study1/run_benchmark.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,16 @@
2626
partition = os.environ.get("SLURM_JOB_PARTITION", "unknown")
2727
benchmarks = list(
2828
(m, mlp, t, s) for s, m, mlp, t in itertools.product(
29-
['ode', 'sde', 'langevin'], MODELS.keys(), ['mlp', 'time_mlp'], sbibm.get_available_tasks()
29+
['ode', 'sde', 'langevin'], MODELS.keys(), ['time_mlp'], sbibm.get_available_tasks()
3030
) if is_compatible(m, s)
31-
) # 640 jobs, first 360 are ODE
31+
) # 320 jobs, first 180 are ODE
3232

3333
model_name, subnet, task_name, sampler_family = benchmarks[job_id]
3434
BASE = Path(__file__).resolve().parent
3535
metrics_dir = BASE / 'metrics'
36+
models_dir = BASE / 'models'
3637
#metrics_dir = Path('/lustre/scratch/data/jarruda_hpc-diffusion_experiments/case_study1/metrics')
38+
#models_dir = Path('/lustre/scratch/data/jarruda_hpc-diffusion_experiments/case_study1/models')
3739

3840
logging.info(f"Running job {job_id} with model {model_name}, subnet {subnet}, task {task_name}, sampler {sampler_family}.")
3941
task = sbibm.get_task(task_name)
@@ -83,7 +85,7 @@ def sbibm_simulator_bf():
8385
workflow = load_model(conf_tuple=conf_tuple,
8486
training_data=training_data,
8587
simulator=simulator,
86-
storage=BASE / "models",
88+
storage=models_dir,
8789
problem_name=task_name, model_name=model_name)
8890

8991
#%%

case_study1/visualize_results.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import marimo
22

3-
__generated_with = "0.18.4"
3+
__generated_with = "0.19.4"
44
app = marimo.App(width="full")
55

66

@@ -42,7 +42,6 @@ def _():
4242
def _(BASE, pd):
4343
# Load the dataset
4444
results = pd.read_csv(BASE / 'plots' / 'c2st_benchmark_results.csv')
45-
results = results[results.subnet == ['mlp', 'time_mlp'][1]]
4645
results.reset_index(inplace=True, drop=True)
4746
results
4847
return (results,)
@@ -51,7 +50,7 @@ def _(BASE, pd):
5150
@app.cell
5251
def _(SAMPLER_SETTINGS):
5352
all_samplers= ['best', 'merge_problems'] + [k for k in SAMPLER_SETTINGS.keys()]
54-
SHOW_SAMPLER = all_samplers[0]
53+
SHOW_SAMPLER = all_samplers[1]
5554
print(SHOW_SAMPLER)
5655
return (SHOW_SAMPLER,)
5756

index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
<!-- Preconnect for performance (local only) -->
6161
<link rel="preconnect" href="/">
6262

63-
<title>Diffusion Models In Simulation-Based Inference: A Tutorial Review - Arruda et al. | Academic Research</title>
63+
<title>Diffusion Models In Simulation-Based Inference: A Tutorial Review - Arruda et al.</title>
6464

6565
<!-- Critical CSS - Load synchronously -->
6666
<link rel="stylesheet" href="static/css/bulma.min.css">

intro_example/inverse_kinematics.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
from collections import OrderedDict
2+
import logging
23

34
import numpy as np
45
import scipy
@@ -18,6 +19,8 @@
1819
"legend.fontsize": 10,
1920
}
2021

22+
logging.getLogger("matplotlib").setLevel(logging.ERROR)
23+
2124

2225
class InverseKinematicsModel:
2326
n_parameters = 4

0 commit comments

Comments
 (0)