Skip to content

CTI resurrection Phase 2: autofit sync — factor-graph aggregator port#87

Merged
Jammy2211 merged 1 commit into
mainfrom
feature/cti-resurrection-phase2
Jul 17, 2026
Merged

CTI resurrection Phase 2: autofit sync — factor-graph aggregator port#87
Jammy2211 merged 1 commit into
mainfrom
feature/cti-resurrection-phase2

Conversation

@Jammy2211

Copy link
Copy Markdown
Collaborator

Summary

Phase 2 of the CTI resurrection epic (#86; Phases 0/1 were #83/#85). PyAutoFit removed analysis summing (analysis + analysis) in favour of af.AnalysisFactor + af.FactorGraphModel; the 5 multi-dataset aggregator tests quarantined in Phase 0 are ported and pass. The suite now has zero skips: 271 passed.

API Changes

  • autocti.aggregator fit loaders (fit_dataset_1d, fit_imaging_ci) handle factor-graph model instances: a new _cti_list_from helper extracts one CTI model per dataset from either a single-analysis instance or an indexed factor-graph instance (which also carries the FactorGraphModel itself as a trailing child), raising loudly on a count mismatch.
  • Multi-dataset CTI fits are expressed as af.FactorGraphModel(*[af.AnalysisFactor(prior_model=model, analysis=a) for a in analyses]) — the same pattern as the autolens workspace multi examples. The visualize_*_combined path (in_ascending_fpr_order_from etc.) is exercised end-to-end by these fits.

Test Plan

  • python -m pytest test_autocti — 271 passed, 0 skipped (5 un-skipped multi-analysis aggregator tests now pass)
  • Drift sweep: no remaining removed-autofit idioms in autocti/
Full API Changes (for automation & release notes)

Changed

  • autocti/aggregator/fit_dataset_1d.py, autocti/aggregator/fit_imaging_ci.py_cti_list_from(source, total_datasets) replaces the bare instance.cti access; single-analysis behavior unchanged.

Migration

  • Before: search.fit(model=model, analysis=analysis_1 + analysis_2)
  • After: factor_graph = af.FactorGraphModel(af.AnalysisFactor(prior_model=model, analysis=analysis_1), af.AnalysisFactor(prior_model=model, analysis=analysis_2)); search.fit(model=factor_graph.global_prior_model, analysis=factor_graph)

Generated by the PyAutoLabs agent workflow.

🤖 Generated with Claude Code

…#86)

PyAutoFit removed analysis summing (analysis + analysis) in favour of
af.AnalysisFactor + af.FactorGraphModel. This ports PyAutoCTI's multi-dataset
aggregator path and un-skips the 5 tests quarantined in Phase 0:

- test_autocti/aggregator/conftest.py: aggregator_from accepts a list of
  analyses and fits af.FactorGraphModel(*factors) with the model shared
  across factors; the mock samples are rebuilt against global_prior_model,
  whose paths carry per-factor prefixes.
- autocti/aggregator/{fit_dataset_1d,fit_imaging_ci}.py: new _cti_list_from
  helper extracts one CTI model per dataset from either a single-analysis
  instance (instance.cti) or a factor-graph instance (indexed collection,
  which also carries the FactorGraphModel itself as a trailing child); raises
  loudly on a count mismatch.
- The 5 pytest.mark.skip markers are removed; multi-dataset call sites pass
  [analysis, analysis] instead of the removed analysis + analysis.

Drift sweep: no other removed-autofit idioms found in autocti; the
visualize_before_fit_combined / visualize_combined multi-dataset visualizer
path is exercised end-to-end by the factor-graph fits in the aggregator tests.

test_autocti: 271 passed, 0 skipped.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@Jammy2211 Jammy2211 added the pending-release PR queued for the next release build label Jul 17, 2026
@Jammy2211
Jammy2211 merged commit 12a3eca into main Jul 17, 2026
0 of 8 checks passed
@Jammy2211
Jammy2211 deleted the feature/cti-resurrection-phase2 branch July 17, 2026 07:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pending-release PR queued for the next release build

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant