From 3d813d529ee618604cfbaf282cc644acd79e7de5 Mon Sep 17 00:00:00 2001 From: SoftFever Date: Wed, 3 Jun 2026 20:20:25 +0800 Subject: [PATCH] docs(automation): example_slice.py loads model at runtime via file.open --- tools/automation/example_slice.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tools/automation/example_slice.py b/tools/automation/example_slice.py index 999bfbfc48..384dcb4cfb 100644 --- a/tools/automation/example_slice.py +++ b/tools/automation/example_slice.py @@ -27,7 +27,6 @@ def main() -> int: args.orca, "--automation-server", f"--automation-server-port={args.port}", - args.model, ]) try: orca = OrcaClient(port=args.port) @@ -43,7 +42,10 @@ def main() -> int: print("ERROR: automation server did not start", file=sys.stderr) return 1 - # Wait until the project (model) is loaded. + # Load the model into the already-running instance, then wait until the + # project reports loaded. file.open is synchronous, so project_loaded is + # already true on return; the wait is a belt-and-suspenders guard. + orca.open([args.model]) deadline = time.time() + 30 while time.time() < deadline: if orca.app_state().get("project_loaded"):