Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions inferencex-e2e/infx/bench/agentic/replay.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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),
)


Expand Down Expand Up @@ -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
2 changes: 2 additions & 0 deletions inferencex-e2e/infx/tests/bench/test_agentic_replay.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 == [
Expand All @@ -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


Expand Down