Skip to content

fix: save_results survives a rejected max-likelihood sample (PyAutoFit#1535) - #713

Merged
Jammy2211 merged 1 commit into
mainfrom
feature/result-instance-fallback
Aug 28, 2026
Merged

Jammy2211 merged 1 commit into
mainfrom
feature/result-instance-fallback

Conversation

@Jammy2211

Copy link
Copy Markdown
Collaborator

Summary

Analysis.save_results writes the optional tracer.json from result.max_log_likelihood_tracer inside a try that caught only AttributeError. When the stored best point is rejected by the model, PyAutoFit raises SamplesException / FitException there, which escaped start_resume_fit before paths.completed() and killed six completed A100 fits (PyAutoLabs/autolens_profiling#182; root fix in PyAutoLabs/PyAutoFit#1535's PR). The catch is widened and logs a warning instead of silently passing.

Companion to the PyAutoFit PR; safe to merge independently.

API Changes

None. save_results now logs a warning and continues when the maximum-likelihood tracer cannot be built, instead of raising.
See full details below.

Test Plan

  • pytest test_autolens -q — 553 passed
  • New parametrized test: save_results swallows AttributeError, af.exc.SamplesException, af.exc.FitException from max_log_likelihood_tracer
Full API Changes (for automation & release notes)

Removed

  • none

Added

  • none

Migration

  • none

Generated by the PyAutoLabs agent workflow.

@Jammy2211 Jammy2211 added the pending-release PR queued for the next release build label Aug 27, 2026
@Jammy2211
Jammy2211 merged commit b23ee53 into main Aug 28, 2026
4 checks passed
@Jammy2211
Jammy2211 deleted the feature/result-instance-fallback branch August 28, 2026 00:40
@Jammy2211 Jammy2211 removed the pending-release PR queued for the next release build label Sep 4, 2026
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