experiment: add parallel workload simulator sweep

This commit is contained in:
2026-07-20 17:54:20 +08:00
parent b302954dcb
commit 3453fbe522
3 changed files with 150 additions and 0 deletions

View File

@@ -107,6 +107,11 @@ def parse_args() -> argparse.Namespace:
)
parser.add_argument("--resume", action="store_true")
parser.add_argument("--continue-on-failure", action="store_true")
parser.add_argument(
"--store-stage-batch-ledger",
action="store_true",
help="Persist Frontier's per-stage batch/state ledger for diagnosis.",
)
return parser.parse_args()
@@ -315,6 +320,17 @@ def classify_frontier_failure(stderr: str) -> str:
return "frontier_error"
def configure_stage_batch_ledger(command: list[str], *, enabled: bool) -> list[str]:
if not enabled:
return command
disabled = "--no-metrics_config_store_frontier_stage_batch_ledger"
enabled_flag = "--metrics_config_store_frontier_stage_batch_ledger"
if command.count(disabled) != 1 or enabled_flag in command:
raise ValueError("unexpected stage-batch-ledger command contract")
command[command.index(disabled)] = enabled_flag
return command
def score(path: Path, expected_shapes: list[tuple[int, int]]) -> dict[str, Any]:
with path.open(newline="") as source:
rows = list(csv.DictReader(source))
@@ -592,6 +608,9 @@ def main() -> None:
str(args.predictor_training_job_threads),
]
)
command = configure_stage_batch_ledger(
command, enabled=args.store_stage_batch_ledger
)
if args.align_real_graph_runtime:
command.extend(
[
@@ -803,6 +822,7 @@ def main() -> None:
"prefix_caching": args.prefix_caching,
"arrival": "original_trace_timestamp_and_order",
"input_output": "exact_source_values",
"store_stage_batch_ledger": args.store_stage_batch_ledger,
"ttft_slo": "1000ms + 1000ms * input_tokens / 8000",
"tpot_slos_ms": TPOT_SLOS_MS,
"primary_tpot_slo_ms": 150.0,