mixle.experimental.typed_runtime.planner module

The typed update graph as an EXECUTION planner, not just a semantic checker.

plan_execution compiles a model/estimator pair and turns the graph’s weakest-link contracts into the concrete knobs mixle.inference.optimize accepts:

  • compute band -> precision: a FLOAT32_ELIGIBLE tree plans precision="minimal" (the runtime planner still applies its data-side checks – the band answers “may the validated reduced kernel ever be used here”, the data decides “should it be this time”); a FLOAT64 tree plans full precision and says which node dropped the band.

  • convergence certificate -> monotone: MONOTONE_CERTIFIED plans the strict generalized-EM gate; BEST_VISITED / ROBBINS_MONRO_SCHEDULE plan best-visited selection (monotone=False); UNKNOWN defers to optimize’s own structural resolution (monotone=None) rather than guessing.

Compilation failures keep raising exactly as before – that IS the fail-before-fitting boundary. Limits of the typed adapters (narrower than compilation, per this package’s README) surface as adapter_notes: they do not block optimize (which has its own execution paths), they tell you what run_typed_mixture_em would refuse.

class ExecutionPlan(precision, monotone, notes=(), adapter_notes=(), blockers=(), graph=None)[source]

Bases: object

Contract-derived execution knobs plus the receipts that justify them.

Parameters:
  • precision (str | None)

  • monotone (bool | None)

  • notes (tuple[str, ...])

  • adapter_notes (tuple[str, ...])

  • blockers (tuple[str, ...])

  • graph (UpdateGraph | None)

property optimize_kwargs: dict[str, Any]

Keyword arguments for mixle.inference.optimize; raises if the plan carries blockers.

plan_execution(model, estimator, *, nobs)[source]

Compile model/estimator and derive optimize-ready execution knobs from the contracts.

Raises whatever compile_update_graph() raises for an uncompilable pair – unsupported semantics fail here, before any fitting.

Parameters:
Return type:

ExecutionPlan