From b43dbc1edb940599e57cdbdb944014905d62e86a Mon Sep 17 00:00:00 2001 From: eust-w Date: Wed, 26 Aug 2026 20:51:01 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20Move=20Fanyu=20WiLoR=20runtime=20to?= =?UTF-8?q?=20L20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../builtin/wilor_hand_pose/operator.py | 2 +- docs/operators/WiLoR-3D手部姿态估计.md | 18 +++++++++--------- internal/api/builtin_operators_catalog.json | 12 ++++++------ internal/api/fanyu_template.go | 5 +++++ internal/api/fanyu_template_test.go | 4 ++++ .../wilor_hand_pose/runtime_contract.json | 4 ++-- .../builtin/wilor_hand_pose/src/operator.py | 2 +- scripts/generate_operator_images.py | 5 ++++- .../generate_operator_repository_manifests.py | 2 +- .../backend/operator_repository_layout_test.py | 8 ++++++-- 10 files changed, 39 insertions(+), 23 deletions(-) diff --git a/backend/operators/builtin/wilor_hand_pose/operator.py b/backend/operators/builtin/wilor_hand_pose/operator.py index 960814b1..4f9a0f1c 100644 --- a/backend/operators/builtin/wilor_hand_pose/operator.py +++ b/backend/operators/builtin/wilor_hand_pose/operator.py @@ -12,7 +12,7 @@ from typing import Any from urllib import error, parse, request -DEFAULT_WILOR_API_BASE_URL = "http://120.48.65.232" +DEFAULT_WILOR_API_BASE_URL = "http://droboticflow-wilor:8080" DEFAULT_SERVICE_IMAGE = "ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/custom-operators/wilor-inference:f3a4957-gpu-20260703172135" DEFAULT_SERVICE_IMAGE_ID = ( "ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/custom-operators/" diff --git a/docs/operators/WiLoR-3D手部姿态估计.md b/docs/operators/WiLoR-3D手部姿态估计.md index 4158fdff..174da53f 100644 --- a/docs/operators/WiLoR-3D手部姿态估计.md +++ b/docs/operators/WiLoR-3D手部姿态估计.md @@ -15,7 +15,7 @@ ## 平台语义 -WiLoR 3D 手部姿态估计算子;读取图片或视频 URL/上游媒体 artifact,调用已部署的 WiLoR GPU 服务,输出标注图或标注视频、关键点 JSON、mesh OBJ 和服务端 CUDA/A800 运行证据。 +WiLoR 3D 手部姿态估计算子;读取上游媒体 artifact,调用 Fanyu 集群内的 WiLoR L20 服务,输出标注图或标注视频、关键点 JSON、mesh OBJ 和服务端 CUDA/L20 运行证据。 ## 运行时契约 @@ -48,8 +48,8 @@ flowchart LR ## 关键超参数 -- `WILOR_API_BASE_URL`:类型 `string`,默认值 `http://120.48.65.232`。WiLoR 推理服务地址 可直接使用默认值,也可在节点级覆盖。 -- `INPUT_URL`:类型 `string`,默认值 `http://120.48.65.232/examples/sample-hands.png`。输入图片或视频 URL;为空时读取上游媒体 artifact 可直接使用默认值,也可在节点级覆盖。 +- `WILOR_API_BASE_URL`:类型 `string`,默认值 `http://droboticflow-wilor:8080`。Fanyu 集群内 WiLoR L20 推理服务地址。 +- `INPUT_URL`:默认留空,生产从上游媒体 artifact 读取真实视频;仅独立诊断时显式填写 URL。 - `INPUT_PATH`:类型 `string`,默认值 空字符串或由工作流显式填写。输入媒体在 runner 容器内的本地路径;优先级低于 INPUT_URL 通常建议在工作流中显式配置。 - `MEDIA_KIND`:类型 `string`,默认值 `auto`。媒体类型,auto/image/video 可直接使用默认值,也可在节点级覆盖。 - `HAND_CONFIDENCE`:类型 `number`,默认值 `0.30`。手部检测置信度阈值,范围 0.05-0.95 可直接使用默认值,也可在节点级覆盖。 @@ -59,8 +59,8 @@ flowchart LR - `MAX_FRAMES`:类型 `integer`,默认值 `120`。视频最多采样帧数 可直接使用默认值,也可在节点级覆盖。 - `DOWNLOAD_OUTPUTS`:类型 `boolean`,默认值 `true`。是否下载 WiLoR 返回的标注媒体和 JSON 文件 可直接使用默认值,也可在节点级覆盖。 - `REQUEST_TIMEOUT_SECONDS`:类型 `integer`,默认值 `300`。单次 API 请求超时时间,单位秒 可直接使用默认值,也可在节点级覆盖。 -- `WILOR_SERVICE_IMAGE`:类型 `string`,默认值 `ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/custom-operators/wilor-inference:f3a4957-gpu-20260703172135`。WiLoR GPU 服务镜像 tag,仅用于运行证据记录 可直接使用默认值,也可在节点级覆盖。 -- `WILOR_SERVICE_IMAGE_ID`:类型 `string`,默认值 `ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/custom-operators/wilor-inference@sha256:be8369126716ad63ea62a93c8bc3e56425a5370cd77144e32b74254f1ff33055`。WiLoR GPU 服务 digest-pinned imageId,仅用于运行证据记录 可直接使用默认值,也可在节点级覆盖。 +- `WILOR_SERVICE_IMAGE`:Fanyu CCR 中的 WiLoR L20 服务镜像 tag,仅用于运行证据记录。 +- `WILOR_SERVICE_IMAGE_ID`:Fanyu CCR 中固定到 digest 的 WiLoR L20 服务 imageId。 ## 执行前准备 @@ -86,8 +86,8 @@ flowchart LR "type": "builtin", "category": "AI", "hyperparams": { - "WILOR_API_BASE_URL": "http://120.48.65.232", - "INPUT_URL": "http://120.48.65.232/examples/sample-hands.png", + "WILOR_API_BASE_URL": "http://droboticflow-wilor:8080", + "INPUT_URL": "", "INPUT_PATH": "<按节点填写>", "MEDIA_KIND": "auto", "HAND_CONFIDENCE": "0.30", @@ -97,8 +97,8 @@ flowchart LR "MAX_FRAMES": "120", "DOWNLOAD_OUTPUTS": "true", "REQUEST_TIMEOUT_SECONDS": "300", - "WILOR_SERVICE_IMAGE": "ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/custom-operators/wilor-inference:f3a4957-gpu-20260703172135", - "WILOR_SERVICE_IMAGE_ID": "ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/custom-operators/wilor-inference@sha256:be8369126716ad63ea62a93c8bc3e56425a5370cd77144e32b74254f1ff33055" + "WILOR_SERVICE_IMAGE": "ccr-29eug8s3-pub.cnc.bj.baidubce.com/fanyu/droboticflow-wilor-service:f3a4957-fanyu-l20-20260826", + "WILOR_SERVICE_IMAGE_ID": "ccr-29eug8s3-pub.cnc.bj.baidubce.com/fanyu/droboticflow-wilor-service@sha256:be8369126716ad63ea62a93c8bc3e56425a5370cd77144e32b74254f1ff33055" } } ``` diff --git a/internal/api/builtin_operators_catalog.json b/internal/api/builtin_operators_catalog.json index c1e93488..c8bbed76 100644 --- a/internal/api/builtin_operators_catalog.json +++ b/internal/api/builtin_operators_catalog.json @@ -12877,13 +12877,13 @@ "description": "WiLoR 推理服务地址", "key": "WILOR_API_BASE_URL", "type": "string", - "value": "http://120.48.65.232" + "value": "http://droboticflow-wilor:8080" }, { "description": "输入图片或视频 URL;为空时读取上游媒体 artifact", "key": "INPUT_URL", "type": "string", - "value": "http://120.48.65.232/examples/sample-hands.png" + "value": "" }, { "description": "输入媒体在 runner 容器内的本地路径;优先级低于 INPUT_URL", @@ -12955,13 +12955,13 @@ "description": "WiLoR GPU 服务镜像 tag,仅用于运行证据记录", "key": "WILOR_SERVICE_IMAGE", "type": "string", - "value": "ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/custom-operators/wilor-inference:f3a4957-gpu-20260703172135" + "value": "ccr-29eug8s3-pub.cnc.bj.baidubce.com/fanyu/droboticflow-wilor-service:f3a4957-fanyu-l20-20260826" }, { "description": "WiLoR GPU 服务 digest-pinned imageId,仅用于运行证据记录", "key": "WILOR_SERVICE_IMAGE_ID", "type": "string", - "value": "ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/custom-operators/wilor-inference@sha256:be8369126716ad63ea62a93c8bc3e56425a5370cd77144e32b74254f1ff33055" + "value": "ccr-29eug8s3-pub.cnc.bj.baidubce.com/fanyu/droboticflow-wilor-service@sha256:be8369126716ad63ea62a93c8bc3e56425a5370cd77144e32b74254f1ff33055" } ], "id": "operator-builtin-wilor-hand-pose", @@ -13041,14 +13041,14 @@ "resources": { "externalGpuService": true, "minGpuCount": 0, - "recommendedGpuType": "NVIDIA A800 80GB", + "recommendedGpuType": "NVIDIA L20 48GB", "requiresGpu": false }, "runtimeDependencies": [ "wilor-inference-service", "image-video-files", "http-api", - "gpu-a800-service" + "gpu-l20-service" ], "schemaVersion": "droboticflow.operator.runtime/v1" }, diff --git a/internal/api/fanyu_template.go b/internal/api/fanyu_template.go index 4cd18a83..93c7fac2 100644 --- a/internal/api/fanyu_template.go +++ b/internal/api/fanyu_template.go @@ -284,6 +284,11 @@ func (server *server) ensureFanyuDeliveryTemplateV58(ctx context.Context, organi for index := range nodes { node := &nodes[index] switch node.ID { + case "fanyu-v56-handpose": + node.Data.Hyperparams = fanyuUpsertHyperparam(node.Data.Hyperparams, "WILOR_API_BASE_URL", "http://droboticflow-wilor:8080") + node.Data.Hyperparams = fanyuUpsertHyperparam(node.Data.Hyperparams, "INPUT_URL", "") + node.Data.Hyperparams = fanyuUpsertHyperparam(node.Data.Hyperparams, "WILOR_SERVICE_IMAGE", "ccr-29eug8s3-pub.cnc.bj.baidubce.com/fanyu/droboticflow-wilor-service:f3a4957-fanyu-l20-20260826") + node.Data.Hyperparams = fanyuUpsertHyperparam(node.Data.Hyperparams, "WILOR_SERVICE_IMAGE_ID", "ccr-29eug8s3-pub.cnc.bj.baidubce.com/fanyu/droboticflow-wilor-service@sha256:be8369126716ad63ea62a93c8bc3e56425a5370cd77144e32b74254f1ff33055") case "fanyu-v56-human": node.Data.Label = "真实切分与语义标注→切分/标注审核→整包验收" node.Data.Description = "标注员在一个合并环节完成真实切分和语义标注;审核员统一审核,独立验收员完成整包验收。" diff --git a/internal/api/fanyu_template_test.go b/internal/api/fanyu_template_test.go index 11d58575..589ce4ab 100644 --- a/internal/api/fanyu_template_test.go +++ b/internal/api/fanyu_template_test.go @@ -540,6 +540,7 @@ func TestEnsureFanyuDeliveryTemplateV56BuildsStereoCropAndPoseTopology(t *testin } v58Package := fanyuTestNode(v58.Nodes, "fanyu-v56-package") v58Human := fanyuTestNode(v58.Nodes, "fanyu-v56-human") + v58Handpose := fanyuTestNode(v58.Nodes, "fanyu-v56-handpose") if v58Package == nil || fanyuTestHyperparam(v58Package, "SYNCHRONIZED_SIDECARS") != "true" || fanyuTestHyperparam(v58Package, "ALLOW_POSE_EXCLUSION") != "true" { t.Fatalf("v5.8 package must enable synchronized sidecars and pose exclusion: %#v", v58Package) } @@ -557,6 +558,9 @@ func TestEnsureFanyuDeliveryTemplateV56BuildsStereoCropAndPoseTopology(t *testin if v58Human == nil || fanyuTestHyperparam(v58Human, "ANNOTATION_TEMPLATE_ID") != "tpl-fanyu-convenience-store-v6-org-v56" { t.Fatalf("v5.8 human node must use the three-role annotation template: %#v", v58Human) } + if v58Handpose == nil || fanyuTestHyperparam(v58Handpose, "WILOR_API_BASE_URL") != "http://droboticflow-wilor:8080" || fanyuTestHyperparam(v58Handpose, "INPUT_URL") != "" { + t.Fatalf("v5.8 HandPose must use the in-cluster WiLoR service and upstream media: %#v", v58Handpose) + } requiredV58Edges := map[string]bool{"absolutePts": false, "imu": false, "calibrations": false} for _, edge := range v58.Edges { if edge.Target != "fanyu-v56-package" { diff --git a/operator-repos/builtin/wilor_hand_pose/runtime_contract.json b/operator-repos/builtin/wilor_hand_pose/runtime_contract.json index c9c0490c..be0cd639 100644 --- a/operator-repos/builtin/wilor_hand_pose/runtime_contract.json +++ b/operator-repos/builtin/wilor_hand_pose/runtime_contract.json @@ -29,14 +29,14 @@ "resources": { "externalGpuService": true, "minGpuCount": 0, - "recommendedGpuType": "NVIDIA A800 80GB", + "recommendedGpuType": "NVIDIA L20 48GB", "requiresGpu": false }, "runtimeDependencies": [ "wilor-inference-service", "image-video-files", "http-api", - "gpu-a800-service" + "gpu-l20-service" ], "runtimeSource": "src/operator.py", "schemaVersion": "droboticflow.operator.runtime/v1", diff --git a/operator-repos/builtin/wilor_hand_pose/src/operator.py b/operator-repos/builtin/wilor_hand_pose/src/operator.py index 960814b1..4f9a0f1c 100644 --- a/operator-repos/builtin/wilor_hand_pose/src/operator.py +++ b/operator-repos/builtin/wilor_hand_pose/src/operator.py @@ -12,7 +12,7 @@ from typing import Any from urllib import error, parse, request -DEFAULT_WILOR_API_BASE_URL = "http://120.48.65.232" +DEFAULT_WILOR_API_BASE_URL = "http://droboticflow-wilor:8080" DEFAULT_SERVICE_IMAGE = "ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/custom-operators/wilor-inference:f3a4957-gpu-20260703172135" DEFAULT_SERVICE_IMAGE_ID = ( "ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/custom-operators/" diff --git a/scripts/generate_operator_images.py b/scripts/generate_operator_images.py index f03cc380..52bfc347 100644 --- a/scripts/generate_operator_images.py +++ b/scripts/generate_operator_images.py @@ -92,6 +92,9 @@ REMOTE_GPU_SERVICE_SLUGS = { "hand_removal", "wilor_hand_pose", } +GPU_TYPE_OVERRIDES = { + "wilor_hand_pose": "NVIDIA L20 48GB", +} COMMAND_WRAPPER_ALLOWED: set[str] = set() CONTAINER_HANDLER_ALIASES = { "builtin_source": "source", @@ -654,7 +657,7 @@ def contract_for(item: dict[str, Any], slug: str) -> dict[str, Any]: handler = container_handler(item, slug) resource_contract: dict[str, Any] = { "requiresGpu": gpu, - "recommendedGpuType": "NVIDIA A800 80GB" if gpu or remote_gpu_service else "", + "recommendedGpuType": GPU_TYPE_OVERRIDES.get(slug, "NVIDIA A800 80GB") if gpu or remote_gpu_service else "", "minGpuCount": 1 if gpu else 0, } if remote_gpu_service: diff --git a/scripts/generate_operator_repository_manifests.py b/scripts/generate_operator_repository_manifests.py index a31c76d8..62afb66b 100644 --- a/scripts/generate_operator_repository_manifests.py +++ b/scripts/generate_operator_repository_manifests.py @@ -121,7 +121,7 @@ RUNTIME_DEPENDENCIES: dict[str, list[str]] = { "vla_model_inference": ["vla-policy-model-json", "vla-sample-action-manifest"], "vla_model_train": ["vla-sample-action-manifest", "json-jsonl-csv-files"], "vla_sample_manifest_validate": ["json-jsonl-csv-parquet-files", "image-files", "pyarrow"], - "wilor_hand_pose": ["wilor-inference-service", "image-video-files", "http-api", "gpu-a800-service"], + "wilor_hand_pose": ["wilor-inference-service", "image-video-files", "http-api", "gpu-l20-service"], "wilor_valid_event_detection": ["qwen3-vl-8b-instruct", "verified-local-model-manifest", "torch-cuda", "opencv", "qwen-vl-utils", "real-video-files"], "webdataset_shard_summary": ["webdataset-tar-shards", "python-tarfile"], "xplatform_dataset_index": ["xplatform-dataset-files"], diff --git a/tests/backend/operator_repository_layout_test.py b/tests/backend/operator_repository_layout_test.py index a771fde9..3a67a778 100644 --- a/tests/backend/operator_repository_layout_test.py +++ b/tests/backend/operator_repository_layout_test.py @@ -225,12 +225,16 @@ class OperatorRepositoryLayoutTest(unittest.TestCase): if item.get("type") == "builtin" } - for operator_id in ("operator-builtin-hand-removal", "operator-builtin-wilor-hand-pose"): + expected_gpu_types = { + "operator-builtin-hand-removal": "NVIDIA A800 80GB", + "operator-builtin-wilor-hand-pose": "NVIDIA L20 48GB", + } + for operator_id, expected_gpu_type in expected_gpu_types.items(): with self.subTest(operator=operator_id): contract = catalog[operator_id]["runtimeContract"] self.assertFalse(contract["resources"]["requiresGpu"]) self.assertTrue(contract["resources"]["externalGpuService"]) - self.assertEqual(contract["resources"]["recommendedGpuType"], "NVIDIA A800 80GB") + self.assertEqual(contract["resources"]["recommendedGpuType"], expected_gpu_type) self.assertTrue(contract["acceptance"]["requiresGpuEvidence"]) def test_qwen3vl_operators_are_long_running(self):