Skip to content

Simplify/clean sampler interface & use - #235

Open
jared321 wants to merge 15 commits into
mainfrom
159Simplify
Open

Simplify/clean sampler interface & use#235
jared321 wants to merge 15 commits into
mainfrom
159Simplify

Conversation

@jared321

@jared321 jared321 commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Pending tasks

  • Once Simplify and clean calibrator interface #240 is merged into main bring main into this branch & resolve any conflicts
    • This should enable tests to pass again.
  • Address TODO in shared_scenario.py
  • Update emu docs in `calibrator
    • Updates to __init__ should allow for shortening emu : surmise.emulation.emulator to surmise.emulator
  • For now, don't expect calibration methods to predict all the extra arguments that might be passed in as "sampler args" and remove each one so that the sampler is passed just its arguments. The interface presently allows for more flexibility than we desire. Instead samplers should insist that the specification given to them contain all their arguments, but accept if more are given. No need for a warning.
  • See if inline API docs for surmise.calibration.calibrator now have their shorted names or fix so that they do.

We will not be making any similar interface changes for emulation currently, because the emulator takes a possible passthrough function.

Implementing lessons learned form last sampler branch and looking forward to allowing users to pass custom sampler to calibrator as a sampler argument.

PR Self-review

jared321 added 5 commits July 10, 2026 14:31
Updated ball drop notebook to use this interface.
Calibrators now pass in all arguments required by samplers in a quasi
sampler-agnostic way, which should help if we want to allow for user-provided
samplers.
All samplers now take the same four mandatory arguments with no default values
in sight.  This is the same interface that we would impose on user-provided
samplers.  Note that the fourth argument is a dictionary that contains all
sampler-specific information. Therefore, this interface is sufficiently generic
and flexible.

The tools and test suite files in the tools folder are now simpler and cleaner
as a result of these changes.  I take that as a good sign that we are moving in
the right direction.  The ball drop notebook is now somewhat easier to read.
@jared321 jared321 self-assigned this Jul 10, 2026
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.

2 participants