🔀dynamo-router-starter
- プラグイン
- nvidia-skills
- ライセンス
- Apache-2.0
- ソース
- GitHub で見る ↗
説明
Dynamoルーターのモードを起動またはパッチ適用し、ルーターエンドポイントのスモークチェックを実行します。 次のような場合に使用: - ラウンドロビン、KV対応、最小負荷、またはデバイス対応のルーティング設定 - レシピのデプロイには recipe-runner を使用 - 障害診断には troubleshoot を使用
原文を表示
Start or patch Dynamo router modes and run router endpoint smoke checks. Use for round-robin, KV-aware, least-loaded, or device-aware routing setup; use recipe-runner for recipe deployment and troubleshoot for failure diagnosis.
ユースケース
- ✓ルーターモードを起動またはパッチ適用する
- ✓ルーターエンドポイントのスモークチェックを実行する
- ✓ラウンドロビンなどのルーティング設定を行う
本文(日本語訳)
Dynamo Router Starter
目的
ベースラインのルーターモードを起動し、適切な場合にはKV対応ルーティングを有効にし、エンドポイントの動作を確認することで、Dynamoルーティングをシンプルに扱えるようにします。ルーター内部の仕組みではなく、具体的なコマンドと成功の確認に集中できるようユーザーをサポートします。
前提条件
- Python 3.10以上、かつ
dynamoパッケージがインポート可能であること(python3 -m dynamo.frontend --helpが動作すること) - Kubernetes環境で実行する場合: 対象ネームスペースへのアクセス権が設定された
kubectl、およびデプロイ済みのDynamoレシピ - フロントエンドサービスへのネットワーク到達性(ポートフォワード経由または直接接続)
- 少なくとも1つのワーカーにモデルがロード済みであること(
/v1/modelsが1件以上のエントリを返すこと)
必要な入力情報
以下を収集または推論してください:
- ローカルのPython/CLIパス、またはKubernetesのレシピパス
- 希望するモード:
round-robin、kv、least-loaded、device-aware-weighted、direct、またはrandom - フロントエンドのポート番号、またはKubernetesのフロントエンドサービス
- ワーカーがKVイベントを発行しているかどうか(発行していない場合は近似KVモードを使用)
/v1/modelsでモデルを自動検出できない場合のモデル名(スモークテスト用)
手順
1. ベースラインの確立
登録済みワーカーを使用したローカル起動の場合:
python3 -m dynamo.frontend --router-mode round-robin --http-port 8000
Kubernetes環境の場合は、選択したレシピの deploy.yaml を確認してフロントエンドサービスを特定してください。
レシピがまだデプロイされていない場合は、先に dynamo-recipe-runner を使用してください。
2. KVルーティングの有効化
ローカルフロントエンドの場合:
python3 -m dynamo.frontend --router-mode kv --http-port 8000
Kubernetes環境の場合は、フロントエンドサービスの環境変数のみをパッチします:
envs:
- name: DYN_ROUTER_MODE
value: kv
バックエンドワーカーがKVキャッシュイベントを発行していない場合は、ルーターがイベント待機状態のままになるのを防ぐため、近似モードを設定してください:
envs:
- name: DYN_ROUTER_USE_KV_EVENTS
value: "false"
3. スモークテスト
フロントエンドサービスをポートフォワードするか、ローカルフロントエンドを起動した後、以下を実行してください:
python3 scripts/check_router_health.py \
--base-url http://127.0.0.1:8000
このスクリプトは /v1/models を検証し、モデルが検出可能な場合は /v1/chat/completions へのリクエストを1件実行する必要があります。
4. モードの慎重な比較
round-robin とKVルーティングを比較する際は:
- 同一のモデル・ワーカー・プロンプトセット・並行数・サンプリング設定を使用する
- KV再利用を検証する場合は、プレフィックスが共通するプロンプトを繰り返し送信する
- 十分なベンチマークサンプルが収集されていない限り、結果はスモーク比較として扱う
- チャットリクエスト1件のみからスループット改善を主張しない
エンドポイントが正常でない場合やワーカーが不足している場合は、dynamo-troubleshoot に切り替えてください。
使用可能なスクリプト
| スクリプト | 目的 | 引数 |
|---|---|---|
scripts/check_router_health.py |
Dynamoフロントエンドの /v1/models とチャット補完1件をスモークテストする |
--base-url、--retries、--timeout |
agentskills.io の run_script() プロトコル経由で呼び出します:
run_script("scripts/check_router_health.py", args=["--base-url", "http://127.0.0.1:8000"])
使用例
ポート8000でKVルーティングのローカルフロントエンドを起動し、スモークテストを実行する:
python3 -m dynamo.frontend --router-mode kv --http-port 8000 &
python3 scripts/check_router_health.py --base-url http://127.0.0.1:8000
ポートフォワード経由でアクセスするKubernetesデプロイ済みフロントエンド:
kubectl port-forward svc/qwen-vllm-disagg-frontend 8000:8000 -n dynamo-demo &
python3 scripts/check_router_health.py --base-url http://127.0.0.1:8000 --retries 3
agentプロトコル経由での同等の操作:
run_script("scripts/check_router_health.py", args=["--base-url", "http://127.0.0.1:8000", "--retries", "3"])
出力の仕様
以下を返してください:
- 選択したモードとその理由
- ローカルコマンド、またはKubernetesの環境変数パッチ
- フロントエンドサービス名またはURL
- スモークテストの結果
- 近似KVモードやワーカーのKVイベント未発行など、該当する制限事項
- より本格的な比較のために次に実行するコマンド
制限事項
- スモークテストはチャット補完1件のみであり、ベンチマークではありません。スループット・レイテンシの数値が必要な場合は
dynamo-benchmarkを使用してください。 - ワーカーがKVイベントを発行していない状態でのKV対応モードは近似モードに降格します。このスキルは該当状況をフラグとして示しますが、ワーカー設定の根本的な問題は修正しません。
- モード間の比較には、同一条件のワークロードが必要です。クロスモードのレイテンシ比較には、別途ベンチマーク実行が必要です。
トラブルシューティング
| 症状 | 想定される原因 | 次のステップ |
|---|---|---|
/v1/models が空のリストを返す |
フロントエンドにワーカーが登録されていない | ワーカーPodがReady状態であることを確認し、同一のetcd/NATSに接続しているかを検証する |
| スモークチャットリクエストがタイムアウトする | フロントエンドは起動しているが、ワーカーがリクエストを処理していない | dynamo-troubleshoot に切り替え、ワーカーのログを確認する |
| KVモードがハングする | ワーカーがKVキャッシュイベントを発行していない | DYN_ROUTER_USE_KV_EVENTS=false を設定する(近似モード) |
| ポートフォワードで接続が拒否される | ポートフォワードが切断されたか、サービス名が誤っている | ポートフォワードを再実行し、フロントエンドサービス名がレシピと一致しているか確認する |
ベンチマーク
NVSkills CIパイプラインが自動生成するNVCARPS-EVALパフォーマンスレポートについては、BENCHMARK.md を参照してください。
更新するには、このスキルに変更を加えた上流のPRで /nvskills-ci を再実行してください。
参考資料
- モードと環境変数のコンパクトな対応表については
references/router-modes.mdを参照してください。 - エンドポイントのスモークテストには
scripts/check_router_health.pyを使用してください。
原文(English)を表示
Dynamo Router Starter
<!-- SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. SPDX-License-Identifier: CC-BY-4.0 -->
Purpose
Make Dynamo routing feel easy by getting a baseline router mode running, enabling KV-aware routing when appropriate, and proving the endpoint works. Keep the user focused on exact commands and success signals, not router internals.
Prerequisites
- Python 3.10+ with the
dynamopackage importable (python3 -m dynamo.frontend --helpworks). - For Kubernetes runs:
kubectlconfigured with access to the target namespace and a deployed Dynamo recipe. - Network reachability to the frontend service (port-forward or direct).
- A model already loaded into at least one worker (
/v1/modelsreturns at least one entry).
Required Inputs
Collect or infer:
- local Python/CLI or Kubernetes recipe path
- desired mode:
round-robin,kv,least-loaded,device-aware-weighted,direct, orrandom - frontend port or Kubernetes frontend service
- whether workers publish KV events; if not, use approximate KV mode
- model name for smoke requests, if
/v1/modelscannot discover it
Instructions
1. Establish A Baseline
For local bring-up with already registered workers:
python3 -m dynamo.frontend --router-mode round-robin --http-port 8000
For Kubernetes, inspect the selected recipe deploy.yaml and locate the
frontend service. If the recipe is not already deployed, use
dynamo-recipe-runner first.
2. Enable KV Routing
For local frontend:
python3 -m dynamo.frontend --router-mode kv --http-port 8000
For Kubernetes, patch only the frontend service env:
envs:
- name: DYN_ROUTER_MODE
value: kv
If backend workers are not publishing KV cache events, set approximate mode instead of leaving the router waiting for events:
envs:
- name: DYN_ROUTER_USE_KV_EVENTS
value: "false"
3. Smoke Test
After port-forwarding the frontend service or starting local frontend, run:
python3 scripts/check_router_health.py \
--base-url http://127.0.0.1:8000
This must verify /v1/models and, when a model is discoverable, one
/v1/chat/completions request.
4. Compare Modes Carefully
When comparing round-robin vs KV routing:
- use the same model, workers, prompt set, concurrency, and sampling settings
- send repeated-prefix prompts if demonstrating KV reuse
- label the result as a smoke comparison unless enough benchmark samples were collected
- do not claim throughput improvement from a single chat request
If the endpoint is unhealthy or workers are missing, switch to
dynamo-troubleshoot.
Available Scripts
| Script | Purpose | Arguments |
|---|---|---|
scripts/check_router_health.py |
Smoke-test /v1/models and one chat completion against a Dynamo frontend |
--base-url, --retries, --timeout |
Invoke via the agentskills.io run_script() protocol:
run_script("scripts/check_router_health.py", args=["--base-url", "http://127.0.0.1:8000"])
Examples
Local KV-routed frontend on port 8000, then smoke-test it:
python3 -m dynamo.frontend --router-mode kv --http-port 8000 &
python3 scripts/check_router_health.py --base-url http://127.0.0.1:8000
Kubernetes-deployed frontend reachable via port-forward:
kubectl port-forward svc/qwen-vllm-disagg-frontend 8000:8000 -n dynamo-demo &
python3 scripts/check_router_health.py --base-url http://127.0.0.1:8000 --retries 3
Equivalent through the agent protocol:
run_script("scripts/check_router_health.py", args=["--base-url", "http://127.0.0.1:8000", "--retries", "3"])
Output Contract
Return:
- mode selected and why
- local command or Kubernetes env patch
- frontend service or URL
- smoke-test result
- any limitation, such as approximate KV mode or missing worker KV events
- next command to run for a fuller comparison
Limitations
- Smoke test is one chat completion; it is not a benchmark. Use
dynamo-benchmarkfor throughput/latency numbers. - KV-aware mode without worker KV-event publication degrades to approximate mode; this skill flags but does not fix the underlying worker config.
- Mode comparisons require matched workloads; cross-mode latency claims need separate benchmark runs.
Troubleshooting
| Symptom | Likely cause | Next step |
|---|---|---|
/v1/models returns empty list |
No worker registered with the frontend | Verify worker pods are Ready; confirm they connect to the same etcd/NATS |
| Smoke chat request times out | Frontend up, workers not serving | Switch to dynamo-troubleshoot; inspect worker logs |
| KV mode hangs | Workers do not publish KV cache events | Set DYN_ROUTER_USE_KV_EVENTS=false (approximate mode) |
| Connection refused on port-forward | Port-forward dropped or wrong service name | Re-run port-forward; verify the frontend service name matches the recipe |
Benchmark
See BENCHMARK.md for the NVCARPS-EVAL performance report (auto-generated by the NVSkills CI pipeline). To refresh, re-run /nvskills-ci on an upstream PR touching this skill.
References
- Read
references/router-modes.mdfor the compact mode/env map. - Use
scripts/check_router_health.pyfor endpoint smoke tests.
原文・著作権は Anthropic および各プラグイン作者に帰属します。日本語訳は Claude API による自動翻訳です。