dynamo.router

Request-router configuration and command-line argument groups.

View as Markdown

dynamo.router publishes 3 classes and 4 functions. Source: components/src/dynamo/router/__init__.py

CLI argument group for standalone router options.

from dynamo.router.args import DynamoRouterArgGroup

components/src/dynamo/router/args.py#L88

Public methods

add_arguments

add_arguments(parser) -> None

Add router-owned arguments to parser.

source

Typed configuration for the standalone KV router (router-owned options only).

from dynamo.router.args import DynamoRouterConfig

components/src/dynamo/router/args.py#L24

Public methods

validate

validate() -> None

Validate config invariants (aligned with Rust KvRouterConfig where applicable).

source

Router search-space preparation and replay-spec materialization.

from dynamo.router.simulation import DynamoRouterSweepConfigProvider

components/src/dynamo/router/simulation/provider.py#L132

Public methods

compile_prediction

compile_prediction(config: Mapping[str, JSONValue], context: PredictionAdapterContext) -> AdapterReplaySpec

No summary available.

source

compile_recommendation

compile_recommendation(config: Mapping[str, JSONValue], context: RecommendationAdapterContext) -> AdapterSearchPlan

No summary available.

source

materialize_candidate

materialize_candidate(plan: AdapterSearchPlan, selection: Mapping[str, JSONValue], context: CandidateContext) -> AdapterReplaySpec

No summary available.

source

generate_search_space

generate_search_space(search_spec: Mapping[str, JSONValue], context: SweepContext) -> AdapterSearchPlan

No summary available.

source

materialize_replay

materialize_replay(plan: AdapterSearchPlan, selection: Mapping[str, JSONValue], context: CandidateContext) -> AdapterReplaySpec

No summary available.

source

No summary available.

from dynamo.router.args import build_aic_perf_config
build_aic_perf_config(router_config: DynamoRouterConfig) -> AicPerfConfig | None

components/src/dynamo/router/args.py#L135

Build KvRouterConfig from DynamoRouterConfig.

from dynamo.router.args import build_kv_router_config
build_kv_router_config(router_config: DynamoRouterConfig) -> KvRouterConfig

components/src/dynamo/router/args.py#L130

Create the entry-point registered Router sweep configuration provider.

from dynamo.router.simulation import create_provider
create_provider() -> DynamoRouterSweepConfigProvider

components/src/dynamo/router/simulation/provider.py#L417

Parse command-line arguments for the standalone router.

from dynamo.router.args import parse_args
parse_args(argv: Optional[list[str]] = None) -> DynamoRouterConfig

Returns

  • DynamoRouterConfig — Parsed and validated configuration.

components/src/dynamo/router/args.py#L143