Fix prefix pilot warmup validation
This commit is contained in:
@@ -78,6 +78,57 @@ def main() -> None:
|
||||
) + controller.SAFETY_H20_HOURS,
|
||||
3.0,
|
||||
)
|
||||
selection = {
|
||||
"selected_count": 122,
|
||||
"request_id_order_sha256": "request-hash",
|
||||
"arrival_order_sha256": "arrival-hash",
|
||||
"input_length_order_sha256": "length-hash",
|
||||
}
|
||||
warmup = {
|
||||
"kind": "warmup",
|
||||
"selection": {"count": 16},
|
||||
"invariants": {
|
||||
"warmup_16": True,
|
||||
"warmup_exact_16": True,
|
||||
"warmup_long": True,
|
||||
},
|
||||
}
|
||||
controller.validate_result_selection(
|
||||
result=warmup,
|
||||
selection=selection,
|
||||
cell="tp1_mns8",
|
||||
role="burnin",
|
||||
warmup=True,
|
||||
)
|
||||
measured = {
|
||||
"kind": "anchor",
|
||||
"selection": {
|
||||
"count": 122,
|
||||
"request_id_order_sha256": "request-hash",
|
||||
"arrival_order_sha256": "arrival-hash",
|
||||
"raw_length_order_sha256": "length-hash",
|
||||
},
|
||||
"invariants": {},
|
||||
}
|
||||
controller.validate_result_selection(
|
||||
result=measured,
|
||||
selection=selection,
|
||||
cell="tp1_mns8",
|
||||
role="low1",
|
||||
warmup=False,
|
||||
)
|
||||
try:
|
||||
controller.validate_result_selection(
|
||||
result=warmup,
|
||||
selection=selection,
|
||||
cell="tp1_mns8",
|
||||
role="low1",
|
||||
warmup=False,
|
||||
)
|
||||
except RuntimeError as error:
|
||||
assert "selection count mismatch" in str(error)
|
||||
else:
|
||||
raise AssertionError("measured selection accepted a warmup subset")
|
||||
print("fidelity pilot tools: PASS")
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user