Fix action-aware burn-in gate
This commit is contained in:
@@ -201,6 +201,32 @@ def main() -> None:
|
||||
"--max-num-batched-tokens 2048"
|
||||
in revised_plan["sessions"][0]["commands"]["server"]
|
||||
)
|
||||
accepted_burnin = {
|
||||
"kind": "anchor",
|
||||
"selection": {"count": 510},
|
||||
"interval": {"elapsed_s": 61.25},
|
||||
"pass_rate": 0.5,
|
||||
"feasible": False,
|
||||
}
|
||||
assert controller.burnin_gate(
|
||||
accepted_burnin, expected_count=510, maximum_elapsed_s=90.0
|
||||
)["elapsed_s"] == 61.25
|
||||
warmup = copy.deepcopy(accepted_burnin)
|
||||
warmup["kind"] = "warmup"
|
||||
try:
|
||||
controller.burnin_gate(warmup, expected_count=510, maximum_elapsed_s=90.0)
|
||||
except RuntimeError as error:
|
||||
assert "non-anchor" in str(error)
|
||||
else:
|
||||
raise AssertionError("warmup incorrectly passed the burnin gate")
|
||||
slow = copy.deepcopy(accepted_burnin)
|
||||
slow["interval"]["elapsed_s"] = 91.0
|
||||
try:
|
||||
controller.burnin_gate(slow, expected_count=510, maximum_elapsed_s=90.0)
|
||||
except RuntimeError as error:
|
||||
assert "throughput gate failed" in str(error)
|
||||
else:
|
||||
raise AssertionError("slow burnin incorrectly passed the throughput gate")
|
||||
print("action-aware constraint pilot: PASS")
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user