Skip to content

Guard corner_cornerpy against samples < dims#1224

Merged
Jammy2211 merged 1 commit intomainfrom
feature/autofit-smoke-cleanup
Apr 18, 2026
Merged

Guard corner_cornerpy against samples < dims#1224
Jammy2211 merged 1 commit intomainfrom
feature/autofit-smoke-cleanup

Conversation

@Jammy2211
Copy link
Copy Markdown
Collaborator

Summary

aplt.corner_cornerpy asserted inside the corner library when called with fewer samples than model dimensions. This is routine under PYAUTO_TEST_MODE=2 (bypass leaves 1–2 samples) and can also happen during very-early updates when corner_cornerpy is called before the sampler has produced a full chain. Log and skip instead of asserting so callers can invoke the plot unconditionally.

API Changes

None — internal behaviour of corner_cornerpy now gracefully skips when samples are insufficient. Callers see an INFO log line and a None return instead of an AssertionError.
See full details below.

Test Plan

  • pytest test_autofit/non_linear/ (239 passed)
  • Full autofit_workspace smoke sweep (40 pass / 0 fail / 12 skip)
Full API Changes (for automation & release notes)

Changed Behaviour

  • autofit.non_linear.plot.samples_plotters.corner_cornerpy — now returns early with an INFO log when samples.parameter_lists has ndim < 2 or fewer rows than columns (samples < dims+1). Previous behaviour raised AssertionError from corner.corner_impl.

Co-Authored-By: Claude Opus 4.7 noreply@anthropic.com

The corner-plot helper asserted inside the corner library when called with
fewer samples than model dimensions (triggered routinely by PYAUTO_TEST_MODE=2
bypassing the sampler, and possible in any very-early update). Skip and log
instead of crashing so downstream scripts can call the plot unconditionally.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@Jammy2211 Jammy2211 added the pending-release Pending next release build label Apr 18, 2026
@Jammy2211 Jammy2211 merged commit e946023 into main Apr 18, 2026
2 checks passed
@Jammy2211 Jammy2211 deleted the feature/autofit-smoke-cleanup branch April 18, 2026 08:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pending-release Pending next release build

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant