一键导入
sim2real-check
Validate a sim2real translation bundle against its simulation bundle. Checks workloads, configs, signals, policies, and runtime health.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Validate a sim2real translation bundle against its simulation bundle. Checks workloads, configs, signals, policies, and runtime health.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
Analyze sim2real pipeline run results. Offers a catalog of standard analyses (per-workload latency comparison, per-request scatter) plus a free-form loop for custom charts, distributions, HTML reports, and cross-run comparisons.
Bootstrap an experiment repo into a sim2real transfer bundle. Two modes: (1) BLIS mode (default) — for BLIS-generated folders with algorithms/, workloads/, and config; derives transfer.yaml, baselines/, and a component submodule with user approval at each gate. (2) --byo mode — for operators arriving with pre-built EPP images plus a full baseline scenario and per-algorithm overlays; scaffolds transfer.yaml with `byo: true` markers and emits a copy-pasteable batched `sim2real translation register` command.
Translates simulation-discovered algorithms into production Go plugins for the target component (e.g. llm-d-inference-scheduler). Reads workspace/translations/<hash>/skill_input.json (written by `sim2real translate`), spawns a three-agent team (expert + writer + reviewer) per algorithm, and writes plugin source + treatment overlay to workspace/translations/<hash>/generated/<algo>/{cmd,pkg,<algo>_config.yaml,<algo>_output.json}. Use after `sim2real translate` reaches the translation checkpoint; follow up with `sim2real translate --resume` to validate outputs.
基于 SOC 职业分类
| name | sim2real-check |
| description | Validate a sim2real translation bundle against its simulation bundle. Checks workloads, configs, signals, policies, and runtime health. |
$ARGUMENTS
Parse user input if provided (e.g., --sim <path> --real <path> --workload <name>).
Before running ANY checks, auto-detect paths by scanning the working directory and context, then confirm with the user using AskUserQuestion.
README.md + algorithm/ + workloads/ under experiments/. Common patterns: sim2real_bundle*, sim2real_*bundle*.generated/ + (baseline/ or treatment/) under experiments/. Common patterns: bad_and_good*, *admission*, *deployment*.sim/ dir and go.mod).gateway-api-inference-extension under tmp/, ../, or nearby.llm-d-inference-scheduler under tmp/, ../, or nearby.<real>/baseline/ and <real>/treatment/.Use Glob and Bash (ls) to find candidates. Then present findings to the user:
I found the following paths. Please confirm or correct:
Sim bundle: <detected or "not found">
Real bundle: <detected or "not found">
BLIS codebase: <detected or "not found">
GAIE codebase: <detected or "not found">
llm-d scheduler: <detected or "not found">
Workload(s): <detected or "all">
Use AskUserQuestion to let them confirm or provide corrections. Do NOT proceed until confirmed.
Perform a comprehensive parity check between a BLIS simulation bundle and its real llm-d deployment results. Produce a structured evidence-based report.
STRICTLY READ-ONLY: Do not modify any files. Output a structured report.
For EVERY check, you MUST show:
For numerical checks, always show a comparison table. For code/config checks, show the relevant snippets side by side.
BLIS): confirmed by userGAIE): confirmed by userLLMD): confirmed by userSIM): <sim>/README.md, <sim>/config.md, <sim>/algorithm/, <sim>/workloads/, <sim>/results/REAL): <real>/generated/ (Go plugins + YAML configs), <real>/baseline/<workload>/ and <real>/treatment/<workload>/ (each with trace_header.yaml, trace_data.csv, server_logs/, epp_stream_done)Run ALL checks below.
For each workload in the real bundle, find the matching sim workload YAML in <sim>/workloads/.
1a. Arrival Rate (QPS)
aggregate_rate in workload YAMLtrace_data.csv arrival_time_us column: num_requests / (max - min arrival)1b. SLO Class Distribution
rate_fractionslo_class column in trace_data.csv, compute percentages1c. Input Token Distribution
input_distribution params (mean, std_dev, min, max)input_tokens column1d. Output Token Distribution
output_distribution paramsoutput_tokens column1e. Prefix Tokens
prefix_group or prefix configprefix_length column — should match (all zeros if no prefix in sim)1f. Streaming
streaming field per clientstreaming column in trace1g. Burstiness / Arrival Pattern
arrival.process (poisson, constant, etc.)2a. vLLM Server Config
Read trace_header.yaml AND the first vLLM server log from server_logs/ to extract actual config.
Check these against <sim>/config.md:
tensor_parallel_size)max_model_lengpu_memory_utilizationenable_prefix_caching (must match sim expectation)max_num_seqsmax_num_batched_tokensenable_chunked_prefillShow: table with each config param — expected (from config.md), actual (from server log)
2b. Instance Count
--num-instances in run commands or config.mdserver_logs/Read the algorithm files from <sim>/algorithm/ and the generated Go plugin from <real>/generated/.
IMPORTANT: Code proof requirement. For every claim about how GAIE/llm-d works, you MUST show the actual source code from the GAIE or LLMD codebase as proof. Do not make claims based on field names or assumptions — grep the codebase and show file:line and the relevant code snippet.
3a. Signal Availability For each signal the algorithm uses, verify it exists in GAIE:
WaitingQueueSize in GAIE codebaseKVCacheUsagePercent in GAIE codebasePriority in scheduling types in GAIE codebase3b. Signal Transform — CODE PROOF REQUIRED Check the generated Go plugin applies correct transforms. To determine the correct transform:
KVCacheUsagePercent assignments in GAIE codebase to see what value range it stores (0-1 or 0-100). Show the code.GAIE (e.g., detector.go or similar) to see if it divides by 100. Show the code.kv_cache_usage_perc) to see what vLLM emits. Show the code.KVCacheUsagePercent to see what range test data uses (0.5 vs 50.0). Show the code.Then compare against the generated plugin's transform. Show side-by-side:
GAIE source (file:line): <actual code>
GAIE detector (file:line): <actual code>
GAIE test (file:line): <actual code with test values>
Generated plugin (file:line): <actual code>
Sim algorithm (file:line): <actual code>
Verdict: PASS if transforms are consistent, FAIL if not. Plain English explanation of what the bug means practically.
3c. Saturation Formula — CODE PROOF REQUIRED
GAIE. Show the full function.GAIE).Show:
GAIE detector (file:line): <full saturation function>
Sim algorithm (file:line): <full saturation function>
Generated plugin (file:line): <full saturation function>
3d. Snapshot Delay — CODE PROOF REQUIRED
--snapshot-refresh-interval value from config.mdGAIE and LLMD codebases. Look for:
MetricsStalenessThreshold or similarIMPORTANT: Code proof requirement. For claims about GAIE routing/admission behavior, show the actual source code from the GAIE or LLMD codebase.
4a. Routing Policy — CODE PROOF REQUIRED
--routing-policy in run commands or READMEbaseline_config.yaml and treatment_config.yaml for picker pluginsrandom-picker, fcfs-ordering-policy, max-score-picker) in the GAIE and LLMD codebases. Show what each plugin does (file:line + brief code snippet or doc comment).round-robin ~ real random-picker (both are non-affinity); sim weighted-scoring ~ real max-score-picker with scorers4b. Admission Policy — Baseline
gaie-legacy)baseline_config.yaml should have NO admission plugin OR the matching GAIE control plugin4c. Admission Policy — Treatment
treatment_config.yaml plugin parameters must match exactly4d. Priority Tier Mapping — CODE PROOF REQUIRED Verify the generated Go plugin dispatches thresholds to the correct priority values:
From GAIE: grep for priority constants or InferenceModel priority definitions in GAIE/LLMD. Show where these priority values (100, 0, -10, -50) are defined or documented.
Cross-check against <sim>/README.md transfer instructions.
For each workload run (baseline and treatment), analyze the actual execution:
5a. vLLM Config Validation
Parse each server log's startup lines. Verify non-default args match expected config.
Extract: model, TP size, max_model_len, gpu_memory_utilization, enable_prefix_caching, max_num_seqs, max_num_batched_tokens.
5b. Instance Health
trace_data.csv by some proxy (or count server log files that show activity)5c. Prefix Hit Ratio
If enable_prefix_caching=True, grep server logs for prefix cache hit metrics.
If enable_prefix_caching=False, confirm no unexpected prefix hits.
5d. Request Status
status=ok (no admission shedding)status column for rejection patterns. Compute shed rate per SLO class.5e. Error Analysis
Grep server logs for ERROR, WARNING, OOM, CUDA, timeout patterns.
5f. KV Cache Utilization From server logs, look for KV cache size info:
GPU KV cache size: N tokensMaximum concurrency for X tokens per request: Y.ZxStructure the report as follows. Every section must have evidence tables/snippets, not just verdicts.
# Sim2Real Parity Report
**Real bundle**: <path>
**Sim reference**: <path>
**Date**: <date>
## Summary
| Category | PASS | WARN | FAIL |
|----------|------|------|------|
| Workload | X | Y | Z |
| Config | X | Y | Z |
| Signal | X | Y | Z |
| Policy | X | Y | Z |
| Runtime | X | Y | Z |
| **Total** | **X** | **Y** | **Z** |
## 1. Workload Parity
### Workload: <name>
**1a. Arrival Rate** — PASS
Expected 210 req/s (from workloads/w3.yaml:aggregate_rate), measured 210.4 req/s (25200 requests over 119.8s). Difference: 0.2%.
| Metric | Sim Spec | Real Trace | Diff | Verdict |
|--------|----------|------------|------|---------|
| QPS | 210 | 210.4 | 0.2% | PASS |
[... continue for each check with tables and explanations ...]
## Action Items
1. [FAIL] <what to fix and why>
2. [WARN] <what to investigate>
Use the Agent tool to parallelize independent checks:
Combine results into the final report.