Skip to content

perf: add opt-in atomic Nautilus checkpoint batching - #1765

Closed
Jammy2211 wants to merge 1 commit into
mainfrom
feature/nautilus-checkpoint-batching
Closed

Jammy2211 wants to merge 1 commit into
mainfrom
feature/nautilus-checkpoint-batching

Conversation

@Jammy2211

@Jammy2211 Jammy2211 commented Nov 10, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Adds opt-in checkpoint batching to Nautilus. Interval1 retains the native sampler unchanged; larger intervals defer shell updates and publish complete native snapshots by atomic replacement. Native full-write boundaries remain immediate and normal returns flush pending work. An interruption may lose recent batches plus work in flight; this protects against process interruption, not power loss or network-filesystem failure.

API Changes

Nautilus(checkpoint_interval_batches=1) accepts positive integers. Values above1 require checkpoint=True and nautilus-sampler1.0.5. Sampling settings and search identifiers remain unchanged.

Test Plan

  • Full suite: 4302 passed, 2 skipped, 1 expected upstream failure.
  • Native trajectory/RNG, multi-shell snapshot, normal-return flush, failure/rename, explicit export and real 100D HDF5 wrapper tests.
  • Isolated Heart smoke: eight scripts + two notebooks passed.
  • Author diff review; no independent review claimed.
  • Approved quiet-host pilot03: all20 children completed in931.93s, all four crash/resume witnesses passed, all six interval1/5 pairs have identical posterior/count/ESS/shells. Controlled interruptions lost200 (deferred) or500 (atomic) completed evaluations with zero in flight; saved checkpoints remained intact.
  • Negative performance result: interval5 took21.2–48.8% longer in sampler.run (median28.1%) and15.6–46.6% longer for full fit (median23.8%). Checkpoint time rose2.81–4.44x; persistence syscall bytes rose2.37–2.62x. Keep native interval1; do not promote this policy as a speed improvement. These are six exploratory local pairs, not a confidence interval.
  • Results/provenance: experiment: measure checkpoint recovery and CPU overhead outside Pulse autofit_profiling#15. Measured producer5206f0b/librarye16fba3ee; reporte1cebf8. Attempts01/02 retained alongside03 (~120MiB total).
  • Exact head e16fba3: Python 3.12, Python 3.13 and no-JAX CI passed (run42867205132); Docs passed.

Final experiment head c06cae0 passed CI 42877256638: all 125 tooling tests, Ruff check/format, catalogue validation and link checks. Its only change after result report e1cebf8 fixes the existing process-reaping test race; measured producer 5206f0b and library e16fba3ee remain unchanged.

Development authorization

Live human: “Approved, proceed with both plans despite Heart RED. Keep them outside Pulse and leave merge for me.”
Latest authoritative Heart (2026-11-10T18:35:43.930077+00:00) is RED: “PyAutoGalaxy: CI failure”; “PyAutoLens: CI failure”; “PyAutoCTI: 1 uncommitted source change(s)”. The last item is unrelated work outside this task; this report does not edit or release PyAutoCTI.
Development only; no release, CI bypass or merge. The bounded checkpoint experiment is complete with a negative performance result; wider phase0b remains incomplete. Raw data/worktree retained. Refs #1763.

Full API Changes (for automation & release notes)

Added

  • Nautilus.checkpoint_interval_batches: opt-in persistence interval, default1.

Changed Behaviour

  • Values above1 batch native shell-update notifications into full atomic snapshots, with normal-return flush. Unsupported Nautilus versions fail closed.

Migration

  • None required. Default checkpoint behavior and identifiers remain unchanged.

Generated by the PyAutoLabs agent workflow.

Copy link
Copy Markdown
Collaborator Author

Workspace experiment PR: PyAutoLabs/autofit_profiling#15. The approved one-shot bounded pilot has started at library e16fba3 / producer d108719, after 4302 full-suite passes, 10 smoke cases and 124 tooling tests. Four crash/resume witnesses gate all timing cases. Outside Pulse; human merge.

@Jammy2211

Copy link
Copy Markdown
Collaborator Author

Negative result; keep the native checkpoint default.

@Jammy2211 Jammy2211 closed this Nov 12, 2026
@Jammy2211 Jammy2211 removed the pending-release PR queued for the next release build label Nov 19, 2026
@Jammy2211
Jammy2211 deleted the feature/nautilus-checkpoint-batching branch November 25, 2026 20:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant