Skip to content

perf: add opt-in compact corner array renderer - #1764

Closed
Jammy2211 wants to merge 2 commits into
mainfrom
feature/nautilus-compact-plot-adapter
Closed

Jammy2211 wants to merge 2 commits into
mainfrom
feature/nautilus-compact-plot-adapter

Conversation

@Jammy2211

@Jammy2211 Jammy2211 commented Nov 10, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Adds an opt-in array renderer for compact anesthetic corner plots. It retains every weighted sample and the native diagonal KDE, while calculating histogram quantile bounds once per column and avoiding per-panel dataframe dispatch. Unsupported data, styles and dependency versions use the existing renderer before drawing. No anesthetic source is changed.

Experimental work outside Pulse. The default remains anesthetic. The bounded 30D replay completed two matched pairs: full-process ratios 2.022x and 1.344x, with byte-identical PNGs and unchanged samples/checkpoints. The host-load guard stopped after 5/6 cases; the third baseline is excluded from ratios. Timing variation and the incomplete third pair prevent any general speedup or default-promotion claim. Results: PyAutoLabs/autofit_profiling#14.

API Changes

corner_anesthetic(..., compact_backend="array") and the matching packaged setting opt into the candidate. Default "anesthetic" is unchanged; unknown backend names raise PlotKwargsError. Initially validated on anesthetic 2.16.0, pandas 3.0.6 and matplotlib 3.11.2; other versions fall back.
See full details below.

Test Plan

  • 65 plotting tests; exact numeric, bin, limit, twin-axis and rendered-pixel parity on supported options, repeated labels, zero/unequal/uniform weights and reordered subsets.
  • Full PyAutoFit suite at measured e57611d: 4298 passed, 2 skipped, 1 expected upstream failure (Python 3.12).
  • Isolated Heart smoke: 8 scripts and 2 notebooks passed.
  • Author review and diff checks; no independent review claimed.
  • Final head 4996f42: Python 3.12/3.13 and no-JAX CI passed (42865681739); Docs passed. The final non-string-label fallback guard also passes all 65 focused tests.
  • Approved bounded replay executed once at measured e57611d / producer 3bce28c: five successes, one unrun after host-load guard. Zero sampling; one authorized summary timing call per case. Raw attempts retained; no retry.

The retained profiling environment lacked Zeus/Astropy. Those failed validation attempts were retained; a separate complete-extras validation environment passed. The measurement environment was not changed.

Development authorization

Live human: “Approved, proceed with both plans despite Heart RED. Keep them outside Pulse and leave merge for me.”
Authoritative Heart RED reasons: “PyAutoGalaxy: CI failure”; “PyAutoLens: CI failure” (2026-11-10T16:45:59.194451+00:00). Development PR only; no release or CI bypass. Merge remains human. Refs #1762.

Full API Changes (for automation & release notes)

Added

  • corner_anesthetic keyword/config compact_backend: anesthetic (default), array (experimental).

Changed Behaviour

  • Only explicit array on supported finite float64, linear compact plots bypasses dataframe dispatch. Unsupported cases keep the established renderer.

Migration

  • None required. Existing configurations retain their behavior.

Generated by the PyAutoLabs agent workflow.

@Jammy2211

Copy link
Copy Markdown
Collaborator Author

Closing without merging (human decision 2026-11-12, pre-autonomy wrap-up). The opt-in renderer is exact-parity, but it only engages on pinned anesthetic/pandas/matplotlib versions and falls back otherwise. The speedup evidence is two pairs (1.34x, 2.02x) with no independent review. That isn't enough to justify keeping a second corner renderer in the library. The branch, worktree and raw data are kept; reopen if corner-plot cost becomes a bottleneck.

@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-compact-plot-adapter 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