From 922417a9d5c951693aaf9de23aeaa7f270d12054 Mon Sep 17 00:00:00 2001 From: Francesco Di Natale <3429989+FrankD412@users.noreply.github.com> Date: Sun, 18 Oct 2026 16:45:36 -0700 Subject: [PATCH] feat(agentic): pass AIPERF_SLICE_DURATION to agentx profile MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Recipes can now set the aiperf timeslice width through benchmark.env.AIPERF_SLICE_DURATION, which becomes `agentx profile --slice-duration `. Unset leaves the scenario default and the command line unchanged. 中文:新增 AIPERF_SLICE_DURATION,并将其传递给 agentx profile。配方可通过 benchmark.env.AIPERF_SLICE_DURATION 设置 aiperf 时间切片宽度,对应 `agentx profile --slice-duration `。未设置时保留场景默认值,命令行不变。 --- inferencex-e2e/infx/bench/agentic/replay.py | 5 +++++ inferencex-e2e/infx/tests/bench/test_agentic_replay.py | 2 ++ 2 files changed, 7 insertions(+) diff --git a/inferencex-e2e/infx/bench/agentic/replay.py b/inferencex-e2e/infx/bench/agentic/replay.py index 221677330d..a78787d8a7 100644 --- a/inferencex-e2e/infx/bench/agentic/replay.py +++ b/inferencex-e2e/infx/bench/agentic/replay.py @@ -52,6 +52,8 @@ class ReplayConfig: dataset: str apply_chat_template: bool benchmark_grace_period: str | None + slice_duration: str | None + """``AIPERF_SLICE_DURATION``: timeslice width in seconds; unset leaves the scenario default.""" @classmethod def from_env(cls, env: Mapping[str, str], result_dir: Path) -> ReplayConfig: @@ -98,6 +100,7 @@ def from_env(cls, env: Mapping[str, str], result_dir: Path) -> ReplayConfig: dataset=dataset, apply_chat_template=env.get("AIPERF_APPLY_CHAT_TEMPLATE") == "true", benchmark_grace_period=inputs.optional("AIPERF_BENCHMARK_GRACE_PERIOD", env), + slice_duration=inputs.optional("AIPERF_SLICE_DURATION", env), ) @@ -164,4 +167,6 @@ def replay_argv(cfg: ReplayConfig, cli: str | Path) -> list[str]: argv.append("--apply-chat-template") if cfg.benchmark_grace_period is not None: argv += ["--benchmark-grace-period", cfg.benchmark_grace_period] + if cfg.slice_duration is not None: + argv += ["--slice-duration", cfg.slice_duration] return argv diff --git a/inferencex-e2e/infx/tests/bench/test_agentic_replay.py b/inferencex-e2e/infx/tests/bench/test_agentic_replay.py index e3f7a1c847..1cbe8b28ee 100644 --- a/inferencex-e2e/infx/tests/bench/test_agentic_replay.py +++ b/inferencex-e2e/infx/tests/bench/test_agentic_replay.py @@ -62,6 +62,7 @@ def test_opt_in_inputs_add_their_flags_in_place(): WEKA_LOADER_OVERRIDE=traces.UNCAPPED, AIPERF_APPLY_CHAT_TEMPLATE="true", AIPERF_BENCHMARK_GRACE_PERIOD="1800", + AIPERF_SLICE_DURATION="3600", ) assert argv == [ @@ -77,6 +78,7 @@ def test_opt_in_inputs_add_their_flags_in_place(): "--output-artifact-dir", "/results/aiperf_artifacts", "--public-dataset", traces.UNCAPPED, "--apply-chat-template", "--benchmark-grace-period", "1800", + "--slice-duration", "3600", ] # fmt: skip