From d1087196ef2f468b515dad2543f27f5c62b43d74 Mon Sep 17 00:00:00 2001 From: Jammy2211 Date: Tue, 10 Nov 2026 17:39:00 +0000 Subject: [PATCH 1/7] Add bounded checkpoint recovery witnesses and paired CPU pilot --- .../nautilus/checkpoint_benchmark.py | 523 ++++++++++++++++++ .../test_nautilus_checkpoint_benchmark.py | 96 ++++ 2 files changed, 619 insertions(+) create mode 100644 scripts/analytic_gaussian/nautilus/checkpoint_benchmark.py create mode 100644 scripts/misc/test/test_nautilus_checkpoint_benchmark.py diff --git a/scripts/analytic_gaussian/nautilus/checkpoint_benchmark.py b/scripts/analytic_gaussian/nautilus/checkpoint_benchmark.py new file mode 100644 index 0000000..910d945 --- /dev/null +++ b/scripts/analytic_gaussian/nautilus/checkpoint_benchmark.py @@ -0,0 +1,523 @@ +"""Bounded off-Pulse checkpoint witnesses and paired CPU pilot; no retries.""" + +import argparse +import contextlib +import functools +import json +import os +import signal +import subprocess +import sys +import time +import traceback +from pathlib import Path + +ROOT = next(p for p in Path(__file__).resolve().parents if (p / "ruff.toml").exists()) +sys.path.insert(0, str(ROOT / "scripts/misc")) +from profiling.nautilus_campaign import environment_key, host_snapshot +from profiling.nautilus_diagnostics import assert_environment, sha256 +from profiling.nautilus_manifest import RunConfig, fingerprint +from profiling.nautilus_plot_comparison import replaced +from profiling.nautilus_resources import ( + atomic_json, + group_rss, + memory_available, + supervise, + terminate_group, +) + +LIMITS = {"timeout_s": 120, "memory_mib": 4096, "budget_s": 1800} +PROTOCOL = "nautilus-checkpoint-batching-experiment@1" + + +def matrix(): + cases = [] + for workers in (1, 2): + for mode in ("deferred", "atomic"): + witness = f"workers-{workers}-{mode}" + for phase in ("interrupt", "resume"): + cases.append( + { + "id": f"{witness}-{phase}", + "phase": phase, + "witness": witness, + "mode": mode, + "workers": workers, + "dimension": 5, + "seed": 0, + "interval": 5, + } + ) + for dimension in (5, 10): + for seed in range(3): + for interval in (1, 5) if seed % 2 == 0 else (5, 1): + cases.append( + { + "id": f"d{dimension}-s{seed}-i{interval}", + "phase": "performance", + "workers": 1, + "dimension": dimension, + "seed": seed, + "interval": interval, + } + ) + return cases + + +class Config(RunConfig): + def stopping(self): + return {**super().stopping(), "discard_exploration": True} + + +def configuration(case): + return Config( + adapter="pyautofit", + workers=case["workers"], + dimension=case["dimension"], + seed=case["seed"], + n_live=400, + n_batch=100, + n_eff=10000, + trace=False, + cost_profile="none", + work=0, + ) + + +def validate(plan): + if plan["sha256"] != fingerprint({k: v for k, v in plan.items() if k != "sha256"}): + raise ValueError("frozen plan changed") + if plan["protocol"] != PROTOCOL or plan["limits"] != LIMITS or plan["cases"] != matrix(): + raise ValueError("unapproved matrix/protocol/limits") + if plan["configurations"] != [configuration(c).matching() for c in plan["cases"]]: + raise ValueError("unapproved sampling configuration") + + +def posterior(sampler): + import hashlib + + import numpy as np + + digest = hashlib.sha256() + for array in sampler.posterior(): + digest.update(np.ascontiguousarray(array).tobytes()) + return { + "posterior_sha256": digest.hexdigest(), + "n_like": sampler.n_like, + "n_eff": float(sampler.n_eff), + "shells": len(sampler.bounds), + } + + +def native(case, path, stop_mode=None, marker=None, expected_start=None): + import h5py + from autofit.non_linear.parallel import fork_context + from autofit.non_linear.search.nest.nautilus.checkpoint_policy import BatchedCheckpointSampler + from autofit.non_linear.search.nest.nautilus.search import ( + _large_attribute_hdf5, + _LikelihoodWorkerPool, + ) + from nautilus import Sampler + from nautilus.pool import initialize_worker + from profiling.nautilus_target import CorrelatedGaussianTarget + + target = CorrelatedGaussianTarget(case["dimension"], "none", 0) + config = configuration(case) + pool_context = contextlib.nullcontext(None) + if case["workers"] > 1: + pool_context = _LikelihoodWorkerPool( + fork_context().Pool(case["workers"], initializer=initialize_worker, initargs=(target,)) + ) + with pool_context as pool, _large_attribute_hdf5(), contextlib.ExitStack() as stack: + obj = BatchedCheckpointSampler( + target.prior, + target, + filepath=path, + pool=(pool, None) if pool else None, + checkpoint_interval_batches=5, + **config.constructor(), + ) + + if expected_start is not None and obj.n_like != expected_start: + raise ValueError("resume did not restore the published likelihood count") + + def pause(mode, temporary=None): + with h5py.File(path, "r") as saved: + recoverable = int(saved["sampler"].attrs["n_like"]) + atomic_json( + marker, + { + "mode": mode, + "checkpoint": str(path), + "checkpoint_sha256": sha256(path), + "recoverable_n_like": recoverable, + "completed_n_like": obj.n_like, + "lost_completed_evaluations": obj.n_like - recoverable, + "pending_notifications": obj._pending_checkpoint_batches, + "in_flight_evaluations": 0, + "temporary": temporary, + }, + ) + os.kill(os.getpid(), signal.SIGSTOP) + raise RuntimeError("supervisor failed to terminate paused witness") + + if stop_mode == "deferred": + update = obj.write_shell_update + + def deferred(*args, **kwargs): + result = update(*args, **kwargs) + if obj.explored and obj._pending_checkpoint_batches == 2: + pause("deferred") + return result + + stack.enter_context(replaced(obj, "write_shell_update", deferred)) + elif stop_mode == "atomic": + write = Sampler.write + + def atomic(instance, filepath, **kwargs): + if instance is obj and obj.explored and obj._pending_checkpoint_batches >= 5: + bound = obj.bounds[0] + original = bound.write + + def partial(group): + original(group) + pause("atomic", str(filepath)) + + with replaced(bound, "write", partial): + return write(instance, filepath, **kwargs) + return write(instance, filepath, **kwargs) + + stack.enter_context(replaced(Sampler, "write", atomic)) + if not obj.run(**config.stopping()): + raise RuntimeError("native control did not converge") + return posterior(obj) + + +def io_counts(): + return { + key: int(value) + for key, value in ( + line.split(":") for line in Path("/proc/self/io").read_text().splitlines() + ) + if key in ("wchar", "syscw", "write_bytes") + } + + +def wrapped_fit(config, target, directory, interval): + import autofit as af + + names = [f"x{i:03}" for i in range(config.dimension)] + model = af.Collection(**{name: af.GaussianPrior(mean=0.0, sigma=1.0) for name in names}) + + class Analysis(af.Analysis): + def log_likelihood_function(self, instance): + return target([getattr(instance, name) for name in names]) + + # Parameter order checked rather than assumed from Collection/dict ordering. + import numpy as np + + cube = np.linspace(0.2, 0.8, config.dimension) + np.testing.assert_allclose( + model.vector_from_unit_vector(cube), target.prior(cube), rtol=1e-13, atol=1e-13 + ) + instance = model.instance_from_vector(np.arange(config.dimension, dtype=float)) + np.testing.assert_array_equal( + [getattr(instance, name) for name in names], np.arange(config.dimension) + ) + constructor = {key: value for key, value in config.constructor().items() if key != "n_dim"} + search = af.Nautilus( + **constructor, + **config.stopping(), + number_of_cores=config.workers, + checkpoint=config.checkpoint, + checkpoint_interval_batches=interval, + iterations_per_full_update=config.update_interval, + path_prefix=str(directory / "fit"), + name="baseline", + ) + search.fit(model=model, analysis=Analysis(use_jax=False)) + + +def performance(case, directory): + import autofit as af + from autofit.non_linear.search.nest.nautilus.checkpoint_policy import BatchedCheckpointSampler + from nautilus import Sampler + from profiling.nautilus_target import CorrelatedGaussianTarget + + owner = Sampler if case["interval"] == 1 else BatchedCheckpointSampler + captured, writes = [], [] + metrics = { + "sampler_run_s": 0.0, + "checkpoint_s": 0.0, + "full_writes": 0, + "shell_notifications": 0, + "io": dict.fromkeys(io_counts(), 0), + } + config = configuration(case) + target = CorrelatedGaussianTarget(case["dimension"], "none", 0) + original_init = Sampler.__init__ + + @functools.wraps(original_init) + def capture(obj, *args, **kwargs): + expected = config.constructor() + if any(kwargs.get(key) != value for key, value in expected.items()): + raise ValueError("native constructor differs from frozen configuration") + original_init(obj, *args, **kwargs) + captured.append(obj) + + depth = 0 + + def persistence(name): + original = getattr(owner, name) + + @functools.wraps(original) + def timed(obj, *args, **kwargs): + nonlocal depth + metrics["full_writes" if name == "write" else "shell_notifications"] += 1 + outer = depth == 0 + if outer: + before, tick = io_counts(), time.perf_counter() + depth += 1 + try: + result = original(obj, *args, **kwargs) + if name == "write": + writes.append({"n_like": obj.n_like, "bytes": Path(args[0]).stat().st_size}) + return result + finally: + depth -= 1 + if outer: + metrics["checkpoint_s"] += time.perf_counter() - tick + after = io_counts() + for key in before: + metrics["io"][key] += after[key] - before[key] + + return timed + + run = owner.run + + def timed_run(*args, **kwargs): + tick = time.perf_counter() + try: + return run(*args, **kwargs) + finally: + metrics["sampler_run_s"] += time.perf_counter() - tick + + with contextlib.ExitStack() as stack: + stack.enter_context(replaced(Sampler, "__init__", capture)) + stack.enter_context(replaced(af.Nautilus, "plot_results", lambda *a, **kw: None)) + stack.enter_context(replaced(owner, "run", timed_run)) + for name in ("write", "write_shell_update"): + stack.enter_context(replaced(owner, name, persistence(name))) + tick = time.perf_counter() + wrapped_fit(config, target, directory, case["interval"]) + metrics["full_fit_s"] = time.perf_counter() - tick + if len(captured) != 1 or type(captured[0]) is not owner: + raise ValueError("wrong sampler/policy constructed") + result = posterior(captured[0]) + if result["n_eff"] < 10000 or not captured[0].discard_exploration: + raise ValueError("wrong stopping/exploration policy") + return { + **result, + "metrics": metrics, + "writes": writes, + "target_sha256": fingerprint(target.truth()), + "plot_policy": "no search corner in either arm; all other fit output retained", + } + + +def child(plan, case, directory): + from profiling.nautilus_baseline import provenance + + assert_environment(environment_key(provenance()), plan["environment"]) + validate(plan) + if case["phase"] == "performance": + result = performance(case, directory) + elif case["phase"] == "interrupt": + control = native(case, directory / "control.hdf5") + atomic_json(directory / "control.json", control) + native(case, directory / "checkpoint.hdf5", case["mode"], directory / "paused.json") + raise RuntimeError("interruption hook was never reached") + else: + interrupted = directory.parent / (case["witness"] + "-interrupt") + marker = json.loads((interrupted / "paused.json").read_text()) + checkpoint = interrupted / "checkpoint.hdf5" + if sha256(checkpoint) != marker["checkpoint_sha256"]: + raise ValueError("previous checkpoint changed during interrupted write") + # Keep interrupted artifacts intact: resume a new copy. + import shutil + + shutil.copyfile(checkpoint, directory / "checkpoint.hdf5") + result = native( + case, directory / "checkpoint.hdf5", expected_start=marker["recoverable_n_like"] + ) + control = json.loads((interrupted / "control.json").read_text()) + if result != control: + raise ValueError("resume differs from uninterrupted matching control") + result = {**result, "recovery": marker, "control_equal": True} + assert_environment(environment_key(provenance()), plan["environment"]) + return {"status": "success", **result} + + +def supervise_interruption(process, directory): + start, peak, reason = time.monotonic(), 0, None + try: + while process.poll() is None: + peak = max(peak, group_rss(process.pid)) + if peak > LIMITS["memory_mib"] * 1024**2: + reason = "memory_cap" + break + if time.monotonic() - start >= LIMITS["timeout_s"]: + reason = "timeout" + break + if (directory / "paused.json").exists(): + reason = "intentional_checkpoint_kill" + break + time.sleep(0.05) + finally: + terminate_group(process) + return { + "termination_reason": reason, + "returncode": process.returncode, + "sampled_group_peak_rss_bytes": peak, + "rss_sample_interval_s": 0.05, + } + + +def run(root): + start = time.monotonic() + root.mkdir(parents=True, exist_ok=False) + state = {"status": "running", "attempts": []} + atomic_json(root / "state.json", state) + try: + from profiling.nautilus_baseline import provenance + + actual = provenance() + if any(s["dirty"] for s in actual["sources"].values()): + raise ValueError("measurement source must be committed and clean") + plan = { + "protocol": PROTOCOL, + "limits": LIMITS, + "cases": matrix(), + "configurations": [configuration(c).matching() for c in matrix()], + "environment": environment_key(actual), + } + plan["sha256"] = fingerprint(plan) + validate(plan) + atomic_json(root / "plan.json", plan) + state["preflight_s"] = time.monotonic() - start + for case in plan["cases"]: + if time.monotonic() - start + LIMITS["timeout_s"] > LIMITS["budget_s"]: + raise RuntimeError("aggregate budget exhausted") + snapshot = host_snapshot() + if memory_available() < 2 * LIMITS["memory_mib"] * 1024**2: + raise RuntimeError("insufficient safe host memory") + if snapshot["load"][0] > max(1.0, len(snapshot["affinity"]) / 4): + raise RuntimeError("host load exceeds guard") + directory = root / case["id"] + directory.mkdir() + row = {"case": case["id"], "status": "running", "host": snapshot} + state["attempts"].append(row) + atomic_json(root / "state.json", state) + with (directory / "run.log").open("w") as output: + tick = time.monotonic() + process = subprocess.Popen( + [ + sys.executable, + str(Path(__file__).resolve()), + "child", + "--plan", + str(root / "plan.json"), + "--case", + case["id"], + "--output", + str(directory), + ], + stdout=output, + stderr=subprocess.STDOUT, + start_new_session=True, + ) + supervision = ( + supervise_interruption(process, directory) + if case["phase"] == "interrupt" + else supervise(process, LIMITS["timeout_s"], LIMITS["memory_mib"] * 1024**2) + ) + row.update(process_wall_s=time.monotonic() - tick, supervision=supervision) + if case["phase"] == "interrupt": + row["status"] = ( + "success" + if supervision["termination_reason"] == "intentional_checkpoint_kill" + else "error" + ) + if row["status"] == "success": + row["marker"] = json.loads((directory / "paused.json").read_text()) + if sha256(directory / "checkpoint.hdf5") != row["marker"]["checkpoint_sha256"]: + raise ValueError("interrupted publication changed previous checkpoint") + else: + receipt = directory / "child.json" + if receipt.exists(): + row["child"] = json.loads(receipt.read_text()) + row["status"] = supervision["termination_reason"] or ( + "success" + if supervision["returncode"] == 0 + and row.get("child", {}).get("status") == "success" + else "error" + ) + assert_environment(environment_key(provenance()), plan["environment"]) + atomic_json(directory / "result.json", row) + if row["status"] != "success": + raise RuntimeError(f"{case['id']}: {row['status']}") + if case["phase"] == "performance" and len(state["attempts"]) % 2 == 0: + a, b = [r["child"] for r in state["attempts"][-2:]] + if any(a[k] != b[k] for k in ("posterior_sha256", "n_like", "n_eff")): + raise ValueError("paired sampling trajectories differ") + state["spent_s"] = time.monotonic() - start + atomic_json(root / "state.json", state) + print(f"{case['id']}: {row['status']} ({row['process_wall_s']:.2f}s)", flush=True) + state["status"] = "complete" + except BaseException as error: + state.update(status="halted", reason=f"{type(error).__name__}: {error}") + traceback.print_exc() + finally: + state["spent_s"] = time.monotonic() - start + done = {r["case"] for r in state["attempts"]} + state["unrun"] = [c["id"] for c in matrix() if c["id"] not in done] + atomic_json(root / "state.json", state) + return 0 if state["status"] == "complete" else 1 + + +def main(): + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument("command", choices=("run", "child")) + parser.add_argument("--output", type=Path, required=True) + parser.add_argument("--plan", type=Path) + parser.add_argument("--case") + args = parser.parse_args() + for key in ( + "OMP_NUM_THREADS", + "OPENBLAS_NUM_THREADS", + "MKL_NUM_THREADS", + "NUMEXPR_NUM_THREADS", + ): + os.environ[key] = "1" + os.environ["MPLBACKEND"] = "Agg" + + def interrupted(signum, frame): + raise KeyboardInterrupt(f"signal {signum}") + + signal.signal(signal.SIGTERM, interrupted) + signal.signal(signal.SIGHUP, interrupted) + if args.command == "run": + return run(args.output.resolve()) + plan = json.loads(args.plan.read_text()) + case = next(c for c in plan["cases"] if c["id"] == args.case) + try: + result = child(plan, case, args.output.resolve()) + except Exception as error: + traceback.print_exc() + result = {"status": "error", "error": f"{type(error).__name__}: {error}"} + atomic_json(args.output / "child.json", result) + return 0 if result["status"] == "success" else 1 + + +if __name__ == "__main__": + raise SystemExit(main()) diff --git a/scripts/misc/test/test_nautilus_checkpoint_benchmark.py b/scripts/misc/test/test_nautilus_checkpoint_benchmark.py new file mode 100644 index 0000000..547ad1a --- /dev/null +++ b/scripts/misc/test/test_nautilus_checkpoint_benchmark.py @@ -0,0 +1,96 @@ +"""Fixed-budget admission, ordering and intentional-kill supervision.""" + +import importlib.util +from pathlib import Path + +import pytest +from profiling.nautilus_manifest import fingerprint + +SOURCE = Path(__file__).resolve().parents[2] / "analytic_gaussian/nautilus/checkpoint_benchmark.py" +spec = importlib.util.spec_from_file_location("checkpoint_benchmark", SOURCE) +benchmark = importlib.util.module_from_spec(spec) +spec.loader.exec_module(benchmark) + + +def plan(): + result = { + "protocol": benchmark.PROTOCOL, + "limits": benchmark.LIMITS.copy(), + "cases": benchmark.matrix(), + "configurations": [benchmark.configuration(c).matching() for c in benchmark.matrix()], + } + result["sha256"] = fingerprint(result) + return result + + +@pytest.mark.parametrize( + "change", ["budget", "order", "networks", "ess", "discard", "workers", "interval", "hash"] +) +def test_changed_protocol_rejected(change): + p = plan() + benchmark.validate(p) + if change == "budget": + p["limits"]["budget_s"] += 1 + elif change == "order": + p["cases"].reverse() + elif change == "networks": + p["configurations"][0]["constructor"]["n_networks"] = 0 + elif change == "ess": + p["configurations"][0]["stopping"]["n_eff"] = 500 + elif change == "discard": + p["configurations"][0]["stopping"]["discard_exploration"] = False + elif change == "workers": + p["cases"][0]["workers"] = 4 + elif change == "interval": + p["cases"][-1]["interval"] = 10 + else: + p["sha256"] = "bad" + if change != "hash": + p["sha256"] = fingerprint({k: v for k, v in p.items() if k != "sha256"}) + with pytest.raises(ValueError): + benchmark.validate(p) + + +def test_all_resume_witnesses_precede_performance(): + cases = benchmark.matrix() + assert len(cases) == 20 + assert [c["phase"] for c in cases[:8]] == ["interrupt", "resume"] * 4 + assert all(c["phase"] == "performance" for c in cases[8:]) + assert {(c["workers"], c["mode"]) for c in cases[:8]} == { + (1, "deferred"), + (1, "atomic"), + (2, "deferred"), + (2, "atomic"), + } + + +@pytest.mark.parametrize( + "condition,reason", + [("marker", "intentional_checkpoint_kill"), ("memory", "memory_cap"), ("timeout", "timeout")], +) +def test_supervisor_kills_group_at_boundary_or_cap(tmp_path, monkeypatch, condition, reason): + class Process: + pid = 42 + returncode = None + + def poll(self): + return None + + process = Process() + killed = [] + monkeypatch.setattr(benchmark, "terminate_group", lambda proc: killed.append(proc.pid)) + monkeypatch.setattr( + benchmark, "group_rss", lambda pid: 5000 * 1024**2 if condition == "memory" else 1 + ) + times = iter([0.0, 121.0] if condition == "timeout" else [0.0, 0.0]) + monkeypatch.setattr(benchmark.time, "monotonic", lambda: next(times)) + if condition == "marker": + (tmp_path / "paused.json").write_text("{}") + result = benchmark.supervise_interruption(process, tmp_path) + assert result["termination_reason"] == reason + assert killed == [42] + + +def test_completed_directory_cannot_be_reused(tmp_path): + with pytest.raises(FileExistsError): + benchmark.run(tmp_path) From daf0cc6675ccde1149098d7c5d3456f2756737cd Mon Sep 17 00:00:00 2001 From: Jammy2211 Date: Tue, 10 Nov 2026 17:41:17 +0000 Subject: [PATCH 2/7] Serialize restored native likelihood counts in checkpoint receipts --- .../nautilus/checkpoint_benchmark.py | 3 ++- .../test_nautilus_checkpoint_benchmark.py | 20 +++++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/scripts/analytic_gaussian/nautilus/checkpoint_benchmark.py b/scripts/analytic_gaussian/nautilus/checkpoint_benchmark.py index 910d945..a35ed47 100644 --- a/scripts/analytic_gaussian/nautilus/checkpoint_benchmark.py +++ b/scripts/analytic_gaussian/nautilus/checkpoint_benchmark.py @@ -103,7 +103,8 @@ def posterior(sampler): digest.update(np.ascontiguousarray(array).tobytes()) return { "posterior_sha256": digest.hexdigest(), - "n_like": sampler.n_like, + # HDF5 restoration gives this scalar numpy.int64; fresh runs use int. + "n_like": int(sampler.n_like), "n_eff": float(sampler.n_eff), "shells": len(sampler.bounds), } diff --git a/scripts/misc/test/test_nautilus_checkpoint_benchmark.py b/scripts/misc/test/test_nautilus_checkpoint_benchmark.py index 547ad1a..fc2768f 100644 --- a/scripts/misc/test/test_nautilus_checkpoint_benchmark.py +++ b/scripts/misc/test/test_nautilus_checkpoint_benchmark.py @@ -94,3 +94,23 @@ def poll(self): def test_completed_directory_cannot_be_reused(tmp_path): with pytest.raises(FileExistsError): benchmark.run(tmp_path) + + +def test_restored_numpy_count_serializes_without_changing_posterior(tmp_path): + import json + from types import SimpleNamespace + + import numpy as np + + arrays = (np.array([[1.0, 2.0]]), np.array([0.0]), np.array([-1.0])) + sampler = SimpleNamespace( + posterior=lambda: arrays, + n_like=np.int64(16300), + n_eff=np.float64(10020.77), + bounds=[None] * 9, + ) + result = benchmark.posterior(sampler) + benchmark.atomic_json(tmp_path / "child.json", result) + assert json.loads((tmp_path / "child.json").read_text()) == result + sampler.n_like = 16300 + assert benchmark.posterior(sampler) == result From 4e90392f6ecf5957e71e230328678f3f9ef2f866 Mon Sep 17 00:00:00 2001 From: Jammy2211 Date: Tue, 10 Nov 2026 17:42:24 +0000 Subject: [PATCH 3/7] Keep receipt regression independent of scientific dependencies --- .../test/test_nautilus_checkpoint_benchmark.py | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/scripts/misc/test/test_nautilus_checkpoint_benchmark.py b/scripts/misc/test/test_nautilus_checkpoint_benchmark.py index fc2768f..3d2e5ea 100644 --- a/scripts/misc/test/test_nautilus_checkpoint_benchmark.py +++ b/scripts/misc/test/test_nautilus_checkpoint_benchmark.py @@ -96,17 +96,23 @@ def test_completed_directory_cannot_be_reused(tmp_path): benchmark.run(tmp_path) -def test_restored_numpy_count_serializes_without_changing_posterior(tmp_path): +def test_restored_count_serializes_without_changing_posterior(tmp_path, monkeypatch): import json + import sys from types import SimpleNamespace - import numpy as np + class RestoredInteger: + def __int__(self): + return 16300 - arrays = (np.array([[1.0, 2.0]]), np.array([0.0]), np.array([-1.0])) + # Tooling CI intentionally has no NumPy: model its opaque restored scalar + # and buffer interface, without adding a scientific runtime to this suite. + monkeypatch.setitem(sys.modules, "numpy", SimpleNamespace(ascontiguousarray=lambda x: x)) + arrays = (SimpleNamespace(tobytes=lambda: b"unchanged posterior bytes"),) sampler = SimpleNamespace( posterior=lambda: arrays, - n_like=np.int64(16300), - n_eff=np.float64(10020.77), + n_like=RestoredInteger(), + n_eff=10020.77, bounds=[None] * 9, ) result = benchmark.posterior(sampler) From 15afe55e56735e63838f89277aa4c0c03511c6ea Mon Sep 17 00:00:00 2001 From: Jammy2211 Date: Tue, 10 Nov 2026 17:43:49 +0000 Subject: [PATCH 4/7] Record stopped checkpoint pilot and read-only recovery evidence --- .../nautilus_checkpoint_batching/README.md | 17 + .../attempt01.json | 1025 +++++++++++++++++ 2 files changed, 1042 insertions(+) create mode 100644 experiments/nautilus_checkpoint_batching/README.md create mode 100644 experiments/nautilus_checkpoint_batching/attempt01.json diff --git a/experiments/nautilus_checkpoint_batching/README.md b/experiments/nautilus_checkpoint_batching/README.md new file mode 100644 index 0000000..8822031 --- /dev/null +++ b/experiments/nautilus_checkpoint_batching/README.md @@ -0,0 +1,17 @@ +# Checkpoint batching experiment + +The first bounded attempt stopped after 38.12s because the resume receipt could not serialize a restored NumPy integer. One controlled interruption completed; its resume process failed while writing its receipt. All other 18 children, including every performance comparison, remain unrun. No checkpoint speedup has been measured. + +The single-worker deferred interruption preserved the published file at 4,600 likelihood evaluations, with 4,800 completed in memory: 200 completed evaluations lost, zero in flight at this controlled boundary. The prior checkpoint's SHA256 remained unchanged after process-group termination. + +The resumed computation reached the exact uninterrupted control result before the receipt error. A separate read-only check reopened the completed resumed checkpoint, evaluated no likelihood, changed no checkpoint bytes, and confirmed exact posterior hash/count/ESS equality: 16,300 evaluations, ESS 10,020.771588733165, nine shells. This diagnostic is not a passed pilot case and does not establish the unrun atomic-publication or two-worker witnesses. + +The harness now converts the restored count to a Python integer before JSON serialization (daf0cc6). Its regression reproduced the failure before the fix; all 125 tooling tests pass afterwards. A subsequent test-only correction keeps this regression compatible with the standard-library tooling CI environment; no sampler or measurement behavior changed. No automatic retry followed the stop. Both corrected code and stopped raw data are retained. + +The opt-in library policy keeps interval1 native. Larger intervals publish full native snapshots atomically, retain native full-write points, and flush on normal return. Sampling settings, default behavior and identifiers are unchanged. This is protection against process interruption, not a guarantee for power loss or network filesystems. + +Measured library e16fba3ee; initial producer d108719. Complete frozen identities, settings, limits, status and unrun cases are in attempt01.json. The original matrix is four crash/resume witnesses followed by six paired D5/D10 seed comparisons; n_live400, n_batch100, n_eff10000, four default networks, discard_exploration=True. Limits are 20 children, 120s/4096MiB each, 1800s total including preflight. All four correctness witnesses must pass before timing comparisons. No further pilot is authorized by this report. + +Validation: full library suite 4302 passed, 2 skipped, 1 expected upstream failure; eight script and two notebook smoke cases passed. Tooling Ruff check/format and unchanged catalogue validation pass. Exact-head CI is recorded on the PRs. Author review only. + +[Library PR](https://github.com/PyAutoLabs/PyAutoFit/pull/1765) · [Experiment PR](https://github.com/PyAutoLabs/autofit_profiling/pull/15). Outside Pulse; merge remains human. The profiling branch depends on unmerged diagnostic PR13 and the library-first merge gate. Worktrees and raw data remain retained. diff --git a/experiments/nautilus_checkpoint_batching/attempt01.json b/experiments/nautilus_checkpoint_batching/attempt01.json new file mode 100644 index 0000000..f3eb5a6 --- /dev/null +++ b/experiments/nautilus_checkpoint_batching/attempt01.json @@ -0,0 +1,1025 @@ +{ + "state": { + "status": "halted", + "attempts": [ + { + "case": "workers-1-deferred-interrupt", + "status": "success", + "process_wall_s": 28.214253039997857, + "supervision": { + "termination_reason": "intentional_checkpoint_kill", + "returncode": -9, + "sampled_group_peak_rss_bytes": 214962176, + "rss_sample_interval_s": 0.05 + }, + "marker": { + "mode": "deferred", + "checkpoint": "workers-1-deferred-interrupt/checkpoint.hdf5", + "checkpoint_sha256": "781920a4ac74a77b430d4715b51d10c1cbbaab13eab480a8f33d8d2a00051d9c", + "recoverable_n_like": 4600, + "completed_n_like": 4800, + "lost_completed_evaluations": 200, + "pending_notifications": 2, + "in_flight_evaluations": 0, + "temporary": null + } + }, + { + "case": "workers-1-deferred-resume", + "status": "error", + "process_wall_s": 8.247083340000245, + "supervision": { + "returncode": 1, + "termination_reason": null, + "sampled_group_peak_rss_bytes": 205049856, + "memory_limit_bytes": 4294967296, + "rss_sample_interval_s": 0.05, + "rss_note": "process group sum; shared pages may repeat; sub-interval spikes may be missed" + } + } + ], + "preflight_s": 1.347284118000971, + "spent_s": 38.120670319000055, + "reason": "RuntimeError: workers-1-deferred-resume: error", + "unrun": [ + "workers-1-atomic-interrupt", + "workers-1-atomic-resume", + "workers-2-deferred-interrupt", + "workers-2-deferred-resume", + "workers-2-atomic-interrupt", + "workers-2-atomic-resume", + "d5-s0-i1", + "d5-s0-i5", + "d5-s1-i5", + "d5-s1-i1", + "d5-s2-i1", + "d5-s2-i5", + "d10-s0-i1", + "d10-s0-i5", + "d10-s1-i5", + "d10-s1-i1", + "d10-s2-i1", + "d10-s2-i5" + ] + }, + "protocol": "nautilus-checkpoint-batching-experiment@1", + "limits": { + "timeout_s": 120, + "memory_mib": 4096, + "budget_s": 1800 + }, + "plan_sha256": "aa7bc44e1b67cb85fdccc939f8b63b1a6bef1a103fb6d85ab91527f0755b49a9", + "measured_environment": { + "sources": { + "PyAutoFit": { + "revision": "e16fba3ee5682771b5fc6fcebede5051a8719723", + "code_sha256": "41cf1d28c0790cb4e41bc426b89bb6ad0264785b6149339021867dcab55ff225" + }, + "PyAutoNerves": { + "revision": "9b204c90c2ce05c5bb0cf3e9800ed13f005c6c56", + "code_sha256": "560c9250eb0d7f8f56b3d4d21f22b9e556e93fd0eba92b5b33860b903a2f3f0b" + }, + "producer": { + "revision": "d1087196ef2f468b515dad2543f27f5c62b43d74", + "code_sha256": "de42e01ad46d1051228aabfadc0facb2156e834fcd1772221714dbeaed65a324" + } + }, + "nautilus_source_sha256": "61e91f8fb85cf4a38877cd1c65bb0b111589bde77f5f74acb22a90f3ff2ec45c", + "packages": { + "numpy": "2.5.4", + "scipy": "1.17.1", + "scikit-learn": "1.9.1", + "h5py": "3.16.0", + "nautilus-sampler": "1.0.5", + "jax": "0.11.2", + "jaxlib": "0.11.2", + "threadpoolctl": "3.8.0" + }, + "distribution_versions": { + "autonerves": "9999.0.0.dev0", + "networkx": "3.1", + "jsonpickle": "4.1.4", + "dynesty": "2.1.5", + "array-api-compat": "1.16.0", + "pyparsing": "3.3.3", + "pillow": "13.0.0", + "psutil": "6.1.0", + "cycler": "0.12.1", + "emcee": "3.1.6", + "jaxlib": "0.11.2", + "pure_eval": "0.2.4", + "six": "1.17.0", + "imagesize": "2.0.1", + "mypy_extensions": "1.2.0", + "joblib": "1.6.0", + "snowballstemmer": "3.1.1", + "urllib3": "2.8.0", + "prompt_toolkit": "3.0.53", + "nautilus-sampler": "1.0.5", + "ml_dtypes": "0.6.0", + "autofit": "9999.0.0.dev0", + "Pygments": "2.21.0", + "babel": "2.18.0", + "pluggy": "1.7.0", + "MarkupSafe": "3.0.4", + "traitlets": "5.16.1", + "roman-numerals": "4.1.0", + "corner": "2.2.2", + "typing_extensions": "4.16.0", + "sphinxcontrib-devhelp": "2.0.0", + "dill": "0.4.1", + "asttokens": "3.0.2", + "sphinxcontrib-serializinghtml": "2.0.0", + "optax": "0.2.8", + "matplotlib-inline": "0.2.2", + "threadpoolctl": "3.8.0", + "ipython": "9.12.0", + "ruff": "0.17.4", + "Sphinx": "9.1.1", + "typing-inspect": "0.9.0", + "jedi": "0.20.1", + "certifi": "2026.10.23", + "wheel": "0.48.0", + "parso": "0.8.7", + "contourpy": "1.4.0", + "anesthetic": "2.16.0", + "alabaster": "1.0.0", + "pyvis": "0.3.2", + "charset-normalizer": "3.5.2", + "numpydoc": "1.11.0", + "gprof2dot": "2021.2.21", + "timeout-decorator": "0.5.0", + "absl-py": "2.5.1", + "ipython_pygments_lexers": "1.1.1", + "fonttools": "4.68.0", + "sphinxcontrib-qthelp": "2.0.0", + "PyYAML": "6.0.3", + "sphinxcontrib-applehelp": "2.0.0", + "iniconfig": "2.3.1", + "sphinxcontrib-jsmath": "2.0.0", + "executing": "2.3.0", + "numpy": "2.5.4", + "sphinxcontrib-htmlhelp": "2.1.0", + "decorator": "5.3.1", + "xxhash": "3.4.1", + "jax": "0.11.2", + "scipy": "1.17.1", + "Jinja2": "3.1.6", + "pandas": "3.0.6", + "stack-data": "0.6.3", + "kiwisolver": "1.5.1", + "python-dateutil": "4.0.0", + "packaging": "26.3", + "cloudpickle": "3.1.2", + "opt_einsum": "3.4.0", + "scikit-learn": "1.9.1", + "jaxnnls": "1.0.1", + "pexpect": "4.9.0", + "requests": "2.34.2", + "h5py": "3.16.0", + "ptyprocess": "0.7.0", + "greenlet": "3.5.6", + "docutils": "0.22.4", + "tzdata": "2026.6", + "wcwidth": "0.9.4", + "idna": "3.20", + "astunparse": "1.6.3", + "SQLAlchemy": "2.0.57", + "pytest": "9.2.0", + "narwhals": "2.28.0", + "matplotlib": "3.11.2" + }, + "python": "3.12.10 (main, Apr 9 2025, 08:55:05) [GCC 11.4.0]", + "host": "DESKTOP-H143S82", + "platform": "Linux-6.18.58.1-microsoft-standard-WSL2-x86_64-with-glibc2.35", + "affinity": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7 + ], + "thread_env": { + "OMP_NUM_THREADS": "1", + "OPENBLAS_NUM_THREADS": "1", + "MKL_NUM_THREADS": "1", + "NUMEXPR_NUM_THREADS": "1" + } + }, + "configurations": [ + { + "constructor": { + "n_dim": 5, + "n_live": 400, + "n_update": 400, + "n_points_min": 55, + "n_like_new_bound": 4000, + "enlarge_per_dim": 1.1, + "split_threshold": 100, + "n_networks": 4, + "n_batch": 100, + "vectorized": false, + "seed": 0 + }, + "stopping": { + "f_live": 0.01, + "n_shell": 1, + "n_eff": 10000, + "discard_exploration": true, + "verbose": false + }, + "pool": { + "likelihood_workers": 0, + "sampler_workers": 0, + "start_method": null + }, + "checkpoint": true, + "update_interval": 1000000, + "cost_profile": "none", + "work": 0 + }, + { + "constructor": { + "n_dim": 5, + "n_live": 400, + "n_update": 400, + "n_points_min": 55, + "n_like_new_bound": 4000, + "enlarge_per_dim": 1.1, + "split_threshold": 100, + "n_networks": 4, + "n_batch": 100, + "vectorized": false, + "seed": 0 + }, + "stopping": { + "f_live": 0.01, + "n_shell": 1, + "n_eff": 10000, + "discard_exploration": true, + "verbose": false + }, + "pool": { + "likelihood_workers": 0, + "sampler_workers": 0, + "start_method": null + }, + "checkpoint": true, + "update_interval": 1000000, + "cost_profile": "none", + "work": 0 + }, + { + "constructor": { + "n_dim": 5, + "n_live": 400, + "n_update": 400, + "n_points_min": 55, + "n_like_new_bound": 4000, + "enlarge_per_dim": 1.1, + "split_threshold": 100, + "n_networks": 4, + "n_batch": 100, + "vectorized": false, + "seed": 0 + }, + "stopping": { + "f_live": 0.01, + "n_shell": 1, + "n_eff": 10000, + "discard_exploration": true, + "verbose": false + }, + "pool": { + "likelihood_workers": 0, + "sampler_workers": 0, + "start_method": null + }, + "checkpoint": true, + "update_interval": 1000000, + "cost_profile": "none", + "work": 0 + }, + { + "constructor": { + "n_dim": 5, + "n_live": 400, + "n_update": 400, + "n_points_min": 55, + "n_like_new_bound": 4000, + "enlarge_per_dim": 1.1, + "split_threshold": 100, + "n_networks": 4, + "n_batch": 100, + "vectorized": false, + "seed": 0 + }, + "stopping": { + "f_live": 0.01, + "n_shell": 1, + "n_eff": 10000, + "discard_exploration": true, + "verbose": false + }, + "pool": { + "likelihood_workers": 0, + "sampler_workers": 0, + "start_method": null + }, + "checkpoint": true, + "update_interval": 1000000, + "cost_profile": "none", + "work": 0 + }, + { + "constructor": { + "n_dim": 5, + "n_live": 400, + "n_update": 400, + "n_points_min": 55, + "n_like_new_bound": 4000, + "enlarge_per_dim": 1.1, + "split_threshold": 100, + "n_networks": 4, + "n_batch": 100, + "vectorized": false, + "seed": 0 + }, + "stopping": { + "f_live": 0.01, + "n_shell": 1, + "n_eff": 10000, + "discard_exploration": true, + "verbose": false + }, + "pool": { + "likelihood_workers": 2, + "sampler_workers": 0, + "start_method": "fork" + }, + "checkpoint": true, + "update_interval": 1000000, + "cost_profile": "none", + "work": 0 + }, + { + "constructor": { + "n_dim": 5, + "n_live": 400, + "n_update": 400, + "n_points_min": 55, + "n_like_new_bound": 4000, + "enlarge_per_dim": 1.1, + "split_threshold": 100, + "n_networks": 4, + "n_batch": 100, + "vectorized": false, + "seed": 0 + }, + "stopping": { + "f_live": 0.01, + "n_shell": 1, + "n_eff": 10000, + "discard_exploration": true, + "verbose": false + }, + "pool": { + "likelihood_workers": 2, + "sampler_workers": 0, + "start_method": "fork" + }, + "checkpoint": true, + "update_interval": 1000000, + "cost_profile": "none", + "work": 0 + }, + { + "constructor": { + "n_dim": 5, + "n_live": 400, + "n_update": 400, + "n_points_min": 55, + "n_like_new_bound": 4000, + "enlarge_per_dim": 1.1, + "split_threshold": 100, + "n_networks": 4, + "n_batch": 100, + "vectorized": false, + "seed": 0 + }, + "stopping": { + "f_live": 0.01, + "n_shell": 1, + "n_eff": 10000, + "discard_exploration": true, + "verbose": false + }, + "pool": { + "likelihood_workers": 2, + "sampler_workers": 0, + "start_method": "fork" + }, + "checkpoint": true, + "update_interval": 1000000, + "cost_profile": "none", + "work": 0 + }, + { + "constructor": { + "n_dim": 5, + "n_live": 400, + "n_update": 400, + "n_points_min": 55, + "n_like_new_bound": 4000, + "enlarge_per_dim": 1.1, + "split_threshold": 100, + "n_networks": 4, + "n_batch": 100, + "vectorized": false, + "seed": 0 + }, + "stopping": { + "f_live": 0.01, + "n_shell": 1, + "n_eff": 10000, + "discard_exploration": true, + "verbose": false + }, + "pool": { + "likelihood_workers": 2, + "sampler_workers": 0, + "start_method": "fork" + }, + "checkpoint": true, + "update_interval": 1000000, + "cost_profile": "none", + "work": 0 + }, + { + "constructor": { + "n_dim": 5, + "n_live": 400, + "n_update": 400, + "n_points_min": 55, + "n_like_new_bound": 4000, + "enlarge_per_dim": 1.1, + "split_threshold": 100, + "n_networks": 4, + "n_batch": 100, + "vectorized": false, + "seed": 0 + }, + "stopping": { + "f_live": 0.01, + "n_shell": 1, + "n_eff": 10000, + "discard_exploration": true, + "verbose": false + }, + "pool": { + "likelihood_workers": 0, + "sampler_workers": 0, + "start_method": null + }, + "checkpoint": true, + "update_interval": 1000000, + "cost_profile": "none", + "work": 0 + }, + { + "constructor": { + "n_dim": 5, + "n_live": 400, + "n_update": 400, + "n_points_min": 55, + "n_like_new_bound": 4000, + "enlarge_per_dim": 1.1, + "split_threshold": 100, + "n_networks": 4, + "n_batch": 100, + "vectorized": false, + "seed": 0 + }, + "stopping": { + "f_live": 0.01, + "n_shell": 1, + "n_eff": 10000, + "discard_exploration": true, + "verbose": false + }, + "pool": { + "likelihood_workers": 0, + "sampler_workers": 0, + "start_method": null + }, + "checkpoint": true, + "update_interval": 1000000, + "cost_profile": "none", + "work": 0 + }, + { + "constructor": { + "n_dim": 5, + "n_live": 400, + "n_update": 400, + "n_points_min": 55, + "n_like_new_bound": 4000, + "enlarge_per_dim": 1.1, + "split_threshold": 100, + "n_networks": 4, + "n_batch": 100, + "vectorized": false, + "seed": 1 + }, + "stopping": { + "f_live": 0.01, + "n_shell": 1, + "n_eff": 10000, + "discard_exploration": true, + "verbose": false + }, + "pool": { + "likelihood_workers": 0, + "sampler_workers": 0, + "start_method": null + }, + "checkpoint": true, + "update_interval": 1000000, + "cost_profile": "none", + "work": 0 + }, + { + "constructor": { + "n_dim": 5, + "n_live": 400, + "n_update": 400, + "n_points_min": 55, + "n_like_new_bound": 4000, + "enlarge_per_dim": 1.1, + "split_threshold": 100, + "n_networks": 4, + "n_batch": 100, + "vectorized": false, + "seed": 1 + }, + "stopping": { + "f_live": 0.01, + "n_shell": 1, + "n_eff": 10000, + "discard_exploration": true, + "verbose": false + }, + "pool": { + "likelihood_workers": 0, + "sampler_workers": 0, + "start_method": null + }, + "checkpoint": true, + "update_interval": 1000000, + "cost_profile": "none", + "work": 0 + }, + { + "constructor": { + "n_dim": 5, + "n_live": 400, + "n_update": 400, + "n_points_min": 55, + "n_like_new_bound": 4000, + "enlarge_per_dim": 1.1, + "split_threshold": 100, + "n_networks": 4, + "n_batch": 100, + "vectorized": false, + "seed": 2 + }, + "stopping": { + "f_live": 0.01, + "n_shell": 1, + "n_eff": 10000, + "discard_exploration": true, + "verbose": false + }, + "pool": { + "likelihood_workers": 0, + "sampler_workers": 0, + "start_method": null + }, + "checkpoint": true, + "update_interval": 1000000, + "cost_profile": "none", + "work": 0 + }, + { + "constructor": { + "n_dim": 5, + "n_live": 400, + "n_update": 400, + "n_points_min": 55, + "n_like_new_bound": 4000, + "enlarge_per_dim": 1.1, + "split_threshold": 100, + "n_networks": 4, + "n_batch": 100, + "vectorized": false, + "seed": 2 + }, + "stopping": { + "f_live": 0.01, + "n_shell": 1, + "n_eff": 10000, + "discard_exploration": true, + "verbose": false + }, + "pool": { + "likelihood_workers": 0, + "sampler_workers": 0, + "start_method": null + }, + "checkpoint": true, + "update_interval": 1000000, + "cost_profile": "none", + "work": 0 + }, + { + "constructor": { + "n_dim": 10, + "n_live": 400, + "n_update": 400, + "n_points_min": 60, + "n_like_new_bound": 4000, + "enlarge_per_dim": 1.1, + "split_threshold": 100, + "n_networks": 4, + "n_batch": 100, + "vectorized": false, + "seed": 0 + }, + "stopping": { + "f_live": 0.01, + "n_shell": 1, + "n_eff": 10000, + "discard_exploration": true, + "verbose": false + }, + "pool": { + "likelihood_workers": 0, + "sampler_workers": 0, + "start_method": null + }, + "checkpoint": true, + "update_interval": 1000000, + "cost_profile": "none", + "work": 0 + }, + { + "constructor": { + "n_dim": 10, + "n_live": 400, + "n_update": 400, + "n_points_min": 60, + "n_like_new_bound": 4000, + "enlarge_per_dim": 1.1, + "split_threshold": 100, + "n_networks": 4, + "n_batch": 100, + "vectorized": false, + "seed": 0 + }, + "stopping": { + "f_live": 0.01, + "n_shell": 1, + "n_eff": 10000, + "discard_exploration": true, + "verbose": false + }, + "pool": { + "likelihood_workers": 0, + "sampler_workers": 0, + "start_method": null + }, + "checkpoint": true, + "update_interval": 1000000, + "cost_profile": "none", + "work": 0 + }, + { + "constructor": { + "n_dim": 10, + "n_live": 400, + "n_update": 400, + "n_points_min": 60, + "n_like_new_bound": 4000, + "enlarge_per_dim": 1.1, + "split_threshold": 100, + "n_networks": 4, + "n_batch": 100, + "vectorized": false, + "seed": 1 + }, + "stopping": { + "f_live": 0.01, + "n_shell": 1, + "n_eff": 10000, + "discard_exploration": true, + "verbose": false + }, + "pool": { + "likelihood_workers": 0, + "sampler_workers": 0, + "start_method": null + }, + "checkpoint": true, + "update_interval": 1000000, + "cost_profile": "none", + "work": 0 + }, + { + "constructor": { + "n_dim": 10, + "n_live": 400, + "n_update": 400, + "n_points_min": 60, + "n_like_new_bound": 4000, + "enlarge_per_dim": 1.1, + "split_threshold": 100, + "n_networks": 4, + "n_batch": 100, + "vectorized": false, + "seed": 1 + }, + "stopping": { + "f_live": 0.01, + "n_shell": 1, + "n_eff": 10000, + "discard_exploration": true, + "verbose": false + }, + "pool": { + "likelihood_workers": 0, + "sampler_workers": 0, + "start_method": null + }, + "checkpoint": true, + "update_interval": 1000000, + "cost_profile": "none", + "work": 0 + }, + { + "constructor": { + "n_dim": 10, + "n_live": 400, + "n_update": 400, + "n_points_min": 60, + "n_like_new_bound": 4000, + "enlarge_per_dim": 1.1, + "split_threshold": 100, + "n_networks": 4, + "n_batch": 100, + "vectorized": false, + "seed": 2 + }, + "stopping": { + "f_live": 0.01, + "n_shell": 1, + "n_eff": 10000, + "discard_exploration": true, + "verbose": false + }, + "pool": { + "likelihood_workers": 0, + "sampler_workers": 0, + "start_method": null + }, + "checkpoint": true, + "update_interval": 1000000, + "cost_profile": "none", + "work": 0 + }, + { + "constructor": { + "n_dim": 10, + "n_live": 400, + "n_update": 400, + "n_points_min": 60, + "n_like_new_bound": 4000, + "enlarge_per_dim": 1.1, + "split_threshold": 100, + "n_networks": 4, + "n_batch": 100, + "vectorized": false, + "seed": 2 + }, + "stopping": { + "f_live": 0.01, + "n_shell": 1, + "n_eff": 10000, + "discard_exploration": true, + "verbose": false + }, + "pool": { + "likelihood_workers": 0, + "sampler_workers": 0, + "start_method": null + }, + "checkpoint": true, + "update_interval": 1000000, + "cost_profile": "none", + "work": 0 + } + ], + "cases": [ + { + "id": "workers-1-deferred-interrupt", + "phase": "interrupt", + "witness": "workers-1-deferred", + "mode": "deferred", + "workers": 1, + "dimension": 5, + "seed": 0, + "interval": 5 + }, + { + "id": "workers-1-deferred-resume", + "phase": "resume", + "witness": "workers-1-deferred", + "mode": "deferred", + "workers": 1, + "dimension": 5, + "seed": 0, + "interval": 5 + }, + { + "id": "workers-1-atomic-interrupt", + "phase": "interrupt", + "witness": "workers-1-atomic", + "mode": "atomic", + "workers": 1, + "dimension": 5, + "seed": 0, + "interval": 5 + }, + { + "id": "workers-1-atomic-resume", + "phase": "resume", + "witness": "workers-1-atomic", + "mode": "atomic", + "workers": 1, + "dimension": 5, + "seed": 0, + "interval": 5 + }, + { + "id": "workers-2-deferred-interrupt", + "phase": "interrupt", + "witness": "workers-2-deferred", + "mode": "deferred", + "workers": 2, + "dimension": 5, + "seed": 0, + "interval": 5 + }, + { + "id": "workers-2-deferred-resume", + "phase": "resume", + "witness": "workers-2-deferred", + "mode": "deferred", + "workers": 2, + "dimension": 5, + "seed": 0, + "interval": 5 + }, + { + "id": "workers-2-atomic-interrupt", + "phase": "interrupt", + "witness": "workers-2-atomic", + "mode": "atomic", + "workers": 2, + "dimension": 5, + "seed": 0, + "interval": 5 + }, + { + "id": "workers-2-atomic-resume", + "phase": "resume", + "witness": "workers-2-atomic", + "mode": "atomic", + "workers": 2, + "dimension": 5, + "seed": 0, + "interval": 5 + }, + { + "id": "d5-s0-i1", + "phase": "performance", + "workers": 1, + "dimension": 5, + "seed": 0, + "interval": 1 + }, + { + "id": "d5-s0-i5", + "phase": "performance", + "workers": 1, + "dimension": 5, + "seed": 0, + "interval": 5 + }, + { + "id": "d5-s1-i5", + "phase": "performance", + "workers": 1, + "dimension": 5, + "seed": 1, + "interval": 5 + }, + { + "id": "d5-s1-i1", + "phase": "performance", + "workers": 1, + "dimension": 5, + "seed": 1, + "interval": 1 + }, + { + "id": "d5-s2-i1", + "phase": "performance", + "workers": 1, + "dimension": 5, + "seed": 2, + "interval": 1 + }, + { + "id": "d5-s2-i5", + "phase": "performance", + "workers": 1, + "dimension": 5, + "seed": 2, + "interval": 5 + }, + { + "id": "d10-s0-i1", + "phase": "performance", + "workers": 1, + "dimension": 10, + "seed": 0, + "interval": 1 + }, + { + "id": "d10-s0-i5", + "phase": "performance", + "workers": 1, + "dimension": 10, + "seed": 0, + "interval": 5 + }, + { + "id": "d10-s1-i5", + "phase": "performance", + "workers": 1, + "dimension": 10, + "seed": 1, + "interval": 5 + }, + { + "id": "d10-s1-i1", + "phase": "performance", + "workers": 1, + "dimension": 10, + "seed": 1, + "interval": 1 + }, + { + "id": "d10-s2-i1", + "phase": "performance", + "workers": 1, + "dimension": 10, + "seed": 2, + "interval": 1 + }, + { + "id": "d10-s2-i5", + "phase": "performance", + "workers": 1, + "dimension": 10, + "seed": 2, + "interval": 5 + } + ], + "interpretation": "No completed paired performance comparison; no checkpoint speedup claim.", + "post_failure_read_only_verification": { + "kind": "read-only post-failure verification; not a passed pilot case", + "result": { + "posterior_sha256": "9181de303adef000c517ae25c3ea644115a44d5e8b0e764275aeb65f850a0cc1", + "n_like": 16300, + "n_eff": 10020.771588733165, + "shells": 9 + }, + "new_likelihood_calls": 0, + "checkpoint_sha256": "584465be1fe2d7887472c7708153158ee30e466da2ae659ac2359aa9342796b5", + "restored_count_type": "int64" + } +} From 5206f0bc210863ceaf125a5a93181789329ec8c2 Mon Sep 17 00:00:00 2001 From: Jammy2211 Date: Tue, 10 Nov 2026 17:53:33 +0000 Subject: [PATCH 5/7] Record corrected checkpoint pilot stopped by host-load guard --- .../nautilus_checkpoint_batching/README.md | 12 +- .../attempt02.json | 1028 +++++++++++++++++ 2 files changed, 1039 insertions(+), 1 deletion(-) create mode 100644 experiments/nautilus_checkpoint_batching/attempt02.json diff --git a/experiments/nautilus_checkpoint_batching/README.md b/experiments/nautilus_checkpoint_batching/README.md index 8822031..470860f 100644 --- a/experiments/nautilus_checkpoint_batching/README.md +++ b/experiments/nautilus_checkpoint_batching/README.md @@ -1,5 +1,15 @@ # Checkpoint batching experiment +The explicitly approved corrected attempt stopped at the host-load guard after one successful controlled interruption. Total elapsed time was 46.74s including preflight; the first child took 44.94s and peaked at 203.6 MiB sampled process-group RSS. All 19 remaining children, including the resume child and every timing comparison, are unrun. **There is still no checkpoint speedup measurement.** + +The saved checkpoint remained byte-identical to its recorded hash: 4,600 recoverable evaluations versus 4,800 completed, with 200 completed evaluations lost and zero in flight at this controlled hook. The uninterrupted control reached 16,300 evaluations and ESS 10,020.771588733165. Resume was not launched in this attempt; no crash/resume witness is fully completed by attempt02. + +The one-minute host-load admission limit was 2.0 for eight available CPUs. Load before the first child was 1.7075; the guard rejected the next child. Its exact failing snapshot was not persisted, so this report does not attribute the load increase to a process or claim a precise value. Limits remained 20 children, 120s/4096 MiB each and 1800s aggregate. No retry followed the stop, and the guard was not relaxed. + +Measured producer15afe55 contains exactly the approved corrected harness from daf0cc6, plus a test portability adjustment and the attempt01 report; library e16fba3ee was unchanged. Frozen source identities, configuration, control and status are in attempt02.json. Both raw attempts and all worktrees remain retained, outside Pulse; merge remains human. + +## First attempt and correction + The first bounded attempt stopped after 38.12s because the resume receipt could not serialize a restored NumPy integer. One controlled interruption completed; its resume process failed while writing its receipt. All other 18 children, including every performance comparison, remain unrun. No checkpoint speedup has been measured. The single-worker deferred interruption preserved the published file at 4,600 likelihood evaluations, with 4,800 completed in memory: 200 completed evaluations lost, zero in flight at this controlled boundary. The prior checkpoint's SHA256 remained unchanged after process-group termination. @@ -12,6 +22,6 @@ The opt-in library policy keeps interval1 native. Larger intervals publish full Measured library e16fba3ee; initial producer d108719. Complete frozen identities, settings, limits, status and unrun cases are in attempt01.json. The original matrix is four crash/resume witnesses followed by six paired D5/D10 seed comparisons; n_live400, n_batch100, n_eff10000, four default networks, discard_exploration=True. Limits are 20 children, 120s/4096MiB each, 1800s total including preflight. All four correctness witnesses must pass before timing comparisons. No further pilot is authorized by this report. -Validation: full library suite 4302 passed, 2 skipped, 1 expected upstream failure; eight script and two notebook smoke cases passed. Tooling Ruff check/format and unchanged catalogue validation pass. Exact-head CI is recorded on the PRs. Author review only. +Validation: full library suite 4302 passed, 2 skipped, 1 expected upstream failure; eight script and two notebook smoke cases passed. Tooling Ruff check/format and unchanged catalogue validation pass. Exact library head e16fba3ee passed Python 3.12, Python 3.13 and no-JAX CI (run42867205132), plus Docs. The corrected producer15afe55 passed tooling CI (run42867935308); final report-head CI is recorded on the PR. Author review only. [Library PR](https://github.com/PyAutoLabs/PyAutoFit/pull/1765) · [Experiment PR](https://github.com/PyAutoLabs/autofit_profiling/pull/15). Outside Pulse; merge remains human. The profiling branch depends on unmerged diagnostic PR13 and the library-first merge gate. Worktrees and raw data remain retained. diff --git a/experiments/nautilus_checkpoint_batching/attempt02.json b/experiments/nautilus_checkpoint_batching/attempt02.json new file mode 100644 index 0000000..a8cafac --- /dev/null +++ b/experiments/nautilus_checkpoint_batching/attempt02.json @@ -0,0 +1,1028 @@ +{ + "authorization": "Live human: Run corrected checkpoint pilot once", + "state": { + "status": "halted", + "attempts": [ + { + "case": "workers-1-deferred-interrupt", + "status": "success", + "host": { + "host": "DESKTOP-H143S82", + "affinity": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7 + ], + "load": [ + 1.70751953125, + 1.51416015625, + 1.44921875 + ], + "time": 1794333117.1552958 + }, + "process_wall_s": 44.93886115999703, + "supervision": { + "termination_reason": "intentional_checkpoint_kill", + "returncode": -9, + "sampled_group_peak_rss_bytes": 213508096, + "rss_sample_interval_s": 0.05 + }, + "marker": { + "mode": "deferred", + "checkpoint": "workers-1-deferred-interrupt/checkpoint.hdf5", + "checkpoint_sha256": "781920a4ac74a77b430d4715b51d10c1cbbaab13eab480a8f33d8d2a00051d9c", + "recoverable_n_like": 4600, + "completed_n_like": 4800, + "lost_completed_evaluations": 200, + "pending_notifications": 2, + "in_flight_evaluations": 0, + "temporary": null + } + } + ], + "preflight_s": 1.5614877560001332, + "spent_s": 46.73822006499904, + "reason": "RuntimeError: host load exceeds guard", + "unrun": [ + "workers-1-deferred-resume", + "workers-1-atomic-interrupt", + "workers-1-atomic-resume", + "workers-2-deferred-interrupt", + "workers-2-deferred-resume", + "workers-2-atomic-interrupt", + "workers-2-atomic-resume", + "d5-s0-i1", + "d5-s0-i5", + "d5-s1-i5", + "d5-s1-i1", + "d5-s2-i1", + "d5-s2-i5", + "d10-s0-i1", + "d10-s0-i5", + "d10-s1-i5", + "d10-s1-i1", + "d10-s2-i1", + "d10-s2-i5" + ] + }, + "protocol": "nautilus-checkpoint-batching-experiment@1", + "limits": { + "timeout_s": 120, + "memory_mib": 4096, + "budget_s": 1800 + }, + "plan_sha256": "f682ea415c25aef681a5d488a196c5b68051bbc93993095c5df63dccf4ff1af7", + "measured_environment": { + "sources": { + "PyAutoFit": { + "revision": "e16fba3ee5682771b5fc6fcebede5051a8719723", + "code_sha256": "41cf1d28c0790cb4e41bc426b89bb6ad0264785b6149339021867dcab55ff225" + }, + "PyAutoNerves": { + "revision": "9b204c90c2ce05c5bb0cf3e9800ed13f005c6c56", + "code_sha256": "560c9250eb0d7f8f56b3d4d21f22b9e556e93fd0eba92b5b33860b903a2f3f0b" + }, + "producer": { + "revision": "15afe55e56735e63838f89277aa4c0c03511c6ea", + "code_sha256": "295cf76223b8678e79996d9e5e7fb8a4ed3970aa61e7d38af7c76189f91acf2c" + } + }, + "nautilus_source_sha256": "61e91f8fb85cf4a38877cd1c65bb0b111589bde77f5f74acb22a90f3ff2ec45c", + "packages": { + "numpy": "2.5.4", + "scipy": "1.17.1", + "scikit-learn": "1.9.1", + "h5py": "3.16.0", + "nautilus-sampler": "1.0.5", + "jax": "0.11.2", + "jaxlib": "0.11.2", + "threadpoolctl": "3.8.0" + }, + "distribution_versions": { + "autonerves": "9999.0.0.dev0", + "networkx": "3.1", + "jsonpickle": "4.1.4", + "dynesty": "2.1.5", + "array-api-compat": "1.16.0", + "pyparsing": "3.3.3", + "pillow": "13.0.0", + "psutil": "6.1.0", + "cycler": "0.12.1", + "emcee": "3.1.6", + "jaxlib": "0.11.2", + "pure_eval": "0.2.4", + "six": "1.17.0", + "imagesize": "2.0.1", + "mypy_extensions": "1.2.0", + "joblib": "1.6.0", + "snowballstemmer": "3.1.1", + "urllib3": "2.8.0", + "prompt_toolkit": "3.0.53", + "nautilus-sampler": "1.0.5", + "ml_dtypes": "0.6.0", + "autofit": "9999.0.0.dev0", + "Pygments": "2.21.0", + "babel": "2.18.0", + "pluggy": "1.7.0", + "MarkupSafe": "3.0.4", + "traitlets": "5.16.1", + "roman-numerals": "4.1.0", + "corner": "2.2.2", + "typing_extensions": "4.16.0", + "sphinxcontrib-devhelp": "2.0.0", + "dill": "0.4.1", + "asttokens": "3.0.2", + "sphinxcontrib-serializinghtml": "2.0.0", + "optax": "0.2.8", + "matplotlib-inline": "0.2.2", + "threadpoolctl": "3.8.0", + "ipython": "9.12.0", + "ruff": "0.17.4", + "Sphinx": "9.1.1", + "typing-inspect": "0.9.0", + "jedi": "0.20.1", + "certifi": "2026.10.23", + "wheel": "0.48.0", + "parso": "0.8.7", + "contourpy": "1.4.0", + "anesthetic": "2.16.0", + "alabaster": "1.0.0", + "pyvis": "0.3.2", + "charset-normalizer": "3.5.2", + "numpydoc": "1.11.0", + "gprof2dot": "2021.2.21", + "timeout-decorator": "0.5.0", + "absl-py": "2.5.1", + "ipython_pygments_lexers": "1.1.1", + "fonttools": "4.68.0", + "sphinxcontrib-qthelp": "2.0.0", + "PyYAML": "6.0.3", + "sphinxcontrib-applehelp": "2.0.0", + "iniconfig": "2.3.1", + "sphinxcontrib-jsmath": "2.0.0", + "executing": "2.3.0", + "numpy": "2.5.4", + "sphinxcontrib-htmlhelp": "2.1.0", + "decorator": "5.3.1", + "xxhash": "3.4.1", + "jax": "0.11.2", + "scipy": "1.17.1", + "Jinja2": "3.1.6", + "pandas": "3.0.6", + "stack-data": "0.6.3", + "kiwisolver": "1.5.1", + "python-dateutil": "4.0.0", + "packaging": "26.3", + "cloudpickle": "3.1.2", + "opt_einsum": "3.4.0", + "scikit-learn": "1.9.1", + "jaxnnls": "1.0.1", + "pexpect": "4.9.0", + "requests": "2.34.2", + "h5py": "3.16.0", + "ptyprocess": "0.7.0", + "greenlet": "3.5.6", + "docutils": "0.22.4", + "tzdata": "2026.6", + "wcwidth": "0.9.4", + "idna": "3.20", + "astunparse": "1.6.3", + "SQLAlchemy": "2.0.57", + "pytest": "9.2.0", + "narwhals": "2.28.0", + "matplotlib": "3.11.2" + }, + "python": "3.12.10 (main, Apr 9 2025, 08:55:05) [GCC 11.4.0]", + "host": "DESKTOP-H143S82", + "platform": "Linux-6.18.58.1-microsoft-standard-WSL2-x86_64-with-glibc2.35", + "affinity": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7 + ], + "thread_env": { + "OMP_NUM_THREADS": "1", + "OPENBLAS_NUM_THREADS": "1", + "MKL_NUM_THREADS": "1", + "NUMEXPR_NUM_THREADS": "1" + } + }, + "cases": [ + { + "id": "workers-1-deferred-interrupt", + "phase": "interrupt", + "witness": "workers-1-deferred", + "mode": "deferred", + "workers": 1, + "dimension": 5, + "seed": 0, + "interval": 5 + }, + { + "id": "workers-1-deferred-resume", + "phase": "resume", + "witness": "workers-1-deferred", + "mode": "deferred", + "workers": 1, + "dimension": 5, + "seed": 0, + "interval": 5 + }, + { + "id": "workers-1-atomic-interrupt", + "phase": "interrupt", + "witness": "workers-1-atomic", + "mode": "atomic", + "workers": 1, + "dimension": 5, + "seed": 0, + "interval": 5 + }, + { + "id": "workers-1-atomic-resume", + "phase": "resume", + "witness": "workers-1-atomic", + "mode": "atomic", + "workers": 1, + "dimension": 5, + "seed": 0, + "interval": 5 + }, + { + "id": "workers-2-deferred-interrupt", + "phase": "interrupt", + "witness": "workers-2-deferred", + "mode": "deferred", + "workers": 2, + "dimension": 5, + "seed": 0, + "interval": 5 + }, + { + "id": "workers-2-deferred-resume", + "phase": "resume", + "witness": "workers-2-deferred", + "mode": "deferred", + "workers": 2, + "dimension": 5, + "seed": 0, + "interval": 5 + }, + { + "id": "workers-2-atomic-interrupt", + "phase": "interrupt", + "witness": "workers-2-atomic", + "mode": "atomic", + "workers": 2, + "dimension": 5, + "seed": 0, + "interval": 5 + }, + { + "id": "workers-2-atomic-resume", + "phase": "resume", + "witness": "workers-2-atomic", + "mode": "atomic", + "workers": 2, + "dimension": 5, + "seed": 0, + "interval": 5 + }, + { + "id": "d5-s0-i1", + "phase": "performance", + "workers": 1, + "dimension": 5, + "seed": 0, + "interval": 1 + }, + { + "id": "d5-s0-i5", + "phase": "performance", + "workers": 1, + "dimension": 5, + "seed": 0, + "interval": 5 + }, + { + "id": "d5-s1-i5", + "phase": "performance", + "workers": 1, + "dimension": 5, + "seed": 1, + "interval": 5 + }, + { + "id": "d5-s1-i1", + "phase": "performance", + "workers": 1, + "dimension": 5, + "seed": 1, + "interval": 1 + }, + { + "id": "d5-s2-i1", + "phase": "performance", + "workers": 1, + "dimension": 5, + "seed": 2, + "interval": 1 + }, + { + "id": "d5-s2-i5", + "phase": "performance", + "workers": 1, + "dimension": 5, + "seed": 2, + "interval": 5 + }, + { + "id": "d10-s0-i1", + "phase": "performance", + "workers": 1, + "dimension": 10, + "seed": 0, + "interval": 1 + }, + { + "id": "d10-s0-i5", + "phase": "performance", + "workers": 1, + "dimension": 10, + "seed": 0, + "interval": 5 + }, + { + "id": "d10-s1-i5", + "phase": "performance", + "workers": 1, + "dimension": 10, + "seed": 1, + "interval": 5 + }, + { + "id": "d10-s1-i1", + "phase": "performance", + "workers": 1, + "dimension": 10, + "seed": 1, + "interval": 1 + }, + { + "id": "d10-s2-i1", + "phase": "performance", + "workers": 1, + "dimension": 10, + "seed": 2, + "interval": 1 + }, + { + "id": "d10-s2-i5", + "phase": "performance", + "workers": 1, + "dimension": 10, + "seed": 2, + "interval": 5 + } + ], + "configurations": [ + { + "constructor": { + "n_dim": 5, + "n_live": 400, + "n_update": 400, + "n_points_min": 55, + "n_like_new_bound": 4000, + "enlarge_per_dim": 1.1, + "split_threshold": 100, + "n_networks": 4, + "n_batch": 100, + "vectorized": false, + "seed": 0 + }, + "stopping": { + "f_live": 0.01, + "n_shell": 1, + "n_eff": 10000, + "discard_exploration": true, + "verbose": false + }, + "pool": { + "likelihood_workers": 0, + "sampler_workers": 0, + "start_method": null + }, + "checkpoint": true, + "update_interval": 1000000, + "cost_profile": "none", + "work": 0 + }, + { + "constructor": { + "n_dim": 5, + "n_live": 400, + "n_update": 400, + "n_points_min": 55, + "n_like_new_bound": 4000, + "enlarge_per_dim": 1.1, + "split_threshold": 100, + "n_networks": 4, + "n_batch": 100, + "vectorized": false, + "seed": 0 + }, + "stopping": { + "f_live": 0.01, + "n_shell": 1, + "n_eff": 10000, + "discard_exploration": true, + "verbose": false + }, + "pool": { + "likelihood_workers": 0, + "sampler_workers": 0, + "start_method": null + }, + "checkpoint": true, + "update_interval": 1000000, + "cost_profile": "none", + "work": 0 + }, + { + "constructor": { + "n_dim": 5, + "n_live": 400, + "n_update": 400, + "n_points_min": 55, + "n_like_new_bound": 4000, + "enlarge_per_dim": 1.1, + "split_threshold": 100, + "n_networks": 4, + "n_batch": 100, + "vectorized": false, + "seed": 0 + }, + "stopping": { + "f_live": 0.01, + "n_shell": 1, + "n_eff": 10000, + "discard_exploration": true, + "verbose": false + }, + "pool": { + "likelihood_workers": 0, + "sampler_workers": 0, + "start_method": null + }, + "checkpoint": true, + "update_interval": 1000000, + "cost_profile": "none", + "work": 0 + }, + { + "constructor": { + "n_dim": 5, + "n_live": 400, + "n_update": 400, + "n_points_min": 55, + "n_like_new_bound": 4000, + "enlarge_per_dim": 1.1, + "split_threshold": 100, + "n_networks": 4, + "n_batch": 100, + "vectorized": false, + "seed": 0 + }, + "stopping": { + "f_live": 0.01, + "n_shell": 1, + "n_eff": 10000, + "discard_exploration": true, + "verbose": false + }, + "pool": { + "likelihood_workers": 0, + "sampler_workers": 0, + "start_method": null + }, + "checkpoint": true, + "update_interval": 1000000, + "cost_profile": "none", + "work": 0 + }, + { + "constructor": { + "n_dim": 5, + "n_live": 400, + "n_update": 400, + "n_points_min": 55, + "n_like_new_bound": 4000, + "enlarge_per_dim": 1.1, + "split_threshold": 100, + "n_networks": 4, + "n_batch": 100, + "vectorized": false, + "seed": 0 + }, + "stopping": { + "f_live": 0.01, + "n_shell": 1, + "n_eff": 10000, + "discard_exploration": true, + "verbose": false + }, + "pool": { + "likelihood_workers": 2, + "sampler_workers": 0, + "start_method": "fork" + }, + "checkpoint": true, + "update_interval": 1000000, + "cost_profile": "none", + "work": 0 + }, + { + "constructor": { + "n_dim": 5, + "n_live": 400, + "n_update": 400, + "n_points_min": 55, + "n_like_new_bound": 4000, + "enlarge_per_dim": 1.1, + "split_threshold": 100, + "n_networks": 4, + "n_batch": 100, + "vectorized": false, + "seed": 0 + }, + "stopping": { + "f_live": 0.01, + "n_shell": 1, + "n_eff": 10000, + "discard_exploration": true, + "verbose": false + }, + "pool": { + "likelihood_workers": 2, + "sampler_workers": 0, + "start_method": "fork" + }, + "checkpoint": true, + "update_interval": 1000000, + "cost_profile": "none", + "work": 0 + }, + { + "constructor": { + "n_dim": 5, + "n_live": 400, + "n_update": 400, + "n_points_min": 55, + "n_like_new_bound": 4000, + "enlarge_per_dim": 1.1, + "split_threshold": 100, + "n_networks": 4, + "n_batch": 100, + "vectorized": false, + "seed": 0 + }, + "stopping": { + "f_live": 0.01, + "n_shell": 1, + "n_eff": 10000, + "discard_exploration": true, + "verbose": false + }, + "pool": { + "likelihood_workers": 2, + "sampler_workers": 0, + "start_method": "fork" + }, + "checkpoint": true, + "update_interval": 1000000, + "cost_profile": "none", + "work": 0 + }, + { + "constructor": { + "n_dim": 5, + "n_live": 400, + "n_update": 400, + "n_points_min": 55, + "n_like_new_bound": 4000, + "enlarge_per_dim": 1.1, + "split_threshold": 100, + "n_networks": 4, + "n_batch": 100, + "vectorized": false, + "seed": 0 + }, + "stopping": { + "f_live": 0.01, + "n_shell": 1, + "n_eff": 10000, + "discard_exploration": true, + "verbose": false + }, + "pool": { + "likelihood_workers": 2, + "sampler_workers": 0, + "start_method": "fork" + }, + "checkpoint": true, + "update_interval": 1000000, + "cost_profile": "none", + "work": 0 + }, + { + "constructor": { + "n_dim": 5, + "n_live": 400, + "n_update": 400, + "n_points_min": 55, + "n_like_new_bound": 4000, + "enlarge_per_dim": 1.1, + "split_threshold": 100, + "n_networks": 4, + "n_batch": 100, + "vectorized": false, + "seed": 0 + }, + "stopping": { + "f_live": 0.01, + "n_shell": 1, + "n_eff": 10000, + "discard_exploration": true, + "verbose": false + }, + "pool": { + "likelihood_workers": 0, + "sampler_workers": 0, + "start_method": null + }, + "checkpoint": true, + "update_interval": 1000000, + "cost_profile": "none", + "work": 0 + }, + { + "constructor": { + "n_dim": 5, + "n_live": 400, + "n_update": 400, + "n_points_min": 55, + "n_like_new_bound": 4000, + "enlarge_per_dim": 1.1, + "split_threshold": 100, + "n_networks": 4, + "n_batch": 100, + "vectorized": false, + "seed": 0 + }, + "stopping": { + "f_live": 0.01, + "n_shell": 1, + "n_eff": 10000, + "discard_exploration": true, + "verbose": false + }, + "pool": { + "likelihood_workers": 0, + "sampler_workers": 0, + "start_method": null + }, + "checkpoint": true, + "update_interval": 1000000, + "cost_profile": "none", + "work": 0 + }, + { + "constructor": { + "n_dim": 5, + "n_live": 400, + "n_update": 400, + "n_points_min": 55, + "n_like_new_bound": 4000, + "enlarge_per_dim": 1.1, + "split_threshold": 100, + "n_networks": 4, + "n_batch": 100, + "vectorized": false, + "seed": 1 + }, + "stopping": { + "f_live": 0.01, + "n_shell": 1, + "n_eff": 10000, + "discard_exploration": true, + "verbose": false + }, + "pool": { + "likelihood_workers": 0, + "sampler_workers": 0, + "start_method": null + }, + "checkpoint": true, + "update_interval": 1000000, + "cost_profile": "none", + "work": 0 + }, + { + "constructor": { + "n_dim": 5, + "n_live": 400, + "n_update": 400, + "n_points_min": 55, + "n_like_new_bound": 4000, + "enlarge_per_dim": 1.1, + "split_threshold": 100, + "n_networks": 4, + "n_batch": 100, + "vectorized": false, + "seed": 1 + }, + "stopping": { + "f_live": 0.01, + "n_shell": 1, + "n_eff": 10000, + "discard_exploration": true, + "verbose": false + }, + "pool": { + "likelihood_workers": 0, + "sampler_workers": 0, + "start_method": null + }, + "checkpoint": true, + "update_interval": 1000000, + "cost_profile": "none", + "work": 0 + }, + { + "constructor": { + "n_dim": 5, + "n_live": 400, + "n_update": 400, + "n_points_min": 55, + "n_like_new_bound": 4000, + "enlarge_per_dim": 1.1, + "split_threshold": 100, + "n_networks": 4, + "n_batch": 100, + "vectorized": false, + "seed": 2 + }, + "stopping": { + "f_live": 0.01, + "n_shell": 1, + "n_eff": 10000, + "discard_exploration": true, + "verbose": false + }, + "pool": { + "likelihood_workers": 0, + "sampler_workers": 0, + "start_method": null + }, + "checkpoint": true, + "update_interval": 1000000, + "cost_profile": "none", + "work": 0 + }, + { + "constructor": { + "n_dim": 5, + "n_live": 400, + "n_update": 400, + "n_points_min": 55, + "n_like_new_bound": 4000, + "enlarge_per_dim": 1.1, + "split_threshold": 100, + "n_networks": 4, + "n_batch": 100, + "vectorized": false, + "seed": 2 + }, + "stopping": { + "f_live": 0.01, + "n_shell": 1, + "n_eff": 10000, + "discard_exploration": true, + "verbose": false + }, + "pool": { + "likelihood_workers": 0, + "sampler_workers": 0, + "start_method": null + }, + "checkpoint": true, + "update_interval": 1000000, + "cost_profile": "none", + "work": 0 + }, + { + "constructor": { + "n_dim": 10, + "n_live": 400, + "n_update": 400, + "n_points_min": 60, + "n_like_new_bound": 4000, + "enlarge_per_dim": 1.1, + "split_threshold": 100, + "n_networks": 4, + "n_batch": 100, + "vectorized": false, + "seed": 0 + }, + "stopping": { + "f_live": 0.01, + "n_shell": 1, + "n_eff": 10000, + "discard_exploration": true, + "verbose": false + }, + "pool": { + "likelihood_workers": 0, + "sampler_workers": 0, + "start_method": null + }, + "checkpoint": true, + "update_interval": 1000000, + "cost_profile": "none", + "work": 0 + }, + { + "constructor": { + "n_dim": 10, + "n_live": 400, + "n_update": 400, + "n_points_min": 60, + "n_like_new_bound": 4000, + "enlarge_per_dim": 1.1, + "split_threshold": 100, + "n_networks": 4, + "n_batch": 100, + "vectorized": false, + "seed": 0 + }, + "stopping": { + "f_live": 0.01, + "n_shell": 1, + "n_eff": 10000, + "discard_exploration": true, + "verbose": false + }, + "pool": { + "likelihood_workers": 0, + "sampler_workers": 0, + "start_method": null + }, + "checkpoint": true, + "update_interval": 1000000, + "cost_profile": "none", + "work": 0 + }, + { + "constructor": { + "n_dim": 10, + "n_live": 400, + "n_update": 400, + "n_points_min": 60, + "n_like_new_bound": 4000, + "enlarge_per_dim": 1.1, + "split_threshold": 100, + "n_networks": 4, + "n_batch": 100, + "vectorized": false, + "seed": 1 + }, + "stopping": { + "f_live": 0.01, + "n_shell": 1, + "n_eff": 10000, + "discard_exploration": true, + "verbose": false + }, + "pool": { + "likelihood_workers": 0, + "sampler_workers": 0, + "start_method": null + }, + "checkpoint": true, + "update_interval": 1000000, + "cost_profile": "none", + "work": 0 + }, + { + "constructor": { + "n_dim": 10, + "n_live": 400, + "n_update": 400, + "n_points_min": 60, + "n_like_new_bound": 4000, + "enlarge_per_dim": 1.1, + "split_threshold": 100, + "n_networks": 4, + "n_batch": 100, + "vectorized": false, + "seed": 1 + }, + "stopping": { + "f_live": 0.01, + "n_shell": 1, + "n_eff": 10000, + "discard_exploration": true, + "verbose": false + }, + "pool": { + "likelihood_workers": 0, + "sampler_workers": 0, + "start_method": null + }, + "checkpoint": true, + "update_interval": 1000000, + "cost_profile": "none", + "work": 0 + }, + { + "constructor": { + "n_dim": 10, + "n_live": 400, + "n_update": 400, + "n_points_min": 60, + "n_like_new_bound": 4000, + "enlarge_per_dim": 1.1, + "split_threshold": 100, + "n_networks": 4, + "n_batch": 100, + "vectorized": false, + "seed": 2 + }, + "stopping": { + "f_live": 0.01, + "n_shell": 1, + "n_eff": 10000, + "discard_exploration": true, + "verbose": false + }, + "pool": { + "likelihood_workers": 0, + "sampler_workers": 0, + "start_method": null + }, + "checkpoint": true, + "update_interval": 1000000, + "cost_profile": "none", + "work": 0 + }, + { + "constructor": { + "n_dim": 10, + "n_live": 400, + "n_update": 400, + "n_points_min": 60, + "n_like_new_bound": 4000, + "enlarge_per_dim": 1.1, + "split_threshold": 100, + "n_networks": 4, + "n_batch": 100, + "vectorized": false, + "seed": 2 + }, + "stopping": { + "f_live": 0.01, + "n_shell": 1, + "n_eff": 10000, + "discard_exploration": true, + "verbose": false + }, + "pool": { + "likelihood_workers": 0, + "sampler_workers": 0, + "start_method": null + }, + "checkpoint": true, + "update_interval": 1000000, + "cost_profile": "none", + "work": 0 + } + ], + "checkpoint_integrity_verified": true, + "control": { + "posterior_sha256": "9181de303adef000c517ae25c3ea644115a44d5e8b0e764275aeb65f850a0cc1", + "n_like": 16300, + "n_eff": 10020.771588733165, + "shells": 9 + }, + "interpretation": "No resume child or performance comparison launched. No retry. No speedup measurement." +} From e1cebf89e54b7b3439e6727b9eaef116fce0aba8 Mon Sep 17 00:00:00 2001 From: Jammy2211 Date: Tue, 10 Nov 2026 18:35:44 +0000 Subject: [PATCH 6/7] Record complete checkpoint pilot and negative performance result --- .../nautilus_checkpoint_batching/README.md | 57 +- .../attempt03.json | 1329 +++++++++++++++++ .../quiet_host_admission03.json | 397 +++++ 3 files changed, 1782 insertions(+), 1 deletion(-) create mode 100644 experiments/nautilus_checkpoint_batching/attempt03.json create mode 100644 experiments/nautilus_checkpoint_batching/quiet_host_admission03.json diff --git a/experiments/nautilus_checkpoint_batching/README.md b/experiments/nautilus_checkpoint_batching/README.md index 470860f..296bd17 100644 --- a/experiments/nautilus_checkpoint_batching/README.md +++ b/experiments/nautilus_checkpoint_batching/README.md @@ -1,5 +1,60 @@ # Checkpoint batching experiment +**The completed pilot is a negative performance result: interval 5 was slower than native interval 1 in all six pairs. Keep the native default.** All four controlled interruption/resume witnesses passed and every pair retained exactly the same posterior, likelihood count, ESS and shell count. This result does not justify promoting the optional full-snapshot policy as a speed improvement. + +The approved quiet-host attempt03 completed all 20 children in 931.93s (15 min 32 s), including preflight, within the 1800s budget. The slowest child took 88.91s against 120s; peak sampled process-group RSS was 493.1 MiB against 4096 MiB. No case failed, no retry occurred, and none remain unrun. The pre-launch wait took about 19 min 21 s and is recorded separately; final load readings were 0.9980, 0.7402, 0.5732. The in-run load guard remained 2.0. + +## Matched timing results + +Ratios below are candidate interval 5 / baseline interval 1; values above 1 mean slower. Three seeds per dimension, AB/BA/AB order, identical sampling/output settings. These are exploratory local measurements, not a statistical confidence estimate or a comparison with the historical phase0a settings. + +| Dimension | Seed | Sampler1 (s) | Sampler5 (s) | Ratio | Full fit1 (s) | Full fit5 (s) | Ratio | +|---:|---:|---:|---:|---:|---:|---:|---:| +| 5 | 0 | 26.77 | 33.65 | 1.257 | 32.25 | 37.53 | 1.164 | +| 5 | 1 | 22.41 | 28.44 | 1.269 | 26.41 | 32.14 | 1.217 | +| 5 | 2 | 26.08 | 33.72 | 1.293 | 30.24 | 38.07 | 1.259 | +| 10 | 0 | 50.60 | 72.85 | 1.440 | 57.96 | 81.27 | 1.402 | +| 10 | 1 | 44.03 | 53.38 | 1.212 | 53.43 | 61.75 | 1.156 | +| 10 | 2 | 42.52 | 63.26 | 1.488 | 48.45 | 71.05 | 1.466 | + +Sampler time rose 21.2–48.8% (median 28.1%); full fit time rose 15.6–46.6% (median 23.8%). `sampler.run` includes checkpoint publication and the candidate normal-return flush. Full fit time includes wrapper output except search corner plotting, disabled identically in both arms. Process times additionally include startup and receipt checks; all are retained in attempt03.json. + +## Why this policy costs more + +The native policy uses incremental shell updates. The candidate batches notifications but replaces each scheduled update with a complete atomic snapshot, including fsync. Measured checkpoint time rose 2.81–4.44x, and bytes passed to write syscalls during checkpoint calls rose 2.37–2.62x. Kernel write_bytes counts also rose. This supports full-snapshot persistence cost as the main explanation for the slowdown, rather than a changed sampling trajectory. It does not isolate serialization, fsync and replacement costs individually. + +| Dimension | Seed | Checkpoint1 (s) | Checkpoint5 (s) | Full writes1/5 | Write syscall bytes1/5 (MiB) | +|---:|---:|---:|---:|---:|---:| +| 5 | 0 | 3.09 | 8.67 | 10/42 | 40.46/97.84 | +| 5 | 1 | 2.38 | 7.89 | 10/42 | 41.39/98.10 | +| 5 | 2 | 3.07 | 9.10 | 10/42 | 40.76/97.90 | +| 10 | 0 | 4.68 | 20.76 | 12/55 | 88.25/211.84 | +| 10 | 1 | 4.10 | 14.41 | 12/57 | 90.97/223.53 | +| 10 | 2 | 4.07 | 18.07 | 13/58 | 91.48/239.62 | + +The counters record top-level persistence time without double-counting nested calls. `/proc/self/io` measures the sampler process during persistence calls; it is not a physical-device bandwidth measurement. Full-snapshot logical-byte sums exclude native incremental updates and must not be interpreted as total I/O. Instrumentation overhead is not subtracted; brief RSS spikes may be missed. No durability guarantee is made for power loss or network filesystems. + +## Recovery witnesses + +| Workers | Interrupted phase | Saved evaluations | Completed evaluations | Lost completed | In flight | Exact resumed control | +|---:|---|---:|---:|---:|---:|---| +| 1 | deferred | 4600 | 4800 | 200 | 0 | yes | +| 1 | atomic | 4600 | 5100 | 500 | 0 | yes | +| 2 | deferred | 4600 | 4800 | 200 | 0 | yes | +| 2 | atomic | 4600 | 5100 | 500 | 0 | yes | + +Every interrupted published file retained its recorded SHA256. Resume restored the saved count and finished with the exact uninterrupted control posterior/count/ESS. The controlled hooks had no likelihood work in flight; the 200/500 losses are observations at those hooks, not a universal bound on arbitrary interruption loss. Partial unpublished atomic-write files and all raw data are retained. + +## Provenance and validation + +Measured producer 5206f0b and library e16fba3ee. The harness is unchanged from the approved correction daf0cc6. See attempt03.json for complete source/package hashes, frozen settings, per-case metrics, exact parity and resource receipts; quiet_host_admission03.json records the pre-launch wait. Settings remain 400 live points, batch 100, ESS 10000, four default networks, discard_exploration=True, one timing worker and one numerical-library thread. + +Library validation remains 4302 passes / 2 skips / 1 expected upstream failure, 10 smoke cases, and exact-head Python 3.12/3.13/no-JAX CI 42867205132 plus Docs green. Harness validation remains 125 tooling tests with Ruff/catalogue gates. This update adds result data/documentation only. Author review, no independent review claimed. + +[Library PR](https://github.com/PyAutoLabs/PyAutoFit/pull/1765) · [Experiment PR](https://github.com/PyAutoLabs/autofit_profiling/pull/15). Outside Pulse; defaults unchanged; merge remains human. The experiment depends on unmerged diagnostic PR13 and the library-first merge gate. All three attempts/worktrees remain retained. This completes the approved bounded checkpoint experiment, not the wider phase 0b or 30D evidence-accuracy work. + +## Retained earlier attempts + The explicitly approved corrected attempt stopped at the host-load guard after one successful controlled interruption. Total elapsed time was 46.74s including preflight; the first child took 44.94s and peaked at 203.6 MiB sampled process-group RSS. All 19 remaining children, including the resume child and every timing comparison, are unrun. **There is still no checkpoint speedup measurement.** The saved checkpoint remained byte-identical to its recorded hash: 4,600 recoverable evaluations versus 4,800 completed, with 200 completed evaluations lost and zero in flight at this controlled hook. The uninterrupted control reached 16,300 evaluations and ESS 10,020.771588733165. Resume was not launched in this attempt; no crash/resume witness is fully completed by attempt02. @@ -18,7 +73,7 @@ The resumed computation reached the exact uninterrupted control result before th The harness now converts the restored count to a Python integer before JSON serialization (daf0cc6). Its regression reproduced the failure before the fix; all 125 tooling tests pass afterwards. A subsequent test-only correction keeps this regression compatible with the standard-library tooling CI environment; no sampler or measurement behavior changed. No automatic retry followed the stop. Both corrected code and stopped raw data are retained. -The opt-in library policy keeps interval1 native. Larger intervals publish full native snapshots atomically, retain native full-write points, and flush on normal return. Sampling settings, default behavior and identifiers are unchanged. This is protection against process interruption, not a guarantee for power loss or network filesystems. +The opt-in library policy keeps interval 1 native. Larger intervals publish full native snapshots atomically, retain native full-write points, and flush on normal return. Sampling settings, default behavior and identifiers are unchanged. This is protection against process interruption, not a guarantee for power loss or network filesystems. Measured library e16fba3ee; initial producer d108719. Complete frozen identities, settings, limits, status and unrun cases are in attempt01.json. The original matrix is four crash/resume witnesses followed by six paired D5/D10 seed comparisons; n_live400, n_batch100, n_eff10000, four default networks, discard_exploration=True. Limits are 20 children, 120s/4096MiB each, 1800s total including preflight. All four correctness witnesses must pass before timing comparisons. No further pilot is authorized by this report. diff --git a/experiments/nautilus_checkpoint_batching/attempt03.json b/experiments/nautilus_checkpoint_batching/attempt03.json new file mode 100644 index 0000000..80baaf3 --- /dev/null +++ b/experiments/nautilus_checkpoint_batching/attempt03.json @@ -0,0 +1,1329 @@ +{ + "status": "complete", + "spent_s": 931.9336872919994, + "preflight_s": 3.03248934200019, + "protocol": "nautilus-checkpoint-batching-experiment@1", + "limits": { + "timeout_s": 120, + "memory_mib": 4096, + "budget_s": 1800 + }, + "plan_sha256": "301f7f4e7f9175abc6370c94e1915ce7fb92cbd6b2c4ba6edf024fc1d5357cd0", + "measured_environment": { + "sources": { + "PyAutoFit": { + "revision": "e16fba3ee5682771b5fc6fcebede5051a8719723", + "code_sha256": "41cf1d28c0790cb4e41bc426b89bb6ad0264785b6149339021867dcab55ff225" + }, + "PyAutoNerves": { + "revision": "9b204c90c2ce05c5bb0cf3e9800ed13f005c6c56", + "code_sha256": "560c9250eb0d7f8f56b3d4d21f22b9e556e93fd0eba92b5b33860b903a2f3f0b" + }, + "producer": { + "revision": "5206f0bc210863ceaf125a5a93181789329ec8c2", + "code_sha256": "295cf76223b8678e79996d9e5e7fb8a4ed3970aa61e7d38af7c76189f91acf2c" + } + }, + "nautilus_source_sha256": "61e91f8fb85cf4a38877cd1c65bb0b111589bde77f5f74acb22a90f3ff2ec45c", + "packages": { + "numpy": "2.5.4", + "scipy": "1.17.1", + "scikit-learn": "1.9.1", + "h5py": "3.16.0", + "nautilus-sampler": "1.0.5", + "jax": "0.11.2", + "jaxlib": "0.11.2", + "threadpoolctl": "3.8.0" + }, + "distribution_versions": { + "autonerves": "9999.0.0.dev0", + "networkx": "3.1", + "jsonpickle": "4.1.4", + "dynesty": "2.1.5", + "array-api-compat": "1.16.0", + "pyparsing": "3.3.3", + "pillow": "13.0.0", + "psutil": "6.1.0", + "cycler": "0.12.1", + "emcee": "3.1.6", + "jaxlib": "0.11.2", + "pure_eval": "0.2.4", + "six": "1.17.0", + "imagesize": "2.0.1", + "mypy_extensions": "1.2.0", + "joblib": "1.6.0", + "snowballstemmer": "3.1.1", + "urllib3": "2.8.0", + "prompt_toolkit": "3.0.53", + "nautilus-sampler": "1.0.5", + "ml_dtypes": "0.6.0", + "autofit": "9999.0.0.dev0", + "Pygments": "2.21.0", + "babel": "2.18.0", + "pluggy": "1.7.0", + "MarkupSafe": "3.0.4", + "traitlets": "5.16.1", + "roman-numerals": "4.1.0", + "corner": "2.2.2", + "typing_extensions": "4.16.0", + "sphinxcontrib-devhelp": "2.0.0", + "dill": "0.4.1", + "asttokens": "3.0.2", + "sphinxcontrib-serializinghtml": "2.0.0", + "optax": "0.2.8", + "matplotlib-inline": "0.2.2", + "threadpoolctl": "3.8.0", + "ipython": "9.12.0", + "ruff": "0.17.4", + "Sphinx": "9.1.1", + "typing-inspect": "0.9.0", + "jedi": "0.20.1", + "certifi": "2026.10.23", + "wheel": "0.48.0", + "parso": "0.8.7", + "contourpy": "1.4.0", + "anesthetic": "2.16.0", + "alabaster": "1.0.0", + "pyvis": "0.3.2", + "charset-normalizer": "3.5.2", + "numpydoc": "1.11.0", + "gprof2dot": "2021.2.21", + "timeout-decorator": "0.5.0", + "absl-py": "2.5.1", + "ipython_pygments_lexers": "1.1.1", + "fonttools": "4.68.0", + "sphinxcontrib-qthelp": "2.0.0", + "PyYAML": "6.0.3", + "sphinxcontrib-applehelp": "2.0.0", + "iniconfig": "2.3.1", + "sphinxcontrib-jsmath": "2.0.0", + "executing": "2.3.0", + "numpy": "2.5.4", + "sphinxcontrib-htmlhelp": "2.1.0", + "decorator": "5.3.1", + "xxhash": "3.4.1", + "jax": "0.11.2", + "scipy": "1.17.1", + "Jinja2": "3.1.6", + "pandas": "3.0.6", + "stack-data": "0.6.3", + "kiwisolver": "1.5.1", + "python-dateutil": "4.0.0", + "packaging": "26.3", + "cloudpickle": "3.1.2", + "opt_einsum": "3.4.0", + "scikit-learn": "1.9.1", + "jaxnnls": "1.0.1", + "pexpect": "4.9.0", + "requests": "2.34.2", + "h5py": "3.16.0", + "ptyprocess": "0.7.0", + "greenlet": "3.5.6", + "docutils": "0.22.4", + "tzdata": "2026.6", + "wcwidth": "0.9.4", + "idna": "3.20", + "astunparse": "1.6.3", + "SQLAlchemy": "2.0.57", + "pytest": "9.2.0", + "narwhals": "2.28.0", + "matplotlib": "3.11.2" + }, + "python": "3.12.10 (main, Apr 9 2025, 08:55:05) [GCC 11.4.0]", + "host": "DESKTOP-H143S82", + "platform": "Linux-6.18.58.1-microsoft-standard-WSL2-x86_64-with-glibc2.35", + "affinity": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7 + ], + "thread_env": { + "OMP_NUM_THREADS": "1", + "OPENBLAS_NUM_THREADS": "1", + "MKL_NUM_THREADS": "1", + "NUMEXPR_NUM_THREADS": "1" + } + }, + "configurations_by_case": { + "workers-1-deferred-interrupt": { + "constructor": { + "n_dim": 5, + "n_live": 400, + "n_update": 400, + "n_points_min": 55, + "n_like_new_bound": 4000, + "enlarge_per_dim": 1.1, + "split_threshold": 100, + "n_networks": 4, + "n_batch": 100, + "vectorized": false, + "seed": 0 + }, + "stopping": { + "f_live": 0.01, + "n_shell": 1, + "n_eff": 10000, + "discard_exploration": true, + "verbose": false + }, + "pool": { + "likelihood_workers": 0, + "sampler_workers": 0, + "start_method": null + }, + "checkpoint": true, + "update_interval": 1000000, + "cost_profile": "none", + "work": 0 + }, + "workers-1-deferred-resume": { + "constructor": { + "n_dim": 5, + "n_live": 400, + "n_update": 400, + "n_points_min": 55, + "n_like_new_bound": 4000, + "enlarge_per_dim": 1.1, + "split_threshold": 100, + "n_networks": 4, + "n_batch": 100, + "vectorized": false, + "seed": 0 + }, + "stopping": { + "f_live": 0.01, + "n_shell": 1, + "n_eff": 10000, + "discard_exploration": true, + "verbose": false + }, + "pool": { + "likelihood_workers": 0, + "sampler_workers": 0, + "start_method": null + }, + "checkpoint": true, + "update_interval": 1000000, + "cost_profile": "none", + "work": 0 + }, + "workers-1-atomic-interrupt": { + "constructor": { + "n_dim": 5, + "n_live": 400, + "n_update": 400, + "n_points_min": 55, + "n_like_new_bound": 4000, + "enlarge_per_dim": 1.1, + "split_threshold": 100, + "n_networks": 4, + "n_batch": 100, + "vectorized": false, + "seed": 0 + }, + "stopping": { + "f_live": 0.01, + "n_shell": 1, + "n_eff": 10000, + "discard_exploration": true, + "verbose": false + }, + "pool": { + "likelihood_workers": 0, + "sampler_workers": 0, + "start_method": null + }, + "checkpoint": true, + "update_interval": 1000000, + "cost_profile": "none", + "work": 0 + }, + "workers-1-atomic-resume": { + "constructor": { + "n_dim": 5, + "n_live": 400, + "n_update": 400, + "n_points_min": 55, + "n_like_new_bound": 4000, + "enlarge_per_dim": 1.1, + "split_threshold": 100, + "n_networks": 4, + "n_batch": 100, + "vectorized": false, + "seed": 0 + }, + "stopping": { + "f_live": 0.01, + "n_shell": 1, + "n_eff": 10000, + "discard_exploration": true, + "verbose": false + }, + "pool": { + "likelihood_workers": 0, + "sampler_workers": 0, + "start_method": null + }, + "checkpoint": true, + "update_interval": 1000000, + "cost_profile": "none", + "work": 0 + }, + "workers-2-deferred-interrupt": { + "constructor": { + "n_dim": 5, + "n_live": 400, + "n_update": 400, + "n_points_min": 55, + "n_like_new_bound": 4000, + "enlarge_per_dim": 1.1, + "split_threshold": 100, + "n_networks": 4, + "n_batch": 100, + "vectorized": false, + "seed": 0 + }, + "stopping": { + "f_live": 0.01, + "n_shell": 1, + "n_eff": 10000, + "discard_exploration": true, + "verbose": false + }, + "pool": { + "likelihood_workers": 2, + "sampler_workers": 0, + "start_method": "fork" + }, + "checkpoint": true, + "update_interval": 1000000, + "cost_profile": "none", + "work": 0 + }, + "workers-2-deferred-resume": { + "constructor": { + "n_dim": 5, + "n_live": 400, + "n_update": 400, + "n_points_min": 55, + "n_like_new_bound": 4000, + "enlarge_per_dim": 1.1, + "split_threshold": 100, + "n_networks": 4, + "n_batch": 100, + "vectorized": false, + "seed": 0 + }, + "stopping": { + "f_live": 0.01, + "n_shell": 1, + "n_eff": 10000, + "discard_exploration": true, + "verbose": false + }, + "pool": { + "likelihood_workers": 2, + "sampler_workers": 0, + "start_method": "fork" + }, + "checkpoint": true, + "update_interval": 1000000, + "cost_profile": "none", + "work": 0 + }, + "workers-2-atomic-interrupt": { + "constructor": { + "n_dim": 5, + "n_live": 400, + "n_update": 400, + "n_points_min": 55, + "n_like_new_bound": 4000, + "enlarge_per_dim": 1.1, + "split_threshold": 100, + "n_networks": 4, + "n_batch": 100, + "vectorized": false, + "seed": 0 + }, + "stopping": { + "f_live": 0.01, + "n_shell": 1, + "n_eff": 10000, + "discard_exploration": true, + "verbose": false + }, + "pool": { + "likelihood_workers": 2, + "sampler_workers": 0, + "start_method": "fork" + }, + "checkpoint": true, + "update_interval": 1000000, + "cost_profile": "none", + "work": 0 + }, + "workers-2-atomic-resume": { + "constructor": { + "n_dim": 5, + "n_live": 400, + "n_update": 400, + "n_points_min": 55, + "n_like_new_bound": 4000, + "enlarge_per_dim": 1.1, + "split_threshold": 100, + "n_networks": 4, + "n_batch": 100, + "vectorized": false, + "seed": 0 + }, + "stopping": { + "f_live": 0.01, + "n_shell": 1, + "n_eff": 10000, + "discard_exploration": true, + "verbose": false + }, + "pool": { + "likelihood_workers": 2, + "sampler_workers": 0, + "start_method": "fork" + }, + "checkpoint": true, + "update_interval": 1000000, + "cost_profile": "none", + "work": 0 + }, + "d5-s0-i1": { + "constructor": { + "n_dim": 5, + "n_live": 400, + "n_update": 400, + "n_points_min": 55, + "n_like_new_bound": 4000, + "enlarge_per_dim": 1.1, + "split_threshold": 100, + "n_networks": 4, + "n_batch": 100, + "vectorized": false, + "seed": 0 + }, + "stopping": { + "f_live": 0.01, + "n_shell": 1, + "n_eff": 10000, + "discard_exploration": true, + "verbose": false + }, + "pool": { + "likelihood_workers": 0, + "sampler_workers": 0, + "start_method": null + }, + "checkpoint": true, + "update_interval": 1000000, + "cost_profile": "none", + "work": 0 + }, + "d5-s0-i5": { + "constructor": { + "n_dim": 5, + "n_live": 400, + "n_update": 400, + "n_points_min": 55, + "n_like_new_bound": 4000, + "enlarge_per_dim": 1.1, + "split_threshold": 100, + "n_networks": 4, + "n_batch": 100, + "vectorized": false, + "seed": 0 + }, + "stopping": { + "f_live": 0.01, + "n_shell": 1, + "n_eff": 10000, + "discard_exploration": true, + "verbose": false + }, + "pool": { + "likelihood_workers": 0, + "sampler_workers": 0, + "start_method": null + }, + "checkpoint": true, + "update_interval": 1000000, + "cost_profile": "none", + "work": 0 + }, + "d5-s1-i5": { + "constructor": { + "n_dim": 5, + "n_live": 400, + "n_update": 400, + "n_points_min": 55, + "n_like_new_bound": 4000, + "enlarge_per_dim": 1.1, + "split_threshold": 100, + "n_networks": 4, + "n_batch": 100, + "vectorized": false, + "seed": 1 + }, + "stopping": { + "f_live": 0.01, + "n_shell": 1, + "n_eff": 10000, + "discard_exploration": true, + "verbose": false + }, + "pool": { + "likelihood_workers": 0, + "sampler_workers": 0, + "start_method": null + }, + "checkpoint": true, + "update_interval": 1000000, + "cost_profile": "none", + "work": 0 + }, + "d5-s1-i1": { + "constructor": { + "n_dim": 5, + "n_live": 400, + "n_update": 400, + "n_points_min": 55, + "n_like_new_bound": 4000, + "enlarge_per_dim": 1.1, + "split_threshold": 100, + "n_networks": 4, + "n_batch": 100, + "vectorized": false, + "seed": 1 + }, + "stopping": { + "f_live": 0.01, + "n_shell": 1, + "n_eff": 10000, + "discard_exploration": true, + "verbose": false + }, + "pool": { + "likelihood_workers": 0, + "sampler_workers": 0, + "start_method": null + }, + "checkpoint": true, + "update_interval": 1000000, + "cost_profile": "none", + "work": 0 + }, + "d5-s2-i1": { + "constructor": { + "n_dim": 5, + "n_live": 400, + "n_update": 400, + "n_points_min": 55, + "n_like_new_bound": 4000, + "enlarge_per_dim": 1.1, + "split_threshold": 100, + "n_networks": 4, + "n_batch": 100, + "vectorized": false, + "seed": 2 + }, + "stopping": { + "f_live": 0.01, + "n_shell": 1, + "n_eff": 10000, + "discard_exploration": true, + "verbose": false + }, + "pool": { + "likelihood_workers": 0, + "sampler_workers": 0, + "start_method": null + }, + "checkpoint": true, + "update_interval": 1000000, + "cost_profile": "none", + "work": 0 + }, + "d5-s2-i5": { + "constructor": { + "n_dim": 5, + "n_live": 400, + "n_update": 400, + "n_points_min": 55, + "n_like_new_bound": 4000, + "enlarge_per_dim": 1.1, + "split_threshold": 100, + "n_networks": 4, + "n_batch": 100, + "vectorized": false, + "seed": 2 + }, + "stopping": { + "f_live": 0.01, + "n_shell": 1, + "n_eff": 10000, + "discard_exploration": true, + "verbose": false + }, + "pool": { + "likelihood_workers": 0, + "sampler_workers": 0, + "start_method": null + }, + "checkpoint": true, + "update_interval": 1000000, + "cost_profile": "none", + "work": 0 + }, + "d10-s0-i1": { + "constructor": { + "n_dim": 10, + "n_live": 400, + "n_update": 400, + "n_points_min": 60, + "n_like_new_bound": 4000, + "enlarge_per_dim": 1.1, + "split_threshold": 100, + "n_networks": 4, + "n_batch": 100, + "vectorized": false, + "seed": 0 + }, + "stopping": { + "f_live": 0.01, + "n_shell": 1, + "n_eff": 10000, + "discard_exploration": true, + "verbose": false + }, + "pool": { + "likelihood_workers": 0, + "sampler_workers": 0, + "start_method": null + }, + "checkpoint": true, + "update_interval": 1000000, + "cost_profile": "none", + "work": 0 + }, + "d10-s0-i5": { + "constructor": { + "n_dim": 10, + "n_live": 400, + "n_update": 400, + "n_points_min": 60, + "n_like_new_bound": 4000, + "enlarge_per_dim": 1.1, + "split_threshold": 100, + "n_networks": 4, + "n_batch": 100, + "vectorized": false, + "seed": 0 + }, + "stopping": { + "f_live": 0.01, + "n_shell": 1, + "n_eff": 10000, + "discard_exploration": true, + "verbose": false + }, + "pool": { + "likelihood_workers": 0, + "sampler_workers": 0, + "start_method": null + }, + "checkpoint": true, + "update_interval": 1000000, + "cost_profile": "none", + "work": 0 + }, + "d10-s1-i5": { + "constructor": { + "n_dim": 10, + "n_live": 400, + "n_update": 400, + "n_points_min": 60, + "n_like_new_bound": 4000, + "enlarge_per_dim": 1.1, + "split_threshold": 100, + "n_networks": 4, + "n_batch": 100, + "vectorized": false, + "seed": 1 + }, + "stopping": { + "f_live": 0.01, + "n_shell": 1, + "n_eff": 10000, + "discard_exploration": true, + "verbose": false + }, + "pool": { + "likelihood_workers": 0, + "sampler_workers": 0, + "start_method": null + }, + "checkpoint": true, + "update_interval": 1000000, + "cost_profile": "none", + "work": 0 + }, + "d10-s1-i1": { + "constructor": { + "n_dim": 10, + "n_live": 400, + "n_update": 400, + "n_points_min": 60, + "n_like_new_bound": 4000, + "enlarge_per_dim": 1.1, + "split_threshold": 100, + "n_networks": 4, + "n_batch": 100, + "vectorized": false, + "seed": 1 + }, + "stopping": { + "f_live": 0.01, + "n_shell": 1, + "n_eff": 10000, + "discard_exploration": true, + "verbose": false + }, + "pool": { + "likelihood_workers": 0, + "sampler_workers": 0, + "start_method": null + }, + "checkpoint": true, + "update_interval": 1000000, + "cost_profile": "none", + "work": 0 + }, + "d10-s2-i1": { + "constructor": { + "n_dim": 10, + "n_live": 400, + "n_update": 400, + "n_points_min": 60, + "n_like_new_bound": 4000, + "enlarge_per_dim": 1.1, + "split_threshold": 100, + "n_networks": 4, + "n_batch": 100, + "vectorized": false, + "seed": 2 + }, + "stopping": { + "f_live": 0.01, + "n_shell": 1, + "n_eff": 10000, + "discard_exploration": true, + "verbose": false + }, + "pool": { + "likelihood_workers": 0, + "sampler_workers": 0, + "start_method": null + }, + "checkpoint": true, + "update_interval": 1000000, + "cost_profile": "none", + "work": 0 + }, + "d10-s2-i5": { + "constructor": { + "n_dim": 10, + "n_live": 400, + "n_update": 400, + "n_points_min": 60, + "n_like_new_bound": 4000, + "enlarge_per_dim": 1.1, + "split_threshold": 100, + "n_networks": 4, + "n_batch": 100, + "vectorized": false, + "seed": 2 + }, + "stopping": { + "f_live": 0.01, + "n_shell": 1, + "n_eff": 10000, + "discard_exploration": true, + "verbose": false + }, + "pool": { + "likelihood_workers": 0, + "sampler_workers": 0, + "start_method": null + }, + "checkpoint": true, + "update_interval": 1000000, + "cost_profile": "none", + "work": 0 + } + }, + "quiet_host_admission": { + "wait_s": 1160.5565023422241, + "final_readings": [ + { + "time": 1794334497.6134791, + "load": [ + 0.998046875, + 2.697265625, + 2.458984375 + ], + "available_mib": 13504.2421875, + "quiet": true, + "consecutive": 1 + }, + { + "time": 1794334530.7239408, + "load": [ + 0.740234375, + 2.47021484375, + 2.39013671875 + ], + "available_mib": 13511.36328125, + "quiet": true, + "consecutive": 2 + }, + { + "time": 1794334563.7968533, + "load": [ + 0.5732421875, + 2.2646484375, + 2.3232421875 + ], + "available_mib": 13519.87890625, + "quiet": true, + "consecutive": 3 + } + ], + "outside_timed_run_budget": true + }, + "witnesses": [ + { + "workers": 1, + "mode": "deferred", + "control_equal": true, + "published_checkpoint_sha256": "781920a4ac74a77b430d4715b51d10c1cbbaab13eab480a8f33d8d2a00051d9c", + "recoverable_n_like": 4600, + "completed_n_like": 4800, + "lost_completed_evaluations": 200, + "in_flight_evaluations": 0, + "control": { + "posterior_sha256": "9181de303adef000c517ae25c3ea644115a44d5e8b0e764275aeb65f850a0cc1", + "n_like": 16300, + "n_eff": 10020.771588733165, + "shells": 9 + }, + "interruption_s": 88.911067301, + "resume_s": 18.033607740999287 + }, + { + "workers": 1, + "mode": "atomic", + "control_equal": true, + "published_checkpoint_sha256": "781920a4ac74a77b430d4715b51d10c1cbbaab13eab480a8f33d8d2a00051d9c", + "recoverable_n_like": 4600, + "completed_n_like": 5100, + "lost_completed_evaluations": 500, + "in_flight_evaluations": 0, + "control": { + "posterior_sha256": "9181de303adef000c517ae25c3ea644115a44d5e8b0e764275aeb65f850a0cc1", + "n_like": 16300, + "n_eff": 10020.771588733165, + "shells": 9 + }, + "interruption_s": 49.12231747500118, + "resume_s": 11.792528302998107 + }, + { + "workers": 2, + "mode": "deferred", + "control_equal": true, + "published_checkpoint_sha256": "781920a4ac74a77b430d4715b51d10c1cbbaab13eab480a8f33d8d2a00051d9c", + "recoverable_n_like": 4600, + "completed_n_like": 4800, + "lost_completed_evaluations": 200, + "in_flight_evaluations": 0, + "control": { + "posterior_sha256": "9181de303adef000c517ae25c3ea644115a44d5e8b0e764275aeb65f850a0cc1", + "n_like": 16300, + "n_eff": 10020.771588733165, + "shells": 9 + }, + "interruption_s": 47.41867657400144, + "resume_s": 14.869110400999489 + }, + { + "workers": 2, + "mode": "atomic", + "control_equal": true, + "published_checkpoint_sha256": "781920a4ac74a77b430d4715b51d10c1cbbaab13eab480a8f33d8d2a00051d9c", + "recoverable_n_like": 4600, + "completed_n_like": 5100, + "lost_completed_evaluations": 500, + "in_flight_evaluations": 0, + "control": { + "posterior_sha256": "9181de303adef000c517ae25c3ea644115a44d5e8b0e764275aeb65f850a0cc1", + "n_like": 16300, + "n_eff": 10020.771588733165, + "shells": 9 + }, + "interruption_s": 51.9719381060022, + "resume_s": 14.261566680001124 + } + ], + "performance_rows": [ + { + "case": "d5-s0-i1", + "dimension": 5, + "seed": 0, + "interval": 1, + "process_s": 37.101403128999664, + "peak_rss_mib": 214.19140625, + "launch_load_1min": 1.443359375, + "posterior_sha256": "9181de303adef000c517ae25c3ea644115a44d5e8b0e764275aeb65f850a0cc1", + "n_like": 16300, + "n_eff": 10020.771588733165, + "shells": 9, + "metrics": { + "sampler_run_s": 26.76562087899947, + "checkpoint_s": 3.0883535830216715, + "full_writes": 10, + "shell_notifications": 163, + "io": { + "wchar": 42421733, + "syscw": 10056, + "write_bytes": 17920000 + }, + "full_fit_s": 32.248333939001895 + }, + "target_sha256": "c526878b0ffa7439d9f297ac8b6b262153442e7924c00bebc63572490881050f", + "plot_policy": "no search corner in either arm; all other fit output retained", + "full_snapshot_logical_bytes": 15850057 + }, + { + "case": "d5-s0-i5", + "dimension": 5, + "seed": 0, + "interval": 5, + "process_s": 41.96918235599878, + "peak_rss_mib": 213.7578125, + "launch_load_1min": 1.57177734375, + "posterior_sha256": "9181de303adef000c517ae25c3ea644115a44d5e8b0e764275aeb65f850a0cc1", + "n_like": 16300, + "n_eff": 10020.771588733165, + "shells": 9, + "metrics": { + "sampler_run_s": 33.64581317599732, + "checkpoint_s": 8.673607703050948, + "full_writes": 42, + "shell_notifications": 163, + "io": { + "wchar": 102597467, + "syscw": 19505, + "write_bytes": 102711296 + }, + "full_fit_s": 37.529057408999506 + }, + "target_sha256": "c526878b0ffa7439d9f297ac8b6b262153442e7924c00bebc63572490881050f", + "plot_policy": "no search corner in either arm; all other fit output retained", + "full_snapshot_logical_bytes": 102622358 + }, + { + "case": "d5-s1-i5", + "dimension": 5, + "seed": 1, + "interval": 5, + "process_s": 36.3312923659978, + "peak_rss_mib": 214.47265625, + "launch_load_1min": 1.5439453125, + "posterior_sha256": "a96199178a9d779dbf29f0819de449d32f4ec8eda561f5f5b20e8a74b0ee9877", + "n_like": 16700, + "n_eff": 10083.284245938954, + "shells": 9, + "metrics": { + "sampler_run_s": 28.43888404700192, + "checkpoint_s": 7.894480255981762, + "full_writes": 42, + "shell_notifications": 167, + "io": { + "wchar": 102866470, + "syscw": 19508, + "write_bytes": 102981632 + }, + "full_fit_s": 32.140344314000686 + }, + "target_sha256": "c526878b0ffa7439d9f297ac8b6b262153442e7924c00bebc63572490881050f", + "plot_policy": "no search corner in either arm; all other fit output retained", + "full_snapshot_logical_bytes": 102891174 + }, + { + "case": "d5-s1-i1", + "dimension": 5, + "seed": 1, + "interval": 1, + "process_s": 30.467697766998754, + "peak_rss_mib": 214.0859375, + "launch_load_1min": 1.43115234375, + "posterior_sha256": "a96199178a9d779dbf29f0819de449d32f4ec8eda561f5f5b20e8a74b0ee9877", + "n_like": 16700, + "n_eff": 10083.284245938954, + "shells": 9, + "metrics": { + "sampler_run_s": 22.41212144799647, + "checkpoint_s": 2.3812735630126554, + "full_writes": 10, + "shell_notifications": 167, + "io": { + "wchar": 43401157, + "syscw": 10291, + "write_bytes": 17960960 + }, + "full_fit_s": 26.407690707001166 + }, + "target_sha256": "c526878b0ffa7439d9f297ac8b6b262153442e7924c00bebc63572490881050f", + "plot_policy": "no search corner in either arm; all other fit output retained", + "full_snapshot_logical_bytes": 15836696 + }, + { + "case": "d5-s2-i1", + "dimension": 5, + "seed": 2, + "interval": 1, + "process_s": 34.434604853002384, + "peak_rss_mib": 416.546875, + "launch_load_1min": 1.4609375, + "posterior_sha256": "f012d399d72c952c960af689645f0c312733589c52059baafe140b9f367ec4c3", + "n_like": 16300, + "n_eff": 10000.148843421219, + "shells": 9, + "metrics": { + "sampler_run_s": 26.083317742999498, + "checkpoint_s": 3.0677189900015946, + "full_writes": 10, + "shell_notifications": 163, + "io": { + "wchar": 42744509, + "syscw": 10098, + "write_bytes": 17846272 + }, + "full_fit_s": 30.238601156001096 + }, + "target_sha256": "c526878b0ffa7439d9f297ac8b6b262153442e7924c00bebc63572490881050f", + "plot_policy": "no search corner in either arm; all other fit output retained", + "full_snapshot_logical_bytes": 15798703 + }, + { + "case": "d5-s2-i5", + "dimension": 5, + "seed": 2, + "interval": 5, + "process_s": 42.93846188599855, + "peak_rss_mib": 367.5546875, + "launch_load_1min": 1.4619140625, + "posterior_sha256": "f012d399d72c952c960af689645f0c312733589c52059baafe140b9f367ec4c3", + "n_like": 16300, + "n_eff": 10000.148843421219, + "shells": 9, + "metrics": { + "sampler_run_s": 33.722452435999, + "checkpoint_s": 9.101755040985154, + "full_writes": 42, + "shell_notifications": 163, + "io": { + "wchar": 102660100, + "syscw": 19543, + "write_bytes": 102776832 + }, + "full_fit_s": 38.06922518599822 + }, + "target_sha256": "c526878b0ffa7439d9f297ac8b6b262153442e7924c00bebc63572490881050f", + "plot_policy": "no search corner in either arm; all other fit output retained", + "full_snapshot_logical_bytes": 102686332 + }, + { + "case": "d10-s0-i1", + "dimension": 10, + "seed": 0, + "interval": 1, + "process_s": 63.01607837600022, + "peak_rss_mib": 231.4453125, + "launch_load_1min": 1.5673828125, + "posterior_sha256": "1e3d9ba94bf8f1564c38d932b13e4137484eb1b888165647f4bf5d6ae3094f94", + "n_like": 22900, + "n_eff": 10062.151104930388, + "shells": 11, + "metrics": { + "sampler_run_s": 50.598070837000705, + "checkpoint_s": 4.683620424035325, + "full_writes": 12, + "shell_notifications": 229, + "io": { + "wchar": 92531902, + "syscw": 16744, + "write_bytes": 32849920 + }, + "full_fit_s": 57.963578779003 + }, + "target_sha256": "0d3acd490083192a9dea3d23c546dc4114299155ccd03d3439d08e446bbc4745", + "plot_policy": "no search corner in either arm; all other fit output retained", + "full_snapshot_logical_bytes": 28611073 + }, + { + "case": "d10-s0-i5", + "dimension": 10, + "seed": 0, + "interval": 5, + "process_s": 86.17588679000255, + "peak_rss_mib": 230.3828125, + "launch_load_1min": 1.5908203125, + "posterior_sha256": "1e3d9ba94bf8f1564c38d932b13e4137484eb1b888165647f4bf5d6ae3094f94", + "n_like": 22900, + "n_eff": 10062.151104930388, + "shells": 11, + "metrics": { + "sampler_run_s": 72.8470639929983, + "checkpoint_s": 20.756806773995777, + "full_writes": 55, + "shell_notifications": 229, + "io": { + "wchar": 222126446, + "syscw": 36757, + "write_bytes": 222388224 + }, + "full_fit_s": 81.27032139600124 + }, + "target_sha256": "0d3acd490083192a9dea3d23c546dc4114299155ccd03d3439d08e446bbc4745", + "plot_policy": "no search corner in either arm; all other fit output retained", + "full_snapshot_logical_bytes": 222261654 + }, + { + "case": "d10-s1-i5", + "dimension": 10, + "seed": 1, + "interval": 5, + "process_s": 67.3046190419991, + "peak_rss_mib": 232.23828125, + "launch_load_1min": 1.57373046875, + "posterior_sha256": "32148efa08d41c580c7fcca4624614644e7dc9c96aecb567cb1ae461c08a5ba6", + "n_like": 23700, + "n_eff": 10020.345549791828, + "shells": 11, + "metrics": { + "sampler_run_s": 53.37728262000019, + "checkpoint_s": 14.407655711023835, + "full_writes": 57, + "shell_notifications": 237, + "io": { + "wchar": 234392222, + "syscw": 38531, + "write_bytes": 234643456 + }, + "full_fit_s": 61.74922684200283 + }, + "target_sha256": "0d3acd490083192a9dea3d23c546dc4114299155ccd03d3439d08e446bbc4745", + "plot_policy": "no search corner in either arm; all other fit output retained", + "full_snapshot_logical_bytes": 234533422 + }, + { + "case": "d10-s1-i1", + "dimension": 10, + "seed": 1, + "interval": 1, + "process_s": 59.22122754999873, + "peak_rss_mib": 231.4609375, + "launch_load_1min": 1.4970703125, + "posterior_sha256": "32148efa08d41c580c7fcca4624614644e7dc9c96aecb567cb1ae461c08a5ba6", + "n_like": 23700, + "n_eff": 10020.345549791828, + "shells": 11, + "metrics": { + "sampler_run_s": 44.02931030800028, + "checkpoint_s": 4.097840482038009, + "full_writes": 12, + "shell_notifications": 237, + "io": { + "wchar": 95386625, + "syscw": 17162, + "write_bytes": 33447936 + }, + "full_fit_s": 53.43102769699908 + }, + "target_sha256": "0d3acd490083192a9dea3d23c546dc4114299155ccd03d3439d08e446bbc4745", + "plot_policy": "no search corner in either arm; all other fit output retained", + "full_snapshot_logical_bytes": 29089333 + }, + { + "case": "d10-s2-i1", + "dimension": 10, + "seed": 2, + "interval": 1, + "process_s": 53.26094270699832, + "peak_rss_mib": 368.0234375, + "launch_load_1min": 1.52490234375, + "posterior_sha256": "919674e04195da25f5d6646743b2ce8aa0089fc5642e7cda523dd72991eae260", + "n_like": 23500, + "n_eff": 10038.507608002912, + "shells": 12, + "metrics": { + "sampler_run_s": 42.52218294500199, + "checkpoint_s": 4.071536216972163, + "full_writes": 13, + "shell_notifications": 235, + "io": { + "wchar": 95925165, + "syscw": 18500, + "write_bytes": 37699584 + }, + "full_fit_s": 48.452827353998146 + }, + "target_sha256": "0d3acd490083192a9dea3d23c546dc4114299155ccd03d3439d08e446bbc4745", + "plot_policy": "no search corner in either arm; all other fit output retained", + "full_snapshot_logical_bytes": 33148179 + }, + { + "case": "d10-s2-i5", + "dimension": 10, + "seed": 2, + "interval": 5, + "process_s": 75.66775179199976, + "peak_rss_mib": 231.97265625, + "launch_load_1min": 1.38671875, + "posterior_sha256": "919674e04195da25f5d6646743b2ce8aa0089fc5642e7cda523dd72991eae260", + "n_like": 23500, + "n_eff": 10038.507608002912, + "shells": 12, + "metrics": { + "sampler_run_s": 63.26496671999848, + "checkpoint_s": 18.07453248699312, + "full_writes": 58, + "shell_notifications": 235, + "io": { + "wchar": 251257030, + "syscw": 41545, + "write_bytes": 251506688 + }, + "full_fit_s": 71.04917575400032 + }, + "target_sha256": "0d3acd490083192a9dea3d23c546dc4114299155ccd03d3439d08e446bbc4745", + "plot_policy": "no search corner in either arm; all other fit output retained", + "full_snapshot_logical_bytes": 251392814 + } + ], + "pairs": [ + { + "dimension": 5, + "seed": 0, + "exact_parity": true, + "sampler_slowdown": 1.2570533419755678, + "full_fit_slowdown": 1.1637518229619601, + "process_slowdown": 1.1312020251653045, + "checkpoint_time_ratio": 2.8084892062665365, + "io_wchar_ratio": 2.4185119217076774, + "io_write_bytes_ratio": 5.731657142857143 + }, + { + "dimension": 5, + "seed": 1, + "exact_parity": true, + "sampler_slowdown": 1.2689063867956245, + "full_fit_slowdown": 1.21708273058044, + "process_slowdown": 1.1924528280358033, + "checkpoint_time_ratio": 3.315234494097395, + "io_wchar_ratio": 2.3701319759747417, + "io_write_bytes_ratio": 5.733637400228051 + }, + { + "dimension": 5, + "seed": 2, + "exact_parity": true, + "sampler_slowdown": 1.2928743485881804, + "full_fit_slowdown": 1.2589611863855374, + "process_slowdown": 1.246956718954616, + "checkpoint_time_ratio": 2.9669454961976234, + "io_wchar_ratio": 2.401714334816666, + "io_write_bytes_ratio": 5.7590084920817075 + }, + { + "dimension": 10, + "seed": 0, + "exact_parity": true, + "sampler_slowdown": 1.4397201867176255, + "full_fit_slowdown": 1.4020928850142182, + "process_slowdown": 1.367522210376436, + "checkpoint_time_ratio": 4.431786715139498, + "io_wchar_ratio": 2.400539070298155, + "io_write_bytes_ratio": 6.769825436408977 + }, + { + "dimension": 10, + "seed": 1, + "exact_parity": true, + "sampler_slowdown": 1.2123124856284964, + "full_fit_slowdown": 1.1556810621756193, + "process_slowdown": 1.136494831775917, + "checkpoint_time_ratio": 3.5159142417028324, + "io_wchar_ratio": 2.457286039840491, + "io_write_bytes_ratio": 7.015184913054127 + }, + { + "dimension": 10, + "seed": 2, + "exact_parity": true, + "sampler_slowdown": 1.4878108868922635, + "full_fit_slowdown": 1.4663576850719653, + "process_slowdown": 1.4206986948816671, + "checkpoint_time_ratio": 4.4392414862109275, + "io_wchar_ratio": 2.619302557363336, + "io_write_bytes_ratio": 6.671338548457192 + } + ], + "paired_ratios": { + "sampler_slowdown": { + "median": 1.2808903676919026, + "minimum": 1.2123124856284964, + "maximum": 1.4878108868922635 + }, + "full_fit_slowdown": { + "median": 1.2380219584829888, + "minimum": 1.1556810621756193, + "maximum": 1.4663576850719653 + }, + "process_slowdown": { + "median": 1.2197047734952098, + "minimum": 1.1312020251653045, + "maximum": 1.4206986948816671 + }, + "checkpoint_time_ratio": { + "median": 3.4155743679001134, + "minimum": 2.8084892062665365, + "maximum": 4.4392414862109275 + }, + "io_wchar_ratio": { + "median": 2.4101131282621715, + "minimum": 2.3701319759747417, + "maximum": 2.619302557363336 + }, + "io_write_bytes_ratio": { + "median": 6.21517352026945, + "minimum": 5.731657142857143, + "maximum": 7.015184913054127 + } + }, + "maximum_process_s": 88.911067301, + "maximum_sampled_group_rss_mib": 493.14453125, + "unrun": [], + "decision": "Negative performance result: retain native interval1 default; do not promote full-snapshot batching as a speed improvement." +} diff --git a/experiments/nautilus_checkpoint_batching/quiet_host_admission03.json b/experiments/nautilus_checkpoint_batching/quiet_host_admission03.json new file mode 100644 index 0000000..95fd41f --- /dev/null +++ b/experiments/nautilus_checkpoint_batching/quiet_host_admission03.json @@ -0,0 +1,397 @@ +[ + { + "time": 1794333403.240351, + "load": [ + 1.220703125, + 1.6181640625, + 1.53125 + ], + "available_mib": 12809.7890625, + "quiet": false + }, + { + "time": 1794333447.9648497, + "load": [ + 0.93017578125, + 1.4921875, + 1.49267578125 + ], + "available_mib": 12882.28125, + "quiet": true, + "consecutive": 1 + }, + { + "time": 1794333480.8256488, + "load": [ + 1.10546875, + 1.46435546875, + 1.48095703125 + ], + "available_mib": 12786.671875, + "quiet": false, + "consecutive": 0 + }, + { + "time": 1794333513.7334392, + "load": [ + 3.3759765625, + 1.96728515625, + 1.6474609375 + ], + "available_mib": 12896.23046875, + "quiet": false, + "consecutive": 0 + }, + { + "time": 1794333546.715094, + "load": [ + 2.8603515625, + 1.9853515625, + 1.66357421875 + ], + "available_mib": 12756.98828125, + "quiet": false, + "consecutive": 0 + }, + { + "time": 1794333579.623229, + "load": [ + 2.3037109375, + 1.93798828125, + 1.6572265625 + ], + "available_mib": 13262.3203125, + "quiet": false, + "consecutive": 0 + }, + { + "time": 1794333612.6192808, + "load": [ + 2.248046875, + 1.9599609375, + 1.6728515625 + ], + "available_mib": 13139.12890625, + "quiet": false, + "consecutive": 0 + }, + { + "time": 1794333645.264524, + "load": [ + 1.89306640625, + 1.8994140625, + 1.6611328125 + ], + "available_mib": 13210.2265625, + "quiet": false, + "consecutive": 0 + }, + { + "time": 1794333675.2924, + "load": [ + 3.45068359375, + 2.26416015625, + 1.78955078125 + ], + "available_mib": 13078.41015625, + "quiet": false, + "consecutive": 0 + }, + { + "time": 1794333708.2559392, + "load": [ + 3.34814453125, + 2.32421875, + 1.8232421875 + ], + "available_mib": 11743.5, + "quiet": false, + "consecutive": 0 + }, + { + "time": 1794333741.0944166, + "load": [ + 2.63916015625, + 2.25830078125, + 1.8173828125 + ], + "available_mib": 11932.0390625, + "quiet": false, + "consecutive": 0 + }, + { + "time": 1794333773.9227493, + "load": [ + 1.83935546875, + 2.091796875, + 1.775390625 + ], + "available_mib": 11943.15625, + "quiet": false, + "consecutive": 0 + }, + { + "time": 1794333806.8058777, + "load": [ + 1.32373046875, + 1.93896484375, + 1.7333984375 + ], + "available_mib": 11850.640625, + "quiet": false, + "consecutive": 0 + }, + { + "time": 1794333839.7216594, + "load": [ + 1.2216796875, + 1.8505859375, + 1.71044921875 + ], + "available_mib": 13112.84765625, + "quiet": false, + "consecutive": 0 + }, + { + "time": 1794333872.598483, + "load": [ + 1.5712890625, + 1.86767578125, + 1.720703125 + ], + "available_mib": 10967.26953125, + "quiet": false, + "consecutive": 0 + }, + { + "time": 1794333905.4742057, + "load": [ + 3.16552734375, + 2.23095703125, + 1.84765625 + ], + "available_mib": 10771.17578125, + "quiet": false, + "consecutive": 0 + }, + { + "time": 1794333938.3031125, + "load": [ + 3.0302734375, + 2.28857421875, + 1.8798828125 + ], + "available_mib": 11391.109375, + "quiet": false, + "consecutive": 0 + }, + { + "time": 1794333971.1471515, + "load": [ + 2.5751953125, + 2.2578125, + 1.8837890625 + ], + "available_mib": 11418.57421875, + "quiet": false, + "consecutive": 0 + }, + { + "time": 1794334003.2662983, + "load": [ + 3.50439453125, + 2.5185546875, + 1.9833984375 + ], + "available_mib": 11444.38671875, + "quiet": false, + "consecutive": 0 + }, + { + "time": 1794334036.6712184, + "load": [ + 2.7099609375, + 2.42041015625, + 1.96826171875 + ], + "available_mib": 12935.93359375, + "quiet": false, + "consecutive": 0 + }, + { + "time": 1794334069.8975623, + "load": [ + 3.1767578125, + 2.54345703125, + 2.0234375 + ], + "available_mib": 11024.484375, + "quiet": false, + "consecutive": 0 + }, + { + "time": 1794334103.0334003, + "load": [ + 3.61962890625, + 2.70068359375, + 2.091796875 + ], + "available_mib": 11370.92578125, + "quiet": false, + "consecutive": 0 + }, + { + "time": 1794334133.0423985, + "load": [ + 5.158203125, + 3.173828125, + 2.26953125 + ], + "available_mib": 11752.43359375, + "quiet": false, + "consecutive": 0 + }, + { + "time": 1794334166.1841462, + "load": [ + 5.9150390625, + 3.54248046875, + 2.42138671875 + ], + "available_mib": 11534.1875, + "quiet": false, + "consecutive": 0 + }, + { + "time": 1794334199.3317888, + "load": [ + 6.70654296875, + 3.95556640625, + 2.5947265625 + ], + "available_mib": 11387.73828125, + "quiet": false, + "consecutive": 0 + }, + { + "time": 1794334232.4823446, + "load": [ + 6.3447265625, + 4.1083984375, + 2.68798828125 + ], + "available_mib": 11507.6875, + "quiet": false, + "consecutive": 0 + }, + { + "time": 1794334265.631583, + "load": [ + 4.42578125, + 3.85791015625, + 2.6484375 + ], + "available_mib": 11845.42578125, + "quiet": false, + "consecutive": 0 + }, + { + "time": 1794334298.7701502, + "load": [ + 3.85400390625, + 3.76171875, + 2.65380859375 + ], + "available_mib": 11820.6484375, + "quiet": false, + "consecutive": 0 + }, + { + "time": 1794334331.9181776, + "load": [ + 4.02197265625, + 3.8291015625, + 2.712890625 + ], + "available_mib": 11025.40234375, + "quiet": false, + "consecutive": 0 + }, + { + "time": 1794334365.0634983, + "load": [ + 3.58447265625, + 3.72119140625, + 2.7119140625 + ], + "available_mib": 11497.28125, + "quiet": false, + "consecutive": 0 + }, + { + "time": 1794334398.1999946, + "load": [ + 2.56884765625, + 3.47216796875, + 2.66259765625 + ], + "available_mib": 13458.73046875, + "quiet": false, + "consecutive": 0 + }, + { + "time": 1794334431.3449616, + "load": [ + 1.7568359375, + 3.18701171875, + 2.59228515625 + ], + "available_mib": 13488.46484375, + "quiet": false, + "consecutive": 0 + }, + { + "time": 1794334464.4927516, + "load": [ + 1.1962890625, + 2.91259765625, + 2.51904296875 + ], + "available_mib": 13502.50390625, + "quiet": false, + "consecutive": 0 + }, + { + "time": 1794334497.6134791, + "load": [ + 0.998046875, + 2.697265625, + 2.458984375 + ], + "available_mib": 13504.2421875, + "quiet": true, + "consecutive": 1 + }, + { + "time": 1794334530.7239408, + "load": [ + 0.740234375, + 2.47021484375, + 2.39013671875 + ], + "available_mib": 13511.36328125, + "quiet": true, + "consecutive": 2 + }, + { + "time": 1794334563.7968533, + "load": [ + 0.5732421875, + 2.2646484375, + 2.3232421875 + ], + "available_mib": 13519.87890625, + "quiet": true, + "consecutive": 3 + } +] From c06cae034c3f7b6b68267821fbf1f2ff6c62191d Mon Sep 17 00:00:00 2001 From: Jammy2211 Date: Tue, 10 Nov 2026 18:38:23 +0000 Subject: [PATCH 7/7] Handle reaped child race in process-group cleanup test --- scripts/misc/test/test_nautilus_campaign.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/scripts/misc/test/test_nautilus_campaign.py b/scripts/misc/test/test_nautilus_campaign.py index 89a41ce..e229895 100644 --- a/scripts/misc/test/test_nautilus_campaign.py +++ b/scripts/misc/test/test_nautilus_campaign.py @@ -199,8 +199,13 @@ def test_supervisor_terminates_actual_process_group(tmp_path, cap, timeout, expe assert process.poll() is not None if child_pid.exists(): path = Path("/proc") / child_pid.read_text() / "stat" - if path.exists(): - assert path.read_text().rsplit(")", 1)[1].split()[0] == "Z" + try: + child_stat = path.read_text() + except FileNotFoundError: + # The terminated child may be reaped between any check and read. + pass + else: + assert child_stat.rsplit(")", 1)[1].split()[0] == "Z" def test_rss_group_reader_handles_spaces_in_process_name(tmp_path):