Skip to content

Sampler engine structure #280 - #287

Open
rozyczko wants to merge 4 commits into
developfrom
sampler-engine-structure-280
Open

Sampler engine structure #280#287
rozyczko wants to merge 4 commits into
developfrom
sampler-engine-structure-280

Conversation

@rozyczko

@rozyczko rozyczko commented Aug 7, 2026

Copy link
Copy Markdown
Member

Core refactoring and shared logic:

  • Introduced EngineBase (engine_base.py) as a new base class for all evaluation engines (minimizers and samplers), with centralized parameter handling, fit function wrapping, and evaluation logic.
  • Refactored MinimizerBase so it inherits from EngineBase. Cleaned up the constructor and removed duplicated parameter caching logic.

Bumps integration and utilities:

  • Extracted BUMPS-specific problem construction and parameter conversion functions into a new module bumps_utils/problem.py, including build_curve_problem, to_bumps_parameter, parameter_names, and parameter_snapshot. These are now imported and exposed in bumps_utils/__init__.py.
  • Added a new validation module (bumps_utils/validation.py) with functions for validating run settings and input arrays

API changes and deprecations:

  • mcmc_sample() now lives on Sampler class directly. The method now routes calls to Sampler(...).sample(...)
  • Updated the progress_callback signature in MinimizerBase.fit to clarify that its return value is ignored and to align with the new shared engine base.

@rozyczko rozyczko added [area] fitting Umbrella for fitting related work [scope] maintenance Code/tooling cleanup, no feature or bugfix (major.minor.PATCH) [priority] high Should be prioritized soon labels Aug 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[area] fitting Umbrella for fitting related work [priority] high Should be prioritized soon [scope] maintenance Code/tooling cleanup, no feature or bugfix (major.minor.PATCH)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant