sequince.steps.context#
Attributes#
Classes#
Runtime context passed to each SMC step. |
Module Contents#
- sequince.steps.context.LOG_PROPOSAL_OVERRIDE_KEY = 'log_proposal_override'#
- sequince.steps.context.EVALUATION_COUNTS_KEY = 'evaluation_counts'#
- sequince.steps.context.SMC_TRANSFORMATION_KEY = 'smc_transformation'#
- sequince.steps.context.RESULT_HDF5_OMITTED_METADATA_KEYS#
- class sequince.steps.context.StepContext[source]#
Runtime context passed to each SMC step.
- observation: Any = None#
Dictionary for shared user-defined context across steps.
Should not be modified by steps directly; use
metadatafor step-to-step communication instead.
- metadata: collections.abc.Mapping[str, Any]#
Dictionary for step metadata that can be used for communication between steps and callbacks.
- evaluation_counts: sequince.target.EvaluationCounts#
- with_metadata(**updates)[source]#
Return a context with copy-on-write metadata updates.
- Parameters:
updates (Any)
- Return type:
- without_metadata(*keys)[source]#
Return a context without the named metadata entries.
- Parameters:
keys (str)
- Return type:
- add_evaluation_counts(counts)[source]#
Return a context with newly incurred work added to its counters.
- Parameters:
counts (sequince.target.EvaluationCounts)
- Return type:
- request_stop_immediately()[source]#
Signal that the SMC runner should halt immediately.
- Return type: