mixle.experimental.typed_runtime.frontier_pilot module

Integrated graph-memory mixture-of-experts pilot with recovery receipts.

class GraphMemoryPilotReceipt(seed, source_nodes, local_adamw, graph_adamw, graph_routed, recovery, failure_receipts)[source]

Bases: object

Complete context-quality, optimizer, and recovery evidence for the pilot.

Parameters:
  • seed (int)

  • source_nodes (int)

  • local_adamw (PilotStrategyReceipt)

  • graph_adamw (PilotStrategyReceipt)

  • graph_routed (PilotStrategyReceipt)

  • recovery (RecoveryDrillReceipt)

  • failure_receipts (tuple[FailureReceipt, ...])

class PilotStrategyReceipt(strategy, context_mode, optimizer, final_loss, test_accuracy, time_to_target_updates, time_to_target_seconds, target_accuracy, elapsed_seconds, batch, optimizer_families, maximum_active_context_tokens, source_horizon_tokens)[source]

Bases: object

Fixed-budget training and evaluation result for one context/optimizer strategy.

Parameters:
  • strategy (str)

  • context_mode (str)

  • optimizer (str)

  • final_loss (float)

  • test_accuracy (float)

  • time_to_target_updates (int | None)

  • time_to_target_seconds (float | None)

  • target_accuracy (float)

  • elapsed_seconds (float)

  • batch (BatchSemanticsReceipt)

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

  • maximum_active_context_tokens (int)

  • source_horizon_tokens (int)

as_dict()[source]

Return a JSON-compatible strategy receipt.

Return type:

dict[str, Any]

class RecoveryDrillReceipt(checkpoint_update, final_update, model_bitwise_equal, optimizer_state_equal, rng_state_equal, uninterrupted_model_hash, resumed_model_hash)[source]

Bases: object

Checkpoint/restart comparison for model, optimizer, and RNG state.

Parameters:
  • checkpoint_update (int)

  • final_update (int)

  • model_bitwise_equal (bool)

  • optimizer_state_equal (bool)

  • rng_state_equal (bool)

  • uninterrupted_model_hash (str)

  • resumed_model_hash (str)

run_graph_memory_pilot(*, seed=17, source_nodes=256, train_examples=192, test_examples=96, updates=80, microbatch_size=32, accumulation_steps=2, target_accuracy=0.9)[source]

Run a fixed-budget graph-context MoE ablation and deterministic restart drill.

The pilot seeds the PROCESS-GLOBAL torch RNG – it has to, because the restart drill compares bitwise reproducibility and the models it trains draw from the default generator. What it did not do was put it back (MXR-080-1905): a caller who seeded their own process, ran the pilot and then drew got different numbers than if they had not run it, and nothing said so. The entry state is captured and restored here, including on failure, so running the pilot is not itself an observable event in the caller’s stream. The pilot’s internal determinism is unchanged: it still seeds from seed on the way in.

NOT restored: NumPy’s global RNG, because the pilot never touches it – it builds its own np.random.default_rng(seed) – and CUDA generator state, because the pilot runs on CPU.

Parameters:
  • seed (int)

  • source_nodes (int)

  • train_examples (int)

  • test_examples (int)

  • updates (int)

  • microbatch_size (int)

  • accumulation_steps (int)

  • target_accuracy (float)

Return type:

GraphMemoryPilotReceipt