From 65c8ce85275dff63c2ae24d523da59efb55f4ca7 Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Wed, 21 Oct 2026 06:49:14 +0000 Subject: [PATCH] chore(cookbook): resume regular profiling pass from a batch boundary Co-Authored-By: bot_apk --- .../profiling/invocations/run_regular_pass.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cookbook/capability_routing_pilot/profiling/invocations/run_regular_pass.py b/cookbook/capability_routing_pilot/profiling/invocations/run_regular_pass.py index c39b5ec4b2f..39c43058815 100644 --- a/cookbook/capability_routing_pilot/profiling/invocations/run_regular_pass.py +++ b/cookbook/capability_routing_pilot/profiling/invocations/run_regular_pass.py @@ -29,7 +29,10 @@ from poc.run_profiling import ( def main() -> None: config: Final = ProfileConfig(ROOT, (ROOT / "profiling" / "profiling_manifest.json" if (ROOT / "profiling" / "profiling_manifest.json").exists() else ROOT / "profiling_manifest.json"), MANIFEST_SHA256, PUBLIC_DEV_TENANT) - batches: Final = profile_batches(config)[1:] + first_batch: Final = int(sys.argv[sys.argv.index("--from-batch") + 1]) if "--from-batch" in sys.argv else 2 + if first_batch < 2: + raise ValueError("batch 1 is complete and must not be replayed") + batches: Final = tuple(b for b in profile_batches(config)[1:] if b.index >= first_batch) if "--execute" not in sys.argv: print(json.dumps([{"batch": b.index, "tasks": [[t.task_id, t.model_order] for t in b.tasks]} for b in batches])) return