HavanaDiscreteSession

Symbolica documentation for getting started, symbolic expressions, numerical evaluation, pattern matching, and APIs in Python and Rust.

HavanaDiscreteSession

class HavanaDiscreteSession

Caller-owned native sector importance sampling. Pilot pauses retain this object; persistent checkpoints require frozen production. No worker pool is created.

Attributes

Name Description
checkpoint_available
complete Whether this pilot epoch or production allocation has completed.
sector_probabilities (Native sector id, current selection probability) in native problem order.
settings
stage

checkpoint_available

HavanaDiscreteSession.checkpoint_available: builtins.bool

complete

HavanaDiscreteSession.complete: builtins.bool

Whether this pilot epoch or production allocation has completed.

sector_probabilities

HavanaDiscreteSession.sector_probabilities: builtins.list[tuple[builtins.int, builtins.float]]

(Native sector id, current selection probability) in native problem order.

settings

HavanaDiscreteSession.settings: HavanaDiscreteSettings

stage

HavanaDiscreteSession.stage: builtins.str

Methods

Name Description
_repr_html_
adapt_pilot Adapt only a completed pilot and start another independent native pilot epoch.
checkpoint Persist accepted frozen-production batches and native replay state
freeze_production Adapt a completed pilot, freeze both grids, and discard all pilot estimates.
live_observation Native point-statistics preview, separate from accepted complete-batch covariance.
observation
snapshot
step Execute at most max_batches

_repr_html_

HavanaDiscreteSession._repr_html_(slf: HavanaDiscreteSession) -> builtins.str

adapt_pilot

HavanaDiscreteSession.adapt_pilot(
    *,
    discrete_learning_rate: builtins.float = 1.0,
    continuous_learning_rate: builtins.float = 1.0,
) -> IntegrationSnapshot

Adapt only a completed pilot and start another independent native pilot epoch.

checkpoint

HavanaDiscreteSession.checkpoint() -> bytes

Persist accepted frozen-production batches and native replay state. Pilot training is deliberately not serialized; retain the session to resume it.

freeze_production

HavanaDiscreteSession.freeze_production(
    *,
    points_per_batch: builtins.int,
    batches: builtins.int,
    discrete_learning_rate: builtins.float = 1.0,
    continuous_learning_rate: builtins.float = 1.0,
) -> IntegrationSnapshot

Adapt a completed pilot, freeze both grids, and discard all pilot estimates.

live_observation

HavanaDiscreteSession.live_observation() -> LiveObservation

Native point-statistics preview, separate from accepted complete-batch covariance.

observation

HavanaDiscreteSession.observation() -> IntegrationObservation

snapshot

HavanaDiscreteSession.snapshot() -> IntegrationSnapshot

step

HavanaDiscreteSession.step(
    max_batches: builtins.int = 1,
    *,
    evaluation_batch_size: builtins.int = 256,
    observer: typing.Optional[typing.Any] = None,
) -> IntegrationSnapshot

Execute at most max_batches. False from observer pauses after an accepted global batch. Interrupted batches are retried, without partial statistics.