CTI resurrection Phase 2: autofit sync — factor-graph aggregator port#87
Merged
Conversation
…#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>
This was referenced Jul 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Phase 2 of the CTI resurrection epic (#86; Phases 0/1 were #83/#85). PyAutoFit removed analysis summing (
analysis + analysis) in favour ofaf.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.aggregatorfit loaders (fit_dataset_1d,fit_imaging_ci) handle factor-graph model instances: a new_cti_list_fromhelper extracts one CTI model per dataset from either a single-analysis instance or an indexed factor-graph instance (which also carries theFactorGraphModelitself as a trailing child), raising loudly on a count mismatch.af.FactorGraphModel(*[af.AnalysisFactor(prior_model=model, analysis=a) for a in analyses])— the same pattern as the autolens workspacemultiexamples. Thevisualize_*_combinedpath (in_ascending_fpr_order_frometc.) 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)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 bareinstance.ctiaccess; single-analysis behavior unchanged.Migration
search.fit(model=model, analysis=analysis_1 + analysis_2)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