Skip to content

refactor(srt): compose AgentX recipes and select power from the master row - #3818

Draft
adibarra wants to merge 14 commits into
refactor/srt-composerfrom
refactor/srt-agentx-compose
Draft

adibarra wants to merge 14 commits into
refactor/srt-composerfrom
refactor/srt-agentx-compose

Conversation

@adibarra

@adibarra adibarra commented Oct 8, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • AgentX fragments: all 153 active AgentX recipes become fragments, composed over new shared blocks (configs/srt-recipes/agentic-{single,multi}.yaml) and bound like fixed-sequence. The binder writes image, model, precision and identity, and identity.container.image stays byte-identical. A fragment that sets a bound key to a different value fails before submission.
  • Launcher-owned client env: multi-node clients get RESULT_DIR, AIPERF_DATASET_MMAP_CACHE_DIR and HF_HUB_CACHE from the volumes the launcher mounts.
    • New runners.yaml agentic-volume-mounts replaces lanes._AGENTIC_CACHES. mi355x keeps its workspace result directory through a lane field.
    • Clusters without cache mounts (b300-dsxe) behave as today. A fragment that sets HF_HOME keeps its own cache.
  • Removed from fragments: dead keys (PORT, INFMAX_CONTAINER_WORKSPACE, retired SRT_MEASUREMENT_WINDOW_*, default WEKA_LOADER_OVERRIDE), copies of workflow env, and benchmark.concurrencies.
  • Master power: true on search-space rows:
    • Replaces telemetry: blocks in 175 recipes (153 AgentX, 22 fixed-sequence) and is set on 68 rows.
    • It merges telemetry-dcgm.yaml with the cluster's new srt-slurm.power-exporter-port and binds benchmark.concurrencies after variant selection, so bundles can measure power now.
    • Removed: recipe-text power detection, recipe_glob rules and the inject_concurrencies text rewrite. The multinode workflow exports POWER.
  • Docs: RECIPES.md and CONFIGS.md updated.

Verification

  • Matrix: full-sweep and --all-evals are identical to the base, apart from the new power: true on exactly the rows whose recipe had telemetry (140 and 125 rows).
  • Harness (not committed): ran all 3622 point × cluster launches through the real python -m infx.launch with a fake srtctl.
    • Fixed-sequence: identical recipes and srtslurm.yaml.
    • AgentX: for every point, the client's effective environment gives the same Plan.from_env result as the base.
  • Suite: the full CI pytest command passes 2268 tests, and ruff is clean.

Intentional differences

  • srtslurm.yaml model_paths keys change from recipe aliases to hf:<MODEL>, with the same resolved path.
  • benchmark.concurrencies is dropped on 9 qwen3.5 b300 variants without power. It had no effect there.
  • 38 single-node AgentX points whose recipe image was stale now bind the master image and launch. Before, they failed validation (glm5.2-fp8-mi325x-sglang-agentic-mtp, dsv4-fp4-b200-sglang-agentic-hicache-mtp).
  • Single-node runs no longer pass a redundant --set CONC.
  • infx generate binds every srt-slurm point, AgentX included (power telemetry and client paths come from the launcher's own code). The manifest records the cluster.
  • Host DRAM comes from the matrix, not recipes: the binder writes TOTAL_CPU_DRAM_GB and KV_OFFLOADING, and resolves @dram.total-gb|total-bytes|per-gpu-gb|per-gpu-bytes for pool sizes (SimpleCPU, Mooncake, LMCache, TRT host cache, HiCache). Fragments that hardcode the budget or a derived pool size are rejected. Configs whose pool was a fraction of the budget have dram-utilization retuned so the budget equals the pool; Mooncake sizes are exact bytes instead of GiB strings. qwen3.5 mi355x and minimaxm3 b300 TRT pools are cut to the 3 TB policy share.

@github-actions

github-actions Bot commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

Thanks for the contribution!

  • Review: If this PR changes files owned by someone other than a repository admin or @SemiAnalysisAI/core, ask one eligible CODEOWNER to complete the latest PR_REVIEW_CHECKLIST.md before contacting a core maintainer on Slack. Follow the template exactly, including As a PR reviewer and CODEOWNER, I have reviewed this and have, so sign-off verification triggers.
  • PR verification: Sweeps run only when the PR appends an inferencex-e2e/perf-changelog.yaml entry and carries exactly one primary label: full-sweep-fail-fast (strongly recommended; canary plus per-matrix fail-fast), full-sweep-enabled (canary; matrix jobs continue after a failure), or non-canary-full-sweep-enabled (no canary or fail-fast). The modifiers all-evals, evals-only, and agentx-fast require a primary label. On fork PRs, a maintainer applies the label. See sweep labels and reuse.
  • After merging: PR authors must ensure all GitHub Actions jobs pass. Transient failures often pass on rerun; see how to rerun failed jobs.
中文

感谢你的贡献!

  • **审阅:**如果 PR 修改的文件归属于仓库管理员及 @SemiAnalysisAI/core 之外的 CODEOWNER,请先联系一位有资格的 CODEOWNER 填写最新的 PR_REVIEW_CHECKLIST.md,再通过 Slack 联系核心维护者。必须严格遵循模板,并保留 As a PR reviewer and CODEOWNER, I have reviewed this and have,才能触发签核验证。
  • **PR 验证:**只有当 PR 在 inferencex-e2e/perf-changelog.yaml 末尾追加了条目,并且恰好带有一个主标签时,才会运行扫描:full-sweep-fail-fast(强烈推荐;canary 加逐矩阵 fail-fast)、full-sweep-enabled(有 canary;矩阵任务在失败后继续运行)或 non-canary-full-sweep-enabled(无 canary,也无 fail-fast)。修饰标签 all-evals、evals-only 和 agentx-fast 必须与主标签一起使用。fork PR 的标签由维护者添加。参见扫描标签与复用。
  • **合并后:**PR 作者必须确保所有 GitHub Actions 任务通过。临时性失败通常可以通过重新运行恢复;参见重新运行失败任务的说明。

@adibarra
adibarra added this pull request to stack #3808 October 8, 2026 14:35
@adibarra
adibarra force-pushed the refactor/srt-agentx-compose branch from 367e3fb to dc4671c Compare October 8, 2026 16:03
@adibarra
adibarra force-pushed the refactor/srt-agentx-compose branch from dc4671c to 752cb98 Compare October 8, 2026 16:25
@adibarra
adibarra force-pushed the refactor/srt-agentx-compose branch 2 times, most recently from 5f3fd28 to d2ce3a3 Compare October 9, 2026 17:47
@adibarra
adibarra force-pushed the refactor/srt-agentx-compose branch 2 times, most recently from a3c209a to 8c01db9 Compare October 9, 2026 23:43
@adibarra
adibarra force-pushed the refactor/srt-agentx-compose branch from 8c01db9 to d0a5aac Compare October 10, 2026 07:51
@adibarra
adibarra force-pushed the refactor/srt-agentx-compose branch from d0a5aac to 524fa70 Compare October 10, 2026 13:38
@adibarra
adibarra force-pushed the refactor/srt-agentx-compose branch from 524fa70 to c9e1037 Compare October 12, 2026 08:02
… master rows

AgentX recipes, single- and multi-node, become fragments like the
fixed-sequence ones. configs/srt-recipes/agentic-{single,multi}.yaml supply
the client command; the binder writes the master model, image, precision and
identity, and the launcher hands multi-node clients RESULT_DIR,
AIPERF_DATASET_MMAP_CACHE_DIR and HF_HUB_CACHE from the volumes it mounts
(agentic-volume-mounts replaces lanes._AGENTIC_CACHES). Dead keys and copies
of the workflow environment leave the fragments; a fragment that sets a bound
key fails before submission.

A multinode search-space row with power: true replaces recipe telemetry
blocks: the shared telemetry-dcgm.yaml is merged with the cluster's
power-exporter-port and benchmark.concurrencies is bound after variant
selection, so bundles can measure power. POWER_LANES now judges the row's
field instead of reading recipe text, and inject_concurrencies is gone.

Selected zip variants drop null-valued keys as srtctl apply does, and
h200-dgxc GLM-5.2 FP8 AgentX keeps serving the Hub snapshot.
infx generate now binds every srt-slurm point of the selected keys, AgentX
as well as fixed-sequence, single- and multi-node, through the binder the
launcher runs. The workflow environment it reproduces gains the AgentX
inputs (IS_AGENTIC, KV_OFFLOADING, TOTAL_CPU_DRAM_GB, THINKING_MODE) and the
multi-node request fields.

A multi-node point takes the binder inputs the launcher derives from the one
cluster its runner label schedules on: launch_path, the lane's POWER_LANES
decision and the cluster's power-exporter-port give the DCGM telemetry block
and bound concurrencies, and config.agentic_client_env, which no longer needs
an SrtRun, gives the AgentX client paths. Such a point fails when its label
spans several clusters or the lane refuses its power. The manifest records
the cluster.
…gment

so binding it fails on its model block and benchmark MODEL. Like the other
AgentX fragments it drops them, the client command its shared block supplies,
and WEKA_LOADER_OVERRIDE, which names the corpus dsv41flash replays by
default. Every point binds to main's selected variant without that override.
Recipes copied the matrix total-cpu-dram-gb into TOTAL_CPU_DRAM_GB and
hardcoded the host KV pools derived from it, so the single-node launcher had
to check the copies against the matrix. The binder now writes KV_OFFLOADING
and, for DRAM points, TOTAL_CPU_DRAM_GB from the point, and replaces whole
'@dram.<name>' values (total-gb, total-bytes, per-gpu-gb, per-gpu-bytes)
with the budget, in total or over the GPUs it covers on a node; multi-node
points take the cluster's gpus-per-node from the launcher.

Recipes drop their budget copies and size vLLM SimpleCPU, LMCache, Mooncake,
TRT-LLM host cache and formula-derived HiCache pools with references; the
binder rejects literal SimpleCPU and LMCache sizes, and the recipe==matrix
budget check is gone. Configs whose pools followed model-specific formulas,
or whose dram-utilization stood in for one rank's pool, get a utilization
that keeps those pools. Mooncake segments become bytes of the decimal budget,
since vLLM reads "GB" as GiB.

The Qwen3.5 MI355X FP8 CONC 64-80 HiCache pools (4 x 400 GB) and the
MiniMax-M3 B300 TRT-LLM TP2/TP4 host caches (~388.6 GB per rank) exceeded
the 3 TB policy share of their GPUs; they now take the per-GPU budget at
dram-utilization 1.0 (374 GB and 374.5/374.75 GB per rank).
…ll pools from the DRAM budget

#3659 and #3187 hardcode host pools that follow the point's DRAM budget: the
GLM-5.2 GB300 SGLang AgentX HiCache pool (135 GB per rank) and the DSv4 GB300
prefill Mooncake segment (140gb, which Mooncake reads as GiB). They now take
'@dram.per-gpu-gb' and '@dram.per-gpu-bytes', and dram-utilization moves to
0.6 (135 GB per GPU, unchanged) and 0.6664 (150.25 GB per GPU, 74 MB under
140 GiB). The DSv4 decode stores sit on decode nodes the budget does not cover
and keep their 180gb.
The multi-node binder reads IS_AGENTIC instead of defaulting a missing value to fixed-sequence, model_paths drops a guard the binder makes redundant, the fragment check names the single-node variant case once, and RECIPES.md points at the bound-key tables instead of copying them and drops restated history.
select_recipe binds each variant before validate_recipe sees it, and the
binder writes model.path, model.container, model.precision and
benchmark.env.MODEL from the same environment, so those four comparisons
can never fail. infx generate set KV_OFFLOADING and TOTAL_CPU_DRAM_GB to
empty or zero placeholders for fixed-sequence points that nothing reads;
it now sets them only for AgentX points.
The launcher and infx generate each derived the DCGM exporter port and
the AgentX client paths from the cluster, lane, request and power
decision, and infx generate must match the launcher. Both now call
config.binder_inputs. infx generate imports the launcher modules at the
top: they import nothing that imports it back.
… docstrings

The DRAM literal check and resolve_dram parsed '{'-prefixed strings the
same way; _json_object does it for both. resolve_dram's prefix check was
redundant: a value without the '@dram.' prefix still contains it and so
names no budget field. bind_workload and generate_recipes no longer list
what their callees write.
…r tests

The bound AgentX client test asserted values it passed in; the CLI
test's DRAM, power and client-env tail repeated the srt driver tests that
run the same module with those flags; the TRT-LLM host cache case took
the same path as the Mooncake one; a conditional assertion re-checked a
non-DRAM point; infx generate's DRAM test re-asserted the matrix budget.
The fragment-rejection tests no longer pin the explanatory suffix, and
an unused constant goes.
RECIPES.md states the DRAM reference rules and the
infx generate binder inputs in fewer words and drops a sentence the
power-row table already makes. CONFIGS.md puts mounts back beside
volume-mounts, which it describes. The DSv4 ATOM LMCache comment
explained a literal the DRAM reference replaced, and the GLM-5.2 GB200
power comment moves onto the power field.
Recipes may no longer set model.container, identity.container.image or
telemetry.enabled, yet the Klaud prompt and docs still asked for matching
images, nuke.md still ran a script that rewrites model.container (it now
fails on every recipe), and the power docs still gated energy collection
on recipe telemetry. They now say the binder writes the master image and
a power: true master row enables DCGM telemetry.
…fragments

#3816, #3840 and #3744 added full recipes: the Qwen3.8 GB300 and Qwen3.5
GB300 DEP16 recipes carry model blocks, the client command, benchmark MODEL,
TOTAL_CPU_DRAM_GB, KV_OFFLOADING and the client paths the launcher hands
multi-node points, and both new recipes and the DSv4.1-Flash B300 one set the
identity repo and image the binder writes. Like the other AgentX fragments
they drop them, and WEKA_LOADER_OVERRIDE, which names both models' default
corpus.

The Qwen3.8 HiCache pool was the 225 GB matrix allowance less 1 GB of
alignment headroom; it now takes '@dram.per-gpu-gb' and the entry's
dram-utilization drops from 1.0 to 0.995, so the pool stays 224 GB and the
bound TOTAL_CPU_DRAM_GB is 224. Each point otherwise binds to main's
selected variant, with the Qwen3.5 model alias bound as its Hub id like the
other GB300 Qwen3.5 AgentX points.
…RAM budget

Main's C256 and C384 points of dsv4-fp4-mi355x-atom-agentic-mtp start an
LMCache MP server with a literal 1000 GB L1 and set TOTAL_CPU_DRAM_GB 1019
(dram-utilization 0.34). The L1 now takes '@dram.total-gb' and the binder
writes TOTAL_CPU_DRAM_GB. dram-utilization 0.3334 makes the budget 1000 GB,
so the bound L1 stays 1000 GB.

ATOM's lmcache.mp.max_pinned_state_bytes keeps its literal 1000000000000:
srtctl needs the extra-config JSON brace-doubled, and the binder resolves no
reference inside it.
@adibarra
adibarra force-pushed the refactor/srt-agentx-compose branch from c9e1037 to b967a07 Compare October 12, 2026 10:22

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

1 participant