(args: argparse.Namespace)
| 769 | |
| 770 | |
| 771 | def cmd_workflow_run_start(args: argparse.Namespace) -> int: |
| 772 | base_url = args.base_url.rstrip("/") |
| 773 | _require_health(base_url, args.request_timeout) |
| 774 | image_path = Path(args.image).expanduser().resolve() |
| 775 | if not image_path.exists() or not image_path.is_file(): |
| 776 | raise ModlyCliError(f"image file not found: {image_path}", code="IMAGE_NOT_FOUND") |
| 777 | model_id = _resolve_model_id(args, base_url) |
| 778 | params = _canonical_generation_params(args) |
| 779 | run_id, status, rel_path = _run_workflow_run(args, image_path, base_url=base_url, model_id=model_id, params=params, wait=getattr(args, "wait", False)) |
| 780 | payload: dict[str, Any] = { |
| 781 | "ok": True, |
| 782 | "base_url": base_url, |
| 783 | "image": str(image_path), |
| 784 | "model_id": model_id, |
| 785 | "run": {"kind": "workflowRun", "id": run_id}, |
| 786 | "status": status, |
| 787 | "meta": _recovery_meta(base_url, run_id), |
| 788 | } |
| 789 | if rel_path: |
| 790 | payload["workspace_path"] = rel_path |
| 791 | _json_print(payload, compact=args.compact) |
| 792 | return 0 |
| 793 | |
| 794 | |
| 795 | def cmd_workflow_run_status(args: argparse.Namespace) -> int: |
nothing calls this directly
no test coverage detected