Skip to content

Commit 3d77dd3

Browse files
committed
make agentic warmup limits exclusive
Signed-off-by: Cam Quilici <cjquilici@gmail.com>
1 parent 8e91187 commit 3d77dd3

16 files changed

Lines changed: 205 additions & 131 deletions

File tree

docs/cli-options.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1125,12 +1125,12 @@ The maximum duration in seconds for the warmup phase. If not set, it will use th
11251125

11261126
#### `--agentic-cache-warmup-duration` `<float>`
11271127

1128-
Additional agentic replay warmup duration in seconds. After the normal snapshot warmup drains, AIPerf continues the live trajectories without recorded idle delays and with one-token outputs, then drains and resumes profiling from the resulting trajectory state using each live stream's residual next-turn delay.
1128+
Additional agentic replay warmup duration in seconds. After the normal snapshot warmup drains, AIPerf continues the live trajectories without recorded idle delays and with one-token outputs, then drains and resumes profiling from the resulting trajectory state using each live stream's residual next-turn delay. Mutually exclusive with --warmup-requests-per-lane.
11291129
<br/>_Constraints: > 0_
11301130

11311131
#### `--warmup-requests-per-lane` `<int>`
11321132

1133-
Deterministic agentic cache-pressure warmup request budget per concurrency lane. For example, 10 with concurrency 16 caps warmup at 160 wire requests, including initial snapshot priming. Requires --agentic-cache-warmup-duration, which remains the safety deadline.
1133+
Deterministic agentic cache-pressure warmup request budget per concurrency lane. For example, 10 with concurrency 16 caps warmup at 160 wire requests, including initial snapshot priming. Mutually exclusive with --agentic-cache-warmup-duration.
11341134
<br/>_Constraints: > 0_
11351135

11361136
#### `--agentic-warmup-grace-period` `<float>`
@@ -2660,12 +2660,12 @@ The maximum duration in seconds for the warmup phase. If not set, it will use th
26602660

26612661
#### `--agentic-cache-warmup-duration` `<float>`
26622662

2663-
Additional agentic replay warmup duration in seconds. After the normal snapshot warmup drains, AIPerf continues the live trajectories without recorded idle delays and with one-token outputs, then drains and resumes profiling from the resulting trajectory state using each live stream's residual next-turn delay.
2663+
Additional agentic replay warmup duration in seconds. After the normal snapshot warmup drains, AIPerf continues the live trajectories without recorded idle delays and with one-token outputs, then drains and resumes profiling from the resulting trajectory state using each live stream's residual next-turn delay. Mutually exclusive with --warmup-requests-per-lane.
26642664
<br/>_Constraints: > 0_
26652665

26662666
#### `--warmup-requests-per-lane` `<int>`
26672667

2668-
Deterministic agentic cache-pressure warmup request budget per concurrency lane. For example, 10 with concurrency 16 caps warmup at 160 wire requests, including initial snapshot priming. Requires --agentic-cache-warmup-duration, which remains the safety deadline.
2668+
Deterministic agentic cache-pressure warmup request budget per concurrency lane. For example, 10 with concurrency 16 caps warmup at 160 wire requests, including initial snapshot priming. Mutually exclusive with --agentic-cache-warmup-duration.
26692669
<br/>_Constraints: > 0_
26702670

26712671
#### `--agentic-warmup-grace-period` `<float>`

docs/tutorials/agentx-mvp.md

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -417,15 +417,16 @@ duration expires, it stops issuing new requests, drains requests already on
417417
the wire, snapshots each live root, subagent, and unresolved join, and starts
418418
profiling from that exact state.
419419

420-
For repeatable warmup depth, also set
421-
`--warmup-requests-per-lane REQUESTS`. Each concurrency lane is
422-
then allowed exactly that many warmup wire requests, including its initial
423-
snapshot-priming requests. For example, `--concurrency 16` with
424-
`--warmup-requests-per-lane 10` targets 160 warmup requests,
425-
with a strict 10-request quota on every lane. The duration is still required as
426-
a safety deadline: issuance stops at the per-lane quotas or the duration,
427-
whichever comes first. If the duration wins, a slow run sends fewer than the
428-
configured request budget.
420+
For repeatable warmup depth, use
421+
`--warmup-requests-per-lane REQUESTS` instead. Each concurrency lane is allowed
422+
exactly that many warmup wire requests, including its initial snapshot-priming
423+
requests. For example, `--concurrency 16` with
424+
`--warmup-requests-per-lane 10` produces 160 warmup requests, with a strict
425+
10-request quota on every lane.
426+
427+
`--agentic-cache-warmup-duration` and `--warmup-requests-per-lane` are mutually
428+
exclusive: choose a time-bounded warmup or a deterministic request-bounded
429+
warmup.
429430

430431
These requests remain part of warmup, so they are excluded from exported
431432
request metrics.

src/aiperf/config/config.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -609,8 +609,8 @@ def validate_cache_bust_compatibility(self) -> Self:
609609
def validate_agentic_cache_warmup(self) -> Self:
610610
"""Restrict accelerated cache warmup to the agentic_replay timing mode.
611611
612-
``--agentic-cache-warmup-duration`` and its optional deterministic
613-
request budget are consumed solely by
612+
The mutually exclusive duration and deterministic request-budget modes
613+
are consumed solely by
614614
``aiperf.timing.config._build_agentic_warmup_config``, which only runs
615615
when the profiling phases resolve to AGENTIC_REPLAY. On any other run
616616
the value is silently dropped, so an unguarded flag is a no-op the user
@@ -644,12 +644,12 @@ def validate_agentic_cache_warmup(self) -> Self:
644644

645645
if any(
646646
getattr(phase, "warmup_requests_per_lane", None) is not None
647-
and getattr(phase, "agentic_cache_warmup_duration", None) is None
647+
and getattr(phase, "agentic_cache_warmup_duration", None) is not None
648648
for phase in profiling_phases
649649
):
650650
raise ValueError(
651-
"--warmup-requests-per-lane requires "
652-
"--agentic-cache-warmup-duration as a safety deadline."
651+
"--warmup-requests-per-lane and "
652+
"--agentic-cache-warmup-duration are mutually exclusive."
653653
)
654654

655655
if self.scenario is not None:

src/aiperf/config/flags/cli_config.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2280,7 +2280,8 @@ def url(self) -> str:
22802280
"After the normal snapshot warmup drains, AIPerf continues the live "
22812281
"trajectories without recorded idle delays and with one-token outputs, "
22822282
"then drains and resumes profiling from the resulting trajectory state "
2283-
"using each live stream's residual next-turn delay.",
2283+
"using each live stream's residual next-turn delay. Mutually exclusive "
2284+
"with --warmup-requests-per-lane.",
22842285
),
22852286
CLIParameter(
22862287
name=("--agentic-cache-warmup-duration",),
@@ -2295,8 +2296,8 @@ def url(self) -> str:
22952296
description="Deterministic agentic cache-pressure warmup request "
22962297
"budget per concurrency lane. For example, 10 with concurrency 16 "
22972298
"caps warmup at 160 wire requests, including initial snapshot "
2298-
"priming. Requires --agentic-cache-warmup-duration, which remains "
2299-
"the safety deadline.",
2299+
"priming. Mutually exclusive with "
2300+
"--agentic-cache-warmup-duration.",
23002301
),
23012302
CLIParameter(
23022303
name=("--warmup-requests-per-lane",),

src/aiperf/config/phases.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,8 @@ class BasePhaseConfig(AdaptiveScalePhaseMixin, BaseConfig):
360360
"continues the live trajectories without recorded idle delays and with "
361361
"one-token outputs for this long, then drains and resumes profiling "
362362
"from the resulting trajectory state. Read off the profiling phase by "
363-
"``timing.config._build_agentic_warmup_config``. None disables it.",
363+
"``timing.config._build_agentic_warmup_config``. Mutually exclusive "
364+
"with warmup_requests_per_lane. None disables it.",
364365
),
365366
]
366367

@@ -373,8 +374,7 @@ class BasePhaseConfig(AdaptiveScalePhaseMixin, BaseConfig):
373374
"warmup request budget per concurrency lane. The total warmup "
374375
"wire-request cap is this value multiplied by the number of live "
375376
"trajectory lanes, including the initial snapshot-priming "
376-
"requests. Requires agentic_cache_warmup_duration, which remains "
377-
"the safety deadline; warmup stops when either limit is reached.",
377+
"requests. Mutually exclusive with agentic_cache_warmup_duration.",
378378
),
379379
]
380380

0 commit comments

Comments
 (0)