Skip to content

Re-enable model.info output in test mode 2+#1188

Merged
Jammy2211 merged 1 commit intomain_buildfrom
feature/reenable-model-info-test-mode
Apr 8, 2026
Merged

Re-enable model.info output in test mode 2+#1188
Jammy2211 merged 1 commit intomain_buildfrom
feature/reenable-model-info-test-mode

Conversation

@Jammy2211
Copy link
Copy Markdown
Collaborator

Summary

Re-enable model.info generation and file output when PYAUTOFIT_TEST_MODE is 2 or 3. Benchmarking showed it adds only ~0.18s per call — negligible — while allowing smoke tests to verify model composition is correct.

API Changes

None — internal changes only.

Test Plan

  • All 1198 PyAutoFit unit tests pass
  • PYAUTOFIT_TEST_MODE=2 smoke test of autolens_workspace/scripts/imaging/modeling.py produces full model.info (4041 bytes)
  • PYAUTOFIT_TEST_MODE=3 also produces full model.info
  • Runtime unchanged (~14.5s → ~14.9s, within noise)
Full API Changes (for automation & release notes)

Changed Behaviour

  • AbstractPriorModel.info property — no longer returns a stub string in test mode 2+; always generates full model info text
  • AbstractSearch.fit() — now writes model.info file to output path in test mode 2+, even though the rest of pre_fit_output is still skipped

Migration

No migration needed — this is an internal test-mode behaviour change with no public API impact.

🤖 Generated with Claude Code

model.info was being skipped entirely for PYAUTOFIT_TEST_MODE >= 2,
but benchmarking shows it only takes ~0.18s. Re-enable it so smoke
tests can verify the model composition is correct.

- Remove early return guard from model.info property
- Add model.info file write in the test-mode-2+ else branch

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@Jammy2211 Jammy2211 merged commit ace7f6c into main_build Apr 8, 2026
1 check passed
@Jammy2211 Jammy2211 deleted the feature/reenable-model-info-test-mode branch April 8, 2026 12:15
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