Dynamo Sweeper Integration

Install and compose Planner, Router, and Dynamo Replay with AISimulate
View as Markdown

Experimental. The AISimulate CLI, adapter ABI, and replay contracts may change without a standard deprecation period.

AISimulate’s Sweeper core does not depend on Dynamo. Dynamo owns its optional Planner and Router sweep configuration providers and DynamoReplayRunnerFactory.

Install

AISimulate requires Python 3.11 through 3.13. The ai-dynamo package remains installable on Python 3.10, but the AISimulate dependency and CLI are not installed there.

The supported prebuilt environment is the dynamo-planner image. The image stages and installs the published aisimulate==0.1.0.dev2 wheel alongside the Dynamo wheels. Dynamo’s Rust workspace resolves aisimulate-core==0.1.0-dev.2 from crates.io.

For Dynamo source development, install the published AISimulate wheel and build the matching Dynamo bindings:

$python3 -m pip install pip "maturin[patchelf]"
$cd lib/bindings/python
$maturin develop --uv --release --features aic-forward-pass
$cd ../../..
$python3 -m pip install --no-deps -e .
$python3 -m pip install "aisimulate==0.1.0.dev2"
$python3 -m pip install -r container/deps/requirements.planner.txt

On supported Python versions, ai-dynamo declares the exact AISimulate release as a base dependency. No ai-dynamo[simulation] extra is required.

Run the Unified CLI

Select the Dynamo stack explicitly to load the runner plus any configured Router and Planner adapters:

$aisimulate predict --stack dynamo --config prediction.yaml
$aisimulate recommend --stack dynamo --config recommendation.yaml

The --stack option defaults to engine. Without --stack dynamo, top-level router and planner sections have no matching adapter and fail configuration resolution.

The ai-dynamo distribution registers:

Entry-point groupNamePurpose
aisimulate.runner_factoriesdynamoExecute a complete replay through Dynamo composition
aisimulate.config_adaptersdynamo.routerValidate and materialize the public router section
aisimulate.config_adaptersdynamo.plannerValidate and materialize the public planner section
aisimulate.sweep_config_providersdynamo.router, dynamo.plannerPreserve the legacy Sweeper Python API

Use the Python SDK

Call the retained Sweeper Python API only when an application needs the legacy SmartSearchConfig contract and explicit runner injection:

1from aisimulate.sweeper import SmartSearchConfig, Sweeper
2from dynamo.replay.simulation import DynamoReplayRunnerFactory
3
4config = SmartSearchConfig.from_yaml("smart_sweep.yaml")
5candidates = Sweeper(
6 runner_factory=DynamoReplayRunnerFactory(),
7).run(config)

There is no compatibility CLI alias or --enable-dynamo flag.

Dynamo Providers

The ai-dynamo distribution registers these entry points:

AdapterProviderRuntime hook
dynamo.plannerDynamoPlannerSweepConfigProviderdynamo.planner:scaling_policy@1
dynamo.routerDynamoRouterSweepConfigProviderdynamo.router:placement_policy@1

The public recommendation YAML places the adapter-owned domains at the top level:

1router:
2 policy: {choices: [round_robin, kv_router]}
3 prefill_load_model: {type: none}
4 overlap_score_credit: {choices: [0.0, 0.5, 1.0]}
5planner:
6 policy: enabled
7 scaling_policy: {preset: [disabled, load_180_5]}
8 fpm_sampling: {preset: [default]}
9 load_sensitivity: {preset: [default]}
10 load_predictor: {preset: [arima_raw]}

The legacy SmartSearchConfig.adapters mapping remains available only through the Python SDK.

The legacy flat Planner preset lists remain accepted for backward compatibility but emit a FutureWarning. They will be removed after the 1.5 release. Nest each list under its sub-item’s preset field.

Each Planner preset sub-item owns a complete knob set:

Sub-itemKnobs covered by every preset
scaling_policyThroughput/load enablement and both adjustment intervals
fpm_samplingMaximum FPM samples and sample-bucket size
load_sensitivityScale-down sensitivity and minimum observations
load_predictorPredictor family, log transform, Prophet window, and all Kalman parameters

Named presets and custom mappings are validated against the complete sub-item. The provider fills family defaults for conditionally inactive predictor knobs before validation.

The Planner provider derives load-predictor parameters from all configured scaling intervals during generate_search_space. Enabled candidates materialize a concrete PlannerConfig runtime hook. The Router provider materializes either round-robin behavior without a hook or a concrete KV-router hook.

Replay Composition

DynamoReplayRunnerFactory converts each serializable ReplaySpec into an invocation of the shared AISimulate Replayer. It resolves materialized Planner and Router hooks into Dynamo-owned scaling and placement policies, while the Replayer continues to own traffic execution and report generation.

LoadNo Planner hookDynamo Planner hook
Mooncake traceReplayer with no scalingReplayer with the selected Planner scaling policy
Synthetic trafficReplayer with no scalingReplayer with the selected Planner scaling policy

The runner passes trace, fixed, or KV-load-derived closed-loop concurrency through ReplaySpec.concurrency. The public compiler maps evaluation.sla into ReplaySpec.goal.sla, and DynamoReplayRunnerFactory reads that lowered field as the replay goodput SLA. This SLA is independent of the Planner’s scaling SLA. A dynamo.router:placement_policy@1 hook selects the Dynamo placement policy. Without that hook, the Replayer uses its built-in round-robin policy.