Skip to content

refactor: extract SearchUpdater class from NonLinearSearch#1207

Merged
Jammy2211 merged 1 commit intomainfrom
feature/search-update-refactor
Apr 13, 2026
Merged

refactor: extract SearchUpdater class from NonLinearSearch#1207
Jammy2211 merged 1 commit intomainfrom
feature/search-update-refactor

Conversation

@Jammy2211
Copy link
Copy Markdown
Collaborator

Summary

Extract perform_update and perform_visualization logic from NonLinearSearch into a new SearchUpdater class (autofit/non_linear/search/updater.py). Each output concern — sample persistence, latent variable computation, visualization, profiling, and summary output — is now its own focused method. The search class retains thin delegators for full backward compatibility.

Closes #1205. Follow-up to #1003.

API Changes

None — internal changes only. All public methods (perform_update, perform_visualization) retain their existing signatures and behavior. No subclass call sites changed.

Test Plan

  • All 1205 existing tests pass (pytest test_autofit -x)
  • Smoke test workspace scripts to confirm no downstream impact
Full API Changes (for automation & release notes)

Added

  • autofit.non_linear.search.updater.SearchUpdater — new internal class (not part of public API)

Internal Refactoring

  • NonLinearSearch.perform_update — body extracted to SearchUpdater.update(), method now delegates
  • NonLinearSearch.perform_visualization — body extracted to SearchUpdater.visualize(), method now delegates
  • NonLinearSearch._updater — new lazy property that constructs SearchUpdater
  • NonLinearSearch._log_process_state — duplicated into SearchUpdater (both static, no coupling)

Migration

No migration needed — no public API changes.

🤖 Generated with Claude Code

Move perform_update and perform_visualization logic into a new
SearchUpdater class (autofit/non_linear/search/updater.py), separating
sample persistence, latent variable computation, visualization,
profiling, and summary output into focused methods. The search class
retains thin delegators for backward compatibility.

Closes #1205

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@Jammy2211 Jammy2211 merged commit f27b456 into main Apr 13, 2026
2 checks passed
@Jammy2211 Jammy2211 deleted the feature/search-update-refactor branch April 13, 2026 10:29
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.

refactor: extract SearchUpdater class from NonLinearSearch

1 participant