mixle.experimental.typed_runtime.local module¶
First executable typed local path: budgeted component-coordinate EM.
- class TypedMixtureRoundReceipt(round_index, schedule, schedule_completion, coordinator_nodes, objective_before, candidate_objective, committed_objective, accepted, realized_gain, gain_attribution, active_components, invalidation, work)[source]
Bases:
objectSelection, objective gate, invalidation, and work for one local round.
- Parameters:
- class TypedMixtureRun(model, graph, rounds)[source]
Bases:
objectFinal model and immutable evidence from a typed local mixture fit.
- Parameters:
model (MixtureDistribution)
graph (UpdateGraph)
rounds (tuple[TypedMixtureRoundReceipt, ...])
- property total_model_evaluations: int
Total real component log-density calls across the fit.
- run_typed_mixture_em(enc_data, estimator, initial_model, *, max_its=10, delta=1.0e-9, stall_patience=3, accept_tolerance=1.0e-9, scheduler=None, gain_provider=None)[source]
Run objective-gated component EM selected by the typed scheduler.
The root mixture-weight update is an explicit always-on coordinator. Only component nodes enter the scheduler’s budget. Internal gain evidence comes from committed global-objective improvement and is therefore labelled
joint_with_coordinatorrather than misrepresented as an isolated causal contribution. A caller with better per-block probes may supplygain_provider; objective compatibility is still enforced by the scheduler.Budgeting changes convergence dynamics, not only speed: leaving a component’s parameters fixed for one or more rounds makes this a different asynchronous coordinate-ascent process than full-tree EM, and on a non-convex mixture likelihood the two can settle at different fixed points – occasionally a meaningfully worse one – even though each trajectory is individually monotone in its own committed objective. This is not something a gentler
schedulerfixes: the gap shrinks but does not vanish at every budget short of updating every component every round (seemixle/tests/typed_local_mixture_test.py’sLocalOptimumDivergenceRiskTestCase). A caller that needs the same fixed point full EM would reach should pass aschedulerwithbudget_fraction=1.0, or usemixle.inference.freeze_rollupinstead, which reaches an identical fixed point by construction – it only skips a component once its own convergence has already been demonstrated, rather than rationing updates among components before any evidence exists.- Parameters:
enc_data (Any)
estimator (MixtureEstimator)
initial_model (MixtureDistribution)
max_its (int)
delta (float | None)
stall_patience (int)
accept_tolerance (float)
scheduler (GainPerCostScheduler | None)
gain_provider (Callable[[int, MixtureDistribution, UpdateGraph, tuple[TypedMixtureRoundReceipt, ...]], Mapping[str, GainEvidence]] | None)
- Return type:
TypedMixtureRun