forked from longtao.wu/droboticflow
✨ optimize POC workflow performance and reliability
This commit is contained in:
parent
3cda38c1b0
commit
bf36bf6086
@ -3416,20 +3416,23 @@ class ShellCommandOperatorTests(unittest.TestCase):
|
||||
eval_report = MODULE.load_artifact_payload(next(item for item in eval_artifacts if item["name"] == "holobrain-robotwin-eval-report.json"))
|
||||
self.assertEqual(eval_report["datasetType"], "holobrain-robotwin-evaluation")
|
||||
|
||||
sample = root / "sample.npz"
|
||||
sample.write_bytes(b"sample")
|
||||
inference_artifacts = MODULE.builtin_holobrain_inference_test(
|
||||
"run-1",
|
||||
"test",
|
||||
root / "test-out",
|
||||
{
|
||||
"label": "HoloBrain 模型测试",
|
||||
"hyperparams": [{"key": "SAMPLE_INPUT_PATH", "value": str(sample)}],
|
||||
"hyperparams": [
|
||||
{"key": "ROBOORCHARDLAB_ROOT", "value": str(repo)},
|
||||
{"key": "ENV_JSON", "value": "{\"HOLOBRAIN_OPERATOR_DRY_RUN\":\"1\"}"},
|
||||
],
|
||||
},
|
||||
[export_manifest],
|
||||
)
|
||||
inference_report = MODULE.load_artifact_payload(inference_artifacts[0])
|
||||
self.assertEqual(inference_report["datasetType"], "holobrain-inference-test")
|
||||
self.assertEqual(inference_report["status"], "dry-run")
|
||||
self.assertFalse(inference_report["execution"]["actualModelExecution"])
|
||||
|
||||
def test_builtin_shell_command_requires_script_id(self):
|
||||
with tempfile.TemporaryDirectory() as temp_dir:
|
||||
|
||||
@ -49,6 +49,7 @@
|
||||
"operatorSlug": "act_policy_train",
|
||||
"parameters": {
|
||||
"commandWrapperAllowed": false,
|
||||
"controlledScriptAllowed": false,
|
||||
"source": "hyperparams",
|
||||
"structured": true
|
||||
},
|
||||
@ -58,15 +59,15 @@
|
||||
"requiresGpu": true
|
||||
},
|
||||
"runtimeDependencies": [
|
||||
"real-act-training-command",
|
||||
"trajectory-demonstration-files",
|
||||
"huggingface-lerobot-act",
|
||||
"lerobot-dataset-or-local-root",
|
||||
"gpu-a800"
|
||||
],
|
||||
"schemaVersion": "droboticflow.operator.runtime/v1"
|
||||
},
|
||||
"runtimeDependencies": [
|
||||
"real-act-training-command",
|
||||
"trajectory-demonstration-files",
|
||||
"huggingface-lerobot-act",
|
||||
"lerobot-dataset-or-local-root",
|
||||
"gpu-a800"
|
||||
],
|
||||
"runtimeHandler": "builtin_act_policy_train",
|
||||
|
||||
@ -49,6 +49,7 @@
|
||||
"operatorSlug": "action_state_quality_validate",
|
||||
"parameters": {
|
||||
"commandWrapperAllowed": false,
|
||||
"controlledScriptAllowed": false,
|
||||
"source": "hyperparams",
|
||||
"structured": true
|
||||
},
|
||||
|
||||
@ -49,6 +49,7 @@
|
||||
"operatorSlug": "agibot_world2026_validate",
|
||||
"parameters": {
|
||||
"commandWrapperAllowed": false,
|
||||
"controlledScriptAllowed": false,
|
||||
"source": "hyperparams",
|
||||
"structured": true
|
||||
},
|
||||
|
||||
@ -49,6 +49,7 @@
|
||||
"operatorSlug": "aloha_hdf5_validate",
|
||||
"parameters": {
|
||||
"commandWrapperAllowed": false,
|
||||
"controlledScriptAllowed": false,
|
||||
"source": "hyperparams",
|
||||
"structured": true
|
||||
},
|
||||
|
||||
@ -49,6 +49,7 @@
|
||||
"operatorSlug": "audit_sample",
|
||||
"parameters": {
|
||||
"commandWrapperAllowed": false,
|
||||
"controlledScriptAllowed": false,
|
||||
"source": "hyperparams",
|
||||
"structured": true
|
||||
},
|
||||
|
||||
@ -49,6 +49,7 @@
|
||||
"operatorSlug": "bop_dataset_validate",
|
||||
"parameters": {
|
||||
"commandWrapperAllowed": false,
|
||||
"controlledScriptAllowed": false,
|
||||
"source": "hyperparams",
|
||||
"structured": true
|
||||
},
|
||||
|
||||
@ -49,6 +49,7 @@
|
||||
"operatorSlug": "bos_incremental_scan",
|
||||
"parameters": {
|
||||
"commandWrapperAllowed": false,
|
||||
"controlledScriptAllowed": false,
|
||||
"source": "hyperparams",
|
||||
"structured": true
|
||||
},
|
||||
|
||||
@ -49,6 +49,7 @@
|
||||
"operatorSlug": "bridgedata_tfds_manifest_validate",
|
||||
"parameters": {
|
||||
"commandWrapperAllowed": false,
|
||||
"controlledScriptAllowed": false,
|
||||
"source": "hyperparams",
|
||||
"structured": true
|
||||
},
|
||||
|
||||
@ -49,6 +49,7 @@
|
||||
"operatorSlug": "calvin_episode_validate",
|
||||
"parameters": {
|
||||
"commandWrapperAllowed": false,
|
||||
"controlledScriptAllowed": false,
|
||||
"source": "hyperparams",
|
||||
"structured": true
|
||||
},
|
||||
|
||||
@ -49,6 +49,7 @@
|
||||
"operatorSlug": "camera_calibration_validate",
|
||||
"parameters": {
|
||||
"commandWrapperAllowed": false,
|
||||
"controlledScriptAllowed": false,
|
||||
"source": "hyperparams",
|
||||
"structured": true
|
||||
},
|
||||
|
||||
@ -49,6 +49,7 @@
|
||||
"operatorSlug": "coco_annotation_validate",
|
||||
"parameters": {
|
||||
"commandWrapperAllowed": false,
|
||||
"controlledScriptAllowed": false,
|
||||
"source": "hyperparams",
|
||||
"structured": true
|
||||
},
|
||||
|
||||
@ -49,6 +49,7 @@
|
||||
"operatorSlug": "conditional_route",
|
||||
"parameters": {
|
||||
"commandWrapperAllowed": false,
|
||||
"controlledScriptAllowed": false,
|
||||
"source": "hyperparams",
|
||||
"structured": true
|
||||
},
|
||||
|
||||
@ -49,6 +49,7 @@
|
||||
"operatorSlug": "csv_to_json",
|
||||
"parameters": {
|
||||
"commandWrapperAllowed": false,
|
||||
"controlledScriptAllowed": false,
|
||||
"source": "hyperparams",
|
||||
"structured": true
|
||||
},
|
||||
|
||||
@ -49,6 +49,7 @@
|
||||
"operatorSlug": "dataset_provenance_audit",
|
||||
"parameters": {
|
||||
"commandWrapperAllowed": false,
|
||||
"controlledScriptAllowed": false,
|
||||
"source": "hyperparams",
|
||||
"structured": true
|
||||
},
|
||||
|
||||
@ -49,6 +49,7 @@
|
||||
"operatorSlug": "dataset_schema_contract_validate",
|
||||
"parameters": {
|
||||
"commandWrapperAllowed": false,
|
||||
"controlledScriptAllowed": false,
|
||||
"source": "hyperparams",
|
||||
"structured": true
|
||||
},
|
||||
|
||||
@ -49,6 +49,7 @@
|
||||
"operatorSlug": "dataset_split_leakage_validate",
|
||||
"parameters": {
|
||||
"commandWrapperAllowed": false,
|
||||
"controlledScriptAllowed": false,
|
||||
"source": "hyperparams",
|
||||
"structured": true
|
||||
},
|
||||
|
||||
@ -49,6 +49,7 @@
|
||||
"operatorSlug": "dataset_split_manifest",
|
||||
"parameters": {
|
||||
"commandWrapperAllowed": false,
|
||||
"controlledScriptAllowed": false,
|
||||
"source": "hyperparams",
|
||||
"structured": true
|
||||
},
|
||||
|
||||
@ -49,6 +49,7 @@
|
||||
"operatorSlug": "dexycb_dataset_validate",
|
||||
"parameters": {
|
||||
"commandWrapperAllowed": false,
|
||||
"controlledScriptAllowed": false,
|
||||
"source": "hyperparams",
|
||||
"structured": true
|
||||
},
|
||||
|
||||
@ -49,6 +49,7 @@
|
||||
"operatorSlug": "diffusion_policy_train",
|
||||
"parameters": {
|
||||
"commandWrapperAllowed": false,
|
||||
"controlledScriptAllowed": false,
|
||||
"source": "hyperparams",
|
||||
"structured": true
|
||||
},
|
||||
@ -58,14 +59,14 @@
|
||||
"requiresGpu": true
|
||||
},
|
||||
"runtimeDependencies": [
|
||||
"diffusion-policy-training-command",
|
||||
"real-stanford-diffusion-policy",
|
||||
"zarr-or-lerobot-trajectory-files",
|
||||
"gpu-a800"
|
||||
],
|
||||
"schemaVersion": "droboticflow.operator.runtime/v1"
|
||||
},
|
||||
"runtimeDependencies": [
|
||||
"diffusion-policy-training-command",
|
||||
"real-stanford-diffusion-policy",
|
||||
"zarr-or-lerobot-trajectory-files",
|
||||
"gpu-a800"
|
||||
],
|
||||
|
||||
@ -49,6 +49,7 @@
|
||||
"operatorSlug": "directory_scan",
|
||||
"parameters": {
|
||||
"commandWrapperAllowed": false,
|
||||
"controlledScriptAllowed": false,
|
||||
"source": "hyperparams",
|
||||
"structured": true
|
||||
},
|
||||
|
||||
@ -49,6 +49,7 @@
|
||||
"operatorSlug": "droid_raw_episode_validate",
|
||||
"parameters": {
|
||||
"commandWrapperAllowed": false,
|
||||
"controlledScriptAllowed": false,
|
||||
"source": "hyperparams",
|
||||
"structured": true
|
||||
},
|
||||
|
||||
@ -49,6 +49,7 @@
|
||||
"operatorSlug": "embodiment_metadata_validate",
|
||||
"parameters": {
|
||||
"commandWrapperAllowed": false,
|
||||
"controlledScriptAllowed": false,
|
||||
"source": "hyperparams",
|
||||
"structured": true
|
||||
},
|
||||
|
||||
@ -49,6 +49,7 @@
|
||||
"operatorSlug": "episode_boundary_validate",
|
||||
"parameters": {
|
||||
"commandWrapperAllowed": false,
|
||||
"controlledScriptAllowed": false,
|
||||
"source": "hyperparams",
|
||||
"structured": true
|
||||
},
|
||||
|
||||
@ -49,6 +49,7 @@
|
||||
"operatorSlug": "force_torque_sensor_validate",
|
||||
"parameters": {
|
||||
"commandWrapperAllowed": false,
|
||||
"controlledScriptAllowed": false,
|
||||
"source": "hyperparams",
|
||||
"structured": true
|
||||
},
|
||||
|
||||
@ -49,6 +49,7 @@
|
||||
"operatorSlug": "furniturebench_pkl_demonstration_validate",
|
||||
"parameters": {
|
||||
"commandWrapperAllowed": false,
|
||||
"controlledScriptAllowed": false,
|
||||
"source": "hyperparams",
|
||||
"structured": true
|
||||
},
|
||||
|
||||
@ -49,6 +49,7 @@
|
||||
"operatorSlug": "graspnet_dataset_validate",
|
||||
"parameters": {
|
||||
"commandWrapperAllowed": false,
|
||||
"controlledScriptAllowed": false,
|
||||
"source": "hyperparams",
|
||||
"structured": true
|
||||
},
|
||||
|
||||
@ -49,6 +49,7 @@
|
||||
"operatorSlug": "hand_object_pose_validate",
|
||||
"parameters": {
|
||||
"commandWrapperAllowed": false,
|
||||
"controlledScriptAllowed": false,
|
||||
"source": "hyperparams",
|
||||
"structured": true
|
||||
},
|
||||
|
||||
@ -49,6 +49,7 @@
|
||||
"operatorSlug": "hdf5_demonstration_summary",
|
||||
"parameters": {
|
||||
"commandWrapperAllowed": false,
|
||||
"controlledScriptAllowed": false,
|
||||
"source": "hyperparams",
|
||||
"structured": true
|
||||
},
|
||||
|
||||
@ -49,6 +49,7 @@
|
||||
"operatorSlug": "hf_dataset_probe",
|
||||
"parameters": {
|
||||
"commandWrapperAllowed": false,
|
||||
"controlledScriptAllowed": false,
|
||||
"source": "hyperparams",
|
||||
"structured": true
|
||||
},
|
||||
|
||||
@ -49,6 +49,7 @@
|
||||
"operatorSlug": "ho3d_dataset_validate",
|
||||
"parameters": {
|
||||
"commandWrapperAllowed": false,
|
||||
"controlledScriptAllowed": false,
|
||||
"source": "hyperparams",
|
||||
"structured": true
|
||||
},
|
||||
|
||||
@ -0,0 +1,80 @@
|
||||
{
|
||||
"acceptance": {
|
||||
"hardcodedOutputAccepted": false,
|
||||
"mockOnlyAccepted": false,
|
||||
"pocFullAcceptanceScript": "scripts/poc-operator-full-acceptance.sh",
|
||||
"requiresPersistentWorkspaceEvidence": true,
|
||||
"requiresRealInputs": true,
|
||||
"shallowOnlyAccepted": false,
|
||||
"simulationOnlyAccepted": false
|
||||
},
|
||||
"category": "DATASET",
|
||||
"containerArgs": [],
|
||||
"containerCommand": [
|
||||
"python",
|
||||
"/app/backend/operator-runner/main.py"
|
||||
],
|
||||
"containerEntrypoint": "backend/operator-runner/main.py",
|
||||
"entrypoint": "operator.py",
|
||||
"image": "ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/droboticflow-operator-holobrain-data-prepare:5289510-holobrain-data-guard2-20260708050323",
|
||||
"imageId": "ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/droboticflow-operator-holobrain-data-prepare@sha256:0df15a87262c4099bf5b6c9dbbf17ea54fcac40657dd93ca6ff49e6af69c3b43",
|
||||
"metadata": "operator.json",
|
||||
"name": "HoloBrain 数据准备",
|
||||
"operatorId": "operator-builtin-holobrain-data-prepare",
|
||||
"operatorSlug": "holobrain_data_prepare",
|
||||
"preferredSlug": "holobrain_data_prepare",
|
||||
"pythonImport": "backend.operators.builtin.holobrain_data_prepare.operator:run",
|
||||
"repositoryId": "builtin/holobrain_data_prepare",
|
||||
"runtimeContract": {
|
||||
"acceptance": {
|
||||
"requiresArtifactChecksum": true,
|
||||
"requiresFixtureChecksum": true,
|
||||
"requiresGpuEvidence": false,
|
||||
"requiresRealFixture": true,
|
||||
"requiresWorkflowTransfer": true
|
||||
},
|
||||
"artifacts": {
|
||||
"requiresChecksum": true,
|
||||
"requiresLineage": true,
|
||||
"requiresManifest": true
|
||||
},
|
||||
"entrypoint": "/app/backend/operator-runner/main.py",
|
||||
"handler": "builtin_holobrain_data_prepare",
|
||||
"imagePolicy": {
|
||||
"allowsSharedBaseLayer": true,
|
||||
"forbidsSharedOperatorRunnerFinalImage": true,
|
||||
"independentFinalImage": true
|
||||
},
|
||||
"longRunning": true,
|
||||
"operatorId": "operator-builtin-holobrain-data-prepare",
|
||||
"operatorSlug": "holobrain_data_prepare",
|
||||
"parameters": {
|
||||
"commandWrapperAllowed": false,
|
||||
"controlledScriptAllowed": false,
|
||||
"source": "hyperparams",
|
||||
"structured": true
|
||||
},
|
||||
"resources": {
|
||||
"minGpuCount": 0,
|
||||
"recommendedGpuType": "",
|
||||
"requiresGpu": false
|
||||
},
|
||||
"runtimeDependencies": [
|
||||
"official-robotwin2-dataset",
|
||||
"huggingface-hub",
|
||||
"real-robotwin-files"
|
||||
],
|
||||
"schemaVersion": "droboticflow.operator.runtime/v1"
|
||||
},
|
||||
"runtimeDependencies": [
|
||||
"official-robotwin2-dataset",
|
||||
"huggingface-hub",
|
||||
"real-robotwin-files"
|
||||
],
|
||||
"runtimeHandler": "builtin_holobrain_data_prepare",
|
||||
"runtimeSource": "backend/operators/builtin/holobrain_data_prepare/operator.py",
|
||||
"schemaVersion": "droboticflow.operator.repository/v1",
|
||||
"sourceRoot": "backend/operators/builtin/holobrain_data_prepare",
|
||||
"strictPocAcceptanceExternals": [],
|
||||
"type": "builtin"
|
||||
}
|
||||
79
backend/operators/builtin/holobrain_export/repository.json
Normal file
79
backend/operators/builtin/holobrain_export/repository.json
Normal file
@ -0,0 +1,79 @@
|
||||
{
|
||||
"acceptance": {
|
||||
"hardcodedOutputAccepted": false,
|
||||
"mockOnlyAccepted": false,
|
||||
"pocFullAcceptanceScript": "scripts/poc-operator-full-acceptance.sh",
|
||||
"requiresPersistentWorkspaceEvidence": true,
|
||||
"requiresRealInputs": true,
|
||||
"shallowOnlyAccepted": false,
|
||||
"simulationOnlyAccepted": false
|
||||
},
|
||||
"category": "AI",
|
||||
"containerArgs": [],
|
||||
"containerCommand": [
|
||||
"python",
|
||||
"/app/backend/operator-runner/main.py"
|
||||
],
|
||||
"containerEntrypoint": "backend/operator-runner/main.py",
|
||||
"entrypoint": "operator.py",
|
||||
"image": "ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/droboticflow-operator-holobrain-export:a34570f-holobrain-exportrepair5-20260709014631",
|
||||
"imageId": "ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/droboticflow-operator-holobrain-export@sha256:90e90351b00fac0405740b87281608ce51e2171e0a78ed81295a317a5f93e7f6",
|
||||
"metadata": "operator.json",
|
||||
"name": "HoloBrain 模型导出",
|
||||
"operatorId": "operator-builtin-holobrain-export",
|
||||
"operatorSlug": "holobrain_export",
|
||||
"preferredSlug": "holobrain_export",
|
||||
"pythonImport": "backend.operators.builtin.holobrain_export.operator:run",
|
||||
"repositoryId": "builtin/holobrain_export",
|
||||
"runtimeContract": {
|
||||
"acceptance": {
|
||||
"requiresArtifactChecksum": true,
|
||||
"requiresFixtureChecksum": true,
|
||||
"requiresGpuEvidence": true,
|
||||
"requiresRealFixture": true,
|
||||
"requiresWorkflowTransfer": true
|
||||
},
|
||||
"artifacts": {
|
||||
"requiresChecksum": true,
|
||||
"requiresLineage": true,
|
||||
"requiresManifest": true
|
||||
},
|
||||
"entrypoint": "/app/backend/operator-runner/main.py",
|
||||
"handler": "builtin_holobrain_export",
|
||||
"imagePolicy": {
|
||||
"allowsSharedBaseLayer": true,
|
||||
"forbidsSharedOperatorRunnerFinalImage": true,
|
||||
"independentFinalImage": true
|
||||
},
|
||||
"operatorId": "operator-builtin-holobrain-export",
|
||||
"operatorSlug": "holobrain_export",
|
||||
"parameters": {
|
||||
"commandWrapperAllowed": false,
|
||||
"controlledScriptAllowed": false,
|
||||
"source": "hyperparams",
|
||||
"structured": true
|
||||
},
|
||||
"resources": {
|
||||
"minGpuCount": 1,
|
||||
"recommendedGpuType": "NVIDIA A800 80GB",
|
||||
"requiresGpu": true
|
||||
},
|
||||
"runtimeDependencies": [
|
||||
"roboorchardlab-holobrain-export",
|
||||
"holobrain-checkpoint",
|
||||
"gpu-a800"
|
||||
],
|
||||
"schemaVersion": "droboticflow.operator.runtime/v1"
|
||||
},
|
||||
"runtimeDependencies": [
|
||||
"roboorchardlab-holobrain-export",
|
||||
"holobrain-checkpoint",
|
||||
"gpu-a800"
|
||||
],
|
||||
"runtimeHandler": "builtin_holobrain_export",
|
||||
"runtimeSource": "backend/operators/builtin/holobrain_export/operator.py",
|
||||
"schemaVersion": "droboticflow.operator.repository/v1",
|
||||
"sourceRoot": "backend/operators/builtin/holobrain_export",
|
||||
"strictPocAcceptanceExternals": [],
|
||||
"type": "builtin"
|
||||
}
|
||||
@ -0,0 +1,79 @@
|
||||
{
|
||||
"acceptance": {
|
||||
"hardcodedOutputAccepted": false,
|
||||
"mockOnlyAccepted": false,
|
||||
"pocFullAcceptanceScript": "scripts/poc-operator-full-acceptance.sh",
|
||||
"requiresPersistentWorkspaceEvidence": true,
|
||||
"requiresRealInputs": true,
|
||||
"shallowOnlyAccepted": false,
|
||||
"simulationOnlyAccepted": false
|
||||
},
|
||||
"category": "AI",
|
||||
"containerArgs": [],
|
||||
"containerCommand": [
|
||||
"python",
|
||||
"/app/backend/operator-runner/main.py"
|
||||
],
|
||||
"containerEntrypoint": "backend/operator-runner/main.py",
|
||||
"entrypoint": "operator.py",
|
||||
"image": "ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/droboticflow-operator-holobrain-inference-test:5289510-holobrain-downstream2-202607082304",
|
||||
"imageId": "ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/droboticflow-operator-holobrain-inference-test@sha256:3a79fd20722ce23a8b64eab3cd31e1b0434fef2564b3b6f55c02933d667abf33",
|
||||
"metadata": "operator.json",
|
||||
"name": "HoloBrain 模型测试",
|
||||
"operatorId": "operator-builtin-holobrain-inference-test",
|
||||
"operatorSlug": "holobrain_inference_test",
|
||||
"preferredSlug": "holobrain_inference_test",
|
||||
"pythonImport": "backend.operators.builtin.holobrain_inference_test.operator:run",
|
||||
"repositoryId": "builtin/holobrain_inference_test",
|
||||
"runtimeContract": {
|
||||
"acceptance": {
|
||||
"requiresArtifactChecksum": true,
|
||||
"requiresFixtureChecksum": true,
|
||||
"requiresGpuEvidence": true,
|
||||
"requiresRealFixture": true,
|
||||
"requiresWorkflowTransfer": true
|
||||
},
|
||||
"artifacts": {
|
||||
"requiresChecksum": true,
|
||||
"requiresLineage": true,
|
||||
"requiresManifest": true
|
||||
},
|
||||
"entrypoint": "/app/backend/operator-runner/main.py",
|
||||
"handler": "builtin_holobrain_inference_test",
|
||||
"imagePolicy": {
|
||||
"allowsSharedBaseLayer": true,
|
||||
"forbidsSharedOperatorRunnerFinalImage": true,
|
||||
"independentFinalImage": true
|
||||
},
|
||||
"operatorId": "operator-builtin-holobrain-inference-test",
|
||||
"operatorSlug": "holobrain_inference_test",
|
||||
"parameters": {
|
||||
"commandWrapperAllowed": false,
|
||||
"controlledScriptAllowed": false,
|
||||
"source": "hyperparams",
|
||||
"structured": true
|
||||
},
|
||||
"resources": {
|
||||
"minGpuCount": 1,
|
||||
"recommendedGpuType": "NVIDIA A800 80GB",
|
||||
"requiresGpu": true
|
||||
},
|
||||
"runtimeDependencies": [
|
||||
"roboorchardlab-holobrain-pipeline",
|
||||
"real-sample-path",
|
||||
"gpu-a800"
|
||||
],
|
||||
"schemaVersion": "droboticflow.operator.runtime/v1"
|
||||
},
|
||||
"runtimeDependencies": [
|
||||
"roboorchardlab-holobrain-pipeline",
|
||||
"real-sample-path",
|
||||
"gpu-a800"
|
||||
],
|
||||
"runtimeHandler": "builtin_holobrain_inference_test",
|
||||
"runtimeSource": "backend/operators/builtin/holobrain_inference_test/operator.py",
|
||||
"schemaVersion": "droboticflow.operator.repository/v1",
|
||||
"sourceRoot": "backend/operators/builtin/holobrain_inference_test",
|
||||
"strictPocAcceptanceExternals": [],
|
||||
"type": "builtin"
|
||||
}
|
||||
@ -42,6 +42,19 @@ DEFAULT_ARROW_CAMERA_MAP = {
|
||||
}
|
||||
DEFAULT_ARROW_JOINT_INDEXES_16_TO_14 = [0, 1, 2, 3, 4, 5, 7, 8, 9, 10, 11, 12, 13, 15]
|
||||
TRUE_VALUES = {"1", "true", "yes", "on"}
|
||||
TRAINING_MODES = {"smoke", "full"}
|
||||
PROGRESS_MARKER = "DROBOTICFLOW_PROGRESS "
|
||||
MODEL_DTYPE_ALIASES = {
|
||||
"bf16": "bfloat16",
|
||||
"bfloat16": "bfloat16",
|
||||
"torch.bfloat16": "bfloat16",
|
||||
}
|
||||
INPUT_DTYPE_ALIASES = {
|
||||
"fp32": "float32",
|
||||
"float": "float32",
|
||||
"float32": "float32",
|
||||
"torch.float32": "float32",
|
||||
}
|
||||
|
||||
|
||||
def _params(helpers: HelperMap, node_data: dict[str, Any]) -> dict[str, str]:
|
||||
@ -74,6 +87,24 @@ def _bool(params: dict[str, str], key: str, default: bool = False) -> bool:
|
||||
raise RuntimeError(f"{key} must be a boolean")
|
||||
|
||||
|
||||
def _training_mode(params: dict[str, str], default: str = "full") -> str:
|
||||
mode = _text(params, "TRAINING_MODE", default).lower()
|
||||
if mode not in TRAINING_MODES:
|
||||
raise RuntimeError("TRAINING_MODE must be smoke or full")
|
||||
return mode
|
||||
|
||||
|
||||
def _utc_now() -> str:
|
||||
return time.strftime("%Y-%m-%dT%H:%M:%SZ", time.gmtime())
|
||||
|
||||
|
||||
def _write_json_atomic(path: pathlib.Path, payload: dict[str, Any]) -> None:
|
||||
path.parent.mkdir(parents=True, exist_ok=True)
|
||||
temporary = path.with_name(f".{path.name}.{os.getpid()}.tmp")
|
||||
temporary.write_text(json.dumps(payload, ensure_ascii=False, indent=2), encoding="utf-8")
|
||||
os.replace(temporary, path)
|
||||
|
||||
|
||||
def _json_value(params: dict[str, str], key: str, default: Any) -> Any:
|
||||
value = _text(params, key)
|
||||
if not value:
|
||||
@ -143,16 +174,35 @@ def _first_payload(inputs: list[dict[str, Any]], helpers: HelperMap, dataset_typ
|
||||
|
||||
|
||||
def _safe_link_or_copy(source: pathlib.Path, target: pathlib.Path) -> None:
|
||||
if target.exists() or target.is_symlink():
|
||||
if target.resolve() == source.resolve():
|
||||
source = source.resolve()
|
||||
if not source.exists():
|
||||
raise RuntimeError(f"source path does not exist: {source}")
|
||||
|
||||
def remove_target() -> None:
|
||||
if not os.path.lexists(target):
|
||||
return
|
||||
if target.is_symlink() and target.resolve() == source:
|
||||
return
|
||||
if target.is_dir() and not target.is_symlink():
|
||||
shutil.rmtree(target)
|
||||
else:
|
||||
target.unlink()
|
||||
|
||||
if os.path.lexists(target):
|
||||
if target.resolve() == source:
|
||||
return
|
||||
remove_target()
|
||||
target.parent.mkdir(parents=True, exist_ok=True)
|
||||
try:
|
||||
target.symlink_to(source, target_is_directory=source.is_dir())
|
||||
except FileExistsError:
|
||||
# A retried node or another initializer may have created the exact
|
||||
# link between the existence check and symlink_to(). Treat that as a
|
||||
# successful idempotent initialization instead of failing the Run.
|
||||
if target.is_symlink() and target.resolve() == source:
|
||||
return
|
||||
remove_target()
|
||||
target.symlink_to(source, target_is_directory=source.is_dir())
|
||||
except OSError as exc:
|
||||
if source.is_dir():
|
||||
raise RuntimeError(f"Unable to create directory symlink from {target} to {source}") from exc
|
||||
@ -738,6 +788,7 @@ def _run_command(
|
||||
output_path: pathlib.Path,
|
||||
env: dict[str, str],
|
||||
metadata: dict[str, Any],
|
||||
progress_callback: Callable[[str | None], None] | None = None,
|
||||
) -> tuple[pathlib.Path, pathlib.Path, pathlib.Path]:
|
||||
output_path.mkdir(parents=True, exist_ok=True)
|
||||
command_path = _write_command_file(output_path, command, cwd, metadata)
|
||||
@ -774,9 +825,13 @@ def _run_command(
|
||||
log_file.flush()
|
||||
console.write(line)
|
||||
console.flush()
|
||||
if progress_callback is not None:
|
||||
progress_callback(line)
|
||||
continue
|
||||
selector.unregister(key.fileobj)
|
||||
key.fileobj.close()
|
||||
if progress_callback is not None:
|
||||
progress_callback(None)
|
||||
returncode = process.wait()
|
||||
if returncode != 0:
|
||||
tail = _tail_text(stderr_path) or _tail_text(stdout_path)
|
||||
@ -812,17 +867,281 @@ def _parse_training_progress(*paths: pathlib.Path) -> dict[str, Any]:
|
||||
}
|
||||
|
||||
|
||||
def _checkpoint_mtime(path: pathlib.Path) -> float:
|
||||
try:
|
||||
if path.is_dir():
|
||||
return max((item.stat().st_mtime for item in path.rglob("*") if item.is_file()), default=path.stat().st_mtime)
|
||||
return path.stat().st_mtime
|
||||
except OSError:
|
||||
return 0.0
|
||||
|
||||
|
||||
def _valid_model_checkpoint(path: pathlib.Path) -> bool:
|
||||
if not path.is_file() or path.stat().st_size <= 0:
|
||||
return False
|
||||
if path.suffix == ".safetensors":
|
||||
return _valid_safetensors_header(path)
|
||||
return path.suffix.lower() in {".bin", ".pt", ".pth"}
|
||||
|
||||
|
||||
def _checkpoint_model_file(path: pathlib.Path) -> pathlib.Path | None:
|
||||
if path.is_file():
|
||||
return path if _valid_model_checkpoint(path) else None
|
||||
if not path.is_dir():
|
||||
return None
|
||||
preferred = [
|
||||
path / "model.safetensors",
|
||||
path / "pytorch_model.bin",
|
||||
]
|
||||
candidates = (
|
||||
preferred
|
||||
+ sorted(path.glob("model*.safetensors"))
|
||||
+ sorted(path.glob("pytorch_model*.bin"))
|
||||
+ sorted(path.glob("model*.pt"))
|
||||
+ sorted(path.glob("model*.pth"))
|
||||
)
|
||||
selected = next((item for item in candidates if _valid_model_checkpoint(item)), None)
|
||||
if selected is not None:
|
||||
return selected
|
||||
interrupted_safetensors = path / "model.safetensors"
|
||||
if interrupted_safetensors.exists():
|
||||
try:
|
||||
repaired, _ = _resolve_safetensors_checkpoint(interrupted_safetensors)
|
||||
except RuntimeError:
|
||||
return None
|
||||
if _valid_model_checkpoint(repaired):
|
||||
return repaired
|
||||
return None
|
||||
|
||||
|
||||
def _valid_resume_checkpoint(path: pathlib.Path) -> bool:
|
||||
if not path.is_dir() or _checkpoint_model_file(path) is None:
|
||||
return False
|
||||
state_patterns = (
|
||||
"optimizer*",
|
||||
"scheduler*",
|
||||
"random_states*",
|
||||
"custom_checkpoint*",
|
||||
"trainer_progress*",
|
||||
)
|
||||
return any(item.is_file() and item.stat().st_size > 0 for pattern in state_patterns for item in path.glob(pattern))
|
||||
|
||||
|
||||
def _latest_valid_resume_checkpoint(workspace: pathlib.Path) -> pathlib.Path | None:
|
||||
checkpoint_dir = workspace / "checkpoints"
|
||||
if not checkpoint_dir.is_dir():
|
||||
return None
|
||||
candidates = [item for item in checkpoint_dir.iterdir() if _valid_resume_checkpoint(item)]
|
||||
return max(candidates, key=_checkpoint_mtime) if candidates else None
|
||||
|
||||
|
||||
def _latest_checkpoint(workspace: pathlib.Path) -> pathlib.Path | None:
|
||||
candidates: list[pathlib.Path] = []
|
||||
checkpoint_dir = workspace / "checkpoints"
|
||||
if checkpoint_dir.exists():
|
||||
candidates.extend(item for item in checkpoint_dir.iterdir() if item.is_dir() or item.is_file())
|
||||
candidates.extend(item for item in workspace.rglob("*.safetensors") if item.is_file())
|
||||
candidates.extend(item for item in workspace.rglob("*.pt") if item.is_file())
|
||||
candidates.extend(item for item in workspace.rglob("*.pth") if item.is_file())
|
||||
if not candidates:
|
||||
if checkpoint_dir.is_dir():
|
||||
for item in checkpoint_dir.iterdir():
|
||||
model_file = _checkpoint_model_file(item)
|
||||
if model_file is not None:
|
||||
candidates.append(model_file)
|
||||
for pattern in ("*.safetensors", "*.bin", "*.pt", "*.pth"):
|
||||
candidates.extend(item for item in workspace.glob(pattern) if _valid_model_checkpoint(item))
|
||||
return max(candidates, key=_checkpoint_mtime) if candidates else None
|
||||
|
||||
|
||||
def _resolve_resume_checkpoint(params: dict[str, str], kwargs: dict[str, Any], workspace: pathlib.Path) -> tuple[pathlib.Path | None, str]:
|
||||
policy = _text(params, "RESUME_POLICY", "auto").lower()
|
||||
if policy not in {"auto", "explicit", "never"}:
|
||||
raise RuntimeError("RESUME_POLICY must be auto, explicit, or never")
|
||||
configured = _text(params, "RESUME_FROM") or str(kwargs.get("resume_from") or "").strip()
|
||||
if policy == "never":
|
||||
if configured:
|
||||
raise RuntimeError("RESUME_FROM/config resume_from cannot be set when RESUME_POLICY=never")
|
||||
kwargs.pop("resume_from", None)
|
||||
return None, policy
|
||||
if configured:
|
||||
selected = _path(configured)
|
||||
if not _valid_resume_checkpoint(selected):
|
||||
raise RuntimeError(f"RESUME_FROM is not a valid Accelerate training-state checkpoint: {selected}")
|
||||
kwargs["resume_from"] = str(selected)
|
||||
return selected, "explicit"
|
||||
if policy == "explicit":
|
||||
raise RuntimeError("RESUME_FROM is required when RESUME_POLICY=explicit")
|
||||
selected = _latest_valid_resume_checkpoint(workspace)
|
||||
if selected is not None:
|
||||
kwargs["resume_from"] = str(selected)
|
||||
return selected, policy
|
||||
|
||||
|
||||
def _select_output_checkpoint(params: dict[str, str], workspace: pathlib.Path) -> tuple[pathlib.Path | None, str]:
|
||||
selection = _text(params, "CHECKPOINT_ARTIFACT", "latest_valid").lower()
|
||||
if selection == "none":
|
||||
return None, selection
|
||||
if selection == "explicit":
|
||||
configured = _text(params, "OUTPUT_CHECKPOINT_PATH")
|
||||
if not configured:
|
||||
raise RuntimeError("OUTPUT_CHECKPOINT_PATH is required when CHECKPOINT_ARTIFACT=explicit")
|
||||
selected = _path(configured)
|
||||
if not _valid_model_checkpoint(selected):
|
||||
raise RuntimeError(f"OUTPUT_CHECKPOINT_PATH is not a valid model checkpoint: {selected}")
|
||||
return selected, selection
|
||||
if selection != "latest_valid":
|
||||
raise RuntimeError("CHECKPOINT_ARTIFACT must be latest_valid, explicit, or none")
|
||||
return _latest_checkpoint(workspace), selection
|
||||
|
||||
|
||||
def _normalize_dtype(value: Any, aliases: dict[str, str]) -> str:
|
||||
normalized = str(value or "").strip().lower()
|
||||
return aliases.get(normalized, normalized)
|
||||
|
||||
|
||||
def _dtype_preflight(
|
||||
params: dict[str, str],
|
||||
kwargs: dict[str, Any],
|
||||
config_path: pathlib.Path,
|
||||
output_path: pathlib.Path,
|
||||
) -> tuple[dict[str, Any], pathlib.Path]:
|
||||
requested_model = _normalize_dtype(_text(params, "MODEL_DTYPE", "bfloat16"), MODEL_DTYPE_ALIASES)
|
||||
requested_input = _normalize_dtype(_text(params, "INPUT_DTYPE", "float32"), INPUT_DTYPE_ALIASES)
|
||||
configured_model = _normalize_dtype(
|
||||
kwargs.get("model_dtype") or kwargs.get("torch_dtype") or requested_model,
|
||||
MODEL_DTYPE_ALIASES,
|
||||
)
|
||||
configured_input = _normalize_dtype(kwargs.get("input_dtype") or requested_input, INPUT_DTYPE_ALIASES)
|
||||
errors: list[str] = []
|
||||
if requested_model != "bfloat16" or configured_model != "bfloat16":
|
||||
errors.append("official HoloBrain Qwen model weights require bfloat16")
|
||||
if requested_input != "float32" or configured_input != "float32":
|
||||
errors.append("official RoboTwin processors require float32 image/depth tensors before model-side casting")
|
||||
payload = {
|
||||
"schemaVersion": "droboticflow.holobrain.dtype-preflight/v1",
|
||||
"valid": not errors,
|
||||
"configPath": str(config_path),
|
||||
"modelDtype": configured_model,
|
||||
"inputDtype": configured_input,
|
||||
"compatiblePair": {"model": "bfloat16", "input": "float32"},
|
||||
"errors": errors,
|
||||
"checkedAt": _utc_now(),
|
||||
}
|
||||
path = output_path / "holobrain-dtype-preflight.json"
|
||||
_write_json_atomic(path, payload)
|
||||
if errors:
|
||||
raise RuntimeError("HoloBrain dtype preflight failed: " + "; ".join(errors))
|
||||
return payload, path
|
||||
|
||||
|
||||
def _apply_smoke_training_defaults(params: dict[str, str], kwargs: dict[str, Any]) -> dict[str, Any]:
|
||||
next_kwargs = dict(kwargs)
|
||||
max_step = max(1, _int(params, "SMOKE_MAX_STEP", 2))
|
||||
next_kwargs.setdefault("max_step", max_step)
|
||||
next_kwargs.setdefault("save_step_freq", max(1, min(max_step, _int(params, "SMOKE_SAVE_STEP_FREQ", 1))))
|
||||
next_kwargs.setdefault("step_log_freq", max(1, min(max_step, _int(params, "SMOKE_LOG_STEP_FREQ", 1))))
|
||||
next_kwargs.setdefault("batch_size", max(1, _int(params, "SMOKE_BATCH_SIZE", 1)))
|
||||
next_kwargs.setdefault("num_workers", max(0, _int(params, "SMOKE_NUM_WORKERS", 0)))
|
||||
next_kwargs.setdefault("training_datasets", ["robotwin2_0"])
|
||||
next_kwargs.setdefault("deploy_datasets", ["robotwin2_0"])
|
||||
return next_kwargs
|
||||
|
||||
|
||||
def _parse_duration_seconds(value: str) -> int | None:
|
||||
value = value.strip().rstrip(".")
|
||||
if not value or value.upper() == "N/A":
|
||||
return None
|
||||
return max(candidates, key=lambda item: item.stat().st_mtime)
|
||||
parts = value.split(":")
|
||||
try:
|
||||
numbers = [int(item) for item in parts]
|
||||
except ValueError:
|
||||
return None
|
||||
if len(numbers) == 3:
|
||||
return numbers[0] * 3600 + numbers[1] * 60 + numbers[2]
|
||||
if len(numbers) == 2:
|
||||
return numbers[0] * 60 + numbers[1]
|
||||
return numbers[0] if len(numbers) == 1 else None
|
||||
|
||||
|
||||
class _TrainingProgressReporter:
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
run_id: str,
|
||||
node_id: str,
|
||||
output_path: pathlib.Path,
|
||||
workspace: pathlib.Path,
|
||||
max_step: int,
|
||||
training_mode: str,
|
||||
interval_seconds: int,
|
||||
) -> None:
|
||||
self.workspace = workspace
|
||||
self.output_path = output_path
|
||||
self.workspace_path = workspace / "droboticflow-progress.json"
|
||||
self.artifact_path = output_path / "holobrain-progress.json"
|
||||
self.interval_seconds = max(1, interval_seconds)
|
||||
self.last_emit = 0.0
|
||||
self.payload: dict[str, Any] = {
|
||||
"schemaVersion": "droboticflow.execution-progress/v1",
|
||||
"runId": run_id,
|
||||
"nodeId": node_id,
|
||||
"stage": "train",
|
||||
"status": "running",
|
||||
"trainingMode": training_mode,
|
||||
"epoch": None,
|
||||
"step": 0,
|
||||
"maxStep": max_step,
|
||||
"samplesPerSecond": None,
|
||||
"estimatedRemainingSeconds": None,
|
||||
"checkpoint": "",
|
||||
"updatedAt": _utc_now(),
|
||||
}
|
||||
|
||||
def _refresh_checkpoint(self) -> bool:
|
||||
latest = _latest_checkpoint(self.workspace)
|
||||
value = str(latest) if latest else ""
|
||||
if value == self.payload.get("checkpoint"):
|
||||
return False
|
||||
self.payload["checkpoint"] = value
|
||||
return True
|
||||
|
||||
def _parse_line(self, line: str) -> bool:
|
||||
changed = False
|
||||
match = re.search(r"Epoch\[(\d+)\].*?GlobalStep\[(\d+)\]", line)
|
||||
if match:
|
||||
epoch = int(match.group(1))
|
||||
step = int(match.group(2))
|
||||
changed = epoch != self.payload.get("epoch") or step != self.payload.get("step")
|
||||
self.payload["epoch"] = epoch
|
||||
self.payload["step"] = step
|
||||
speed = re.search(r"(?:Average )?Training Speed:\s*([0-9]+(?:\.[0-9]+)?)\s+samples/sec", line, re.IGNORECASE)
|
||||
if speed:
|
||||
value = float(speed.group(1))
|
||||
changed = changed or value != self.payload.get("samplesPerSecond")
|
||||
self.payload["samplesPerSecond"] = value
|
||||
remaining = re.search(r"Estimated Remaining Time:\s*([^\t\n]+)", line, re.IGNORECASE)
|
||||
if remaining:
|
||||
value = _parse_duration_seconds(remaining.group(1))
|
||||
changed = changed or value != self.payload.get("estimatedRemainingSeconds")
|
||||
self.payload["estimatedRemainingSeconds"] = value
|
||||
return changed
|
||||
|
||||
def emit(self, *, force: bool = False) -> None:
|
||||
now = time.monotonic()
|
||||
checkpoint_changed = self._refresh_checkpoint()
|
||||
if not force and not checkpoint_changed and now - self.last_emit < self.interval_seconds:
|
||||
return
|
||||
self.last_emit = now
|
||||
self.payload["updatedAt"] = _utc_now()
|
||||
_write_json_atomic(self.workspace_path, self.payload)
|
||||
_write_json_atomic(self.artifact_path, self.payload)
|
||||
sys.stdout.write(PROGRESS_MARKER + json.dumps(self.payload, ensure_ascii=False, separators=(",", ":")) + "\n")
|
||||
sys.stdout.flush()
|
||||
|
||||
def observe(self, line: str | None) -> None:
|
||||
changed = self._parse_line(line) if line else False
|
||||
self.emit(force=changed)
|
||||
|
||||
def finish(self, status: str) -> None:
|
||||
self.payload["status"] = status
|
||||
if status == "completed":
|
||||
self.payload["estimatedRemainingSeconds"] = 0
|
||||
self.emit(force=True)
|
||||
|
||||
|
||||
def _valid_safetensors_header(path: pathlib.Path) -> bool:
|
||||
@ -1054,13 +1373,24 @@ def run_data_prepare(
|
||||
helpers: HelperMap,
|
||||
) -> list[dict[str, Any]]:
|
||||
params = _params(helpers, node_data)
|
||||
training_mode = _training_mode(params)
|
||||
effective_params = dict(params)
|
||||
if training_mode == "smoke" and not _text(effective_params, "ARROW_MAX_EPISODES"):
|
||||
effective_params["ARROW_MAX_EPISODES"] = str(max(1, _int(params, "SMOKE_MAX_EPISODES", 1)))
|
||||
output_path = pathlib.Path(output_dir)
|
||||
output_path.mkdir(parents=True, exist_ok=True)
|
||||
expected = tuple(str(item).strip() for item in _json_list(params, "EXPECTED_LMDB_DIRS_JSON", list(DEFAULT_EXPECTED_LMDB_DIRS)) if str(item).strip())
|
||||
source_root_text = _text(params, "ROBOTWIN_SOURCE_PATH")
|
||||
data_source = _text(params, "DATA_SOURCE", "local").lower()
|
||||
default_expected = [DEFAULT_EXPECTED_LMDB_DIRS[0]] if training_mode == "smoke" else list(DEFAULT_EXPECTED_LMDB_DIRS)
|
||||
expected = tuple(
|
||||
str(item).strip()
|
||||
for item in _json_list(effective_params, "EXPECTED_LMDB_DIRS_JSON", default_expected)
|
||||
if str(item).strip()
|
||||
)
|
||||
if not expected:
|
||||
expected = tuple(default_expected)
|
||||
source_root_text = _text(effective_params, "ROBOTWIN_SOURCE_PATH")
|
||||
data_source = _text(effective_params, "DATA_SOURCE", "local").lower()
|
||||
local_root = _workspace_path_for_bos_uri(source_root_text) if data_source == "bos" else (_path(source_root_text) if source_root_text else output_path / "robotwin-source")
|
||||
hf_repo = _text(params, "ROBOTWIN_HF_REPO", ROBOTWIN_DATASET_REPO)
|
||||
hf_repo = _text(effective_params, "ROBOTWIN_HF_REPO", ROBOTWIN_DATASET_REPO)
|
||||
|
||||
if data_source in {"local", "local_lmdb", "local_raw", "bos"}:
|
||||
if not source_root_text:
|
||||
@ -1075,9 +1405,9 @@ def run_data_prepare(
|
||||
discovered = _discover_dataset_dirs(local_root, expected)
|
||||
conversions: list[dict[str, Any]] = []
|
||||
if len(discovered) < len(expected) and data_source in {"local", "local_raw", "bos"}:
|
||||
converted, conversions = _pack_robotwin_arrow_to_lmdb(local_root, output_path, expected, params)
|
||||
converted, conversions = _pack_robotwin_arrow_to_lmdb(local_root, output_path, expected, effective_params)
|
||||
if not converted:
|
||||
converted, conversions = _pack_robotwin_raw_to_lmdb(local_root, output_path, expected, params)
|
||||
converted, conversions = _pack_robotwin_raw_to_lmdb(local_root, output_path, expected, effective_params)
|
||||
if converted:
|
||||
discovered_by_name = {str(item.get("name")): item for item in discovered}
|
||||
for item in converted:
|
||||
@ -1115,6 +1445,7 @@ def run_data_prepare(
|
||||
payload = {
|
||||
"datasetType": "holobrain-data-manifest",
|
||||
"valid": True,
|
||||
"trainingMode": training_mode,
|
||||
"dataSource": data_source,
|
||||
"source": {
|
||||
"kind": data_source,
|
||||
@ -1132,6 +1463,17 @@ def run_data_prepare(
|
||||
"fileCount": file_count,
|
||||
"sampledSizeBytes": sampled_size_bytes,
|
||||
"sampleCandidates": sample_candidates,
|
||||
"dtypeContract": {
|
||||
"storedRgb": "encoded-bytes",
|
||||
"storedDepth": "sensor-native",
|
||||
"trainingTensor": "float32",
|
||||
"model": "bfloat16",
|
||||
},
|
||||
"smokePolicy": {
|
||||
"realDataRequired": True,
|
||||
"maxEpisodes": _int(effective_params, "ARROW_MAX_EPISODES", 0) if training_mode == "smoke" else 0,
|
||||
"syntheticDataAllowed": False,
|
||||
},
|
||||
"requiresRealData": True,
|
||||
}
|
||||
return _framework_artifacts(helpers, run_id, node_id, output_path, "holobrain-data-manifest.json", payload, node_data=node_data)
|
||||
@ -1139,6 +1481,7 @@ def run_data_prepare(
|
||||
|
||||
def _materialize_data_for_repo(repo_root: pathlib.Path, params: dict[str, str], inputs: list[dict[str, Any]], helpers: HelperMap) -> tuple[pathlib.Path, dict[str, Any]]:
|
||||
payload = _first_payload(inputs, helpers, "holobrain-data-manifest")
|
||||
training_mode = _training_mode(params, str(payload.get("trainingMode") or "full"))
|
||||
data_root = _text(params, "ROBOTWIN_DATA_ROOT") or str(payload.get("robotwinDataRoot") or payload.get("holoBrainDataRoot") or "")
|
||||
if not data_root:
|
||||
raise RuntimeError("HoloBrain training requires ROBOTWIN_DATA_ROOT or an upstream holobrain-data-manifest")
|
||||
@ -1146,7 +1489,28 @@ def _materialize_data_for_repo(repo_root: pathlib.Path, params: dict[str, str],
|
||||
if not source.exists():
|
||||
raise RuntimeError(f"RoboTwin data root does not exist: {source}")
|
||||
target = repo_root / "projects" / "holobrain" / "data" / "robotwin2.0"
|
||||
_safe_link_or_copy(source, target)
|
||||
if training_mode == "smoke":
|
||||
# The official robotwin2_0 config names both clean and randomized
|
||||
# directories. A real smoke subset may intentionally contain only a
|
||||
# clean LMDB. Build an idempotent overlay and map the second config
|
||||
# path to the same real subset instead of mutating the source mount.
|
||||
if target.is_symlink() or (target.exists() and not target.is_dir()):
|
||||
target.unlink()
|
||||
target.mkdir(parents=True, exist_ok=True)
|
||||
for child in sorted(source.iterdir()):
|
||||
if child.is_dir():
|
||||
_safe_link_or_copy(child, target / child.name)
|
||||
clean = target / "aloha_agilex_demo_clean"
|
||||
randomized = target / "aloha_agilex_demo_randomized"
|
||||
if clean.exists() and not randomized.exists():
|
||||
_safe_link_or_copy(clean, randomized)
|
||||
if not clean.exists() or not randomized.exists():
|
||||
raise RuntimeError(
|
||||
"Smoke training requires a real aloha_agilex_demo_clean LMDB; "
|
||||
"the idempotent RoboTwin config overlay could not be initialized"
|
||||
)
|
||||
else:
|
||||
_safe_link_or_copy(source, target)
|
||||
return target, payload
|
||||
|
||||
|
||||
@ -1159,6 +1523,7 @@ def run_train(
|
||||
helpers: HelperMap,
|
||||
) -> list[dict[str, Any]]:
|
||||
params = _params(helpers, node_data)
|
||||
training_mode = _training_mode(params)
|
||||
output_path = pathlib.Path(output_dir)
|
||||
output_path.mkdir(parents=True, exist_ok=True)
|
||||
repo_root = _ensure_roboorchard_repo(params, output_path)
|
||||
@ -1169,12 +1534,24 @@ def run_train(
|
||||
data_root, data_payload = _materialize_data_for_repo(repo_root, params, inputs, helpers)
|
||||
workspace = _path(_text(params, "WORKSPACE", str(output_path / "holobrain-workspace")))
|
||||
logging_dir = _path(_text(params, "LOGGING_DIR", str(workspace / "logs")))
|
||||
workspace.mkdir(parents=True, exist_ok=True)
|
||||
logging_dir.mkdir(parents=True, exist_ok=True)
|
||||
kwargs = _json_dict(params, "CONFIG_KWARGS_JSON", {})
|
||||
kwargs_path = None
|
||||
if kwargs:
|
||||
kwargs_path = output_path / "config-kwargs.json"
|
||||
kwargs_path.write_text(json.dumps(kwargs, ensure_ascii=False, indent=2), encoding="utf-8")
|
||||
if training_mode == "smoke":
|
||||
kwargs = _apply_smoke_training_defaults(params, kwargs)
|
||||
resume_checkpoint, resume_policy = _resolve_resume_checkpoint(params, kwargs, workspace)
|
||||
initial_checkpoint = _text(params, "INITIAL_CHECKPOINT_PATH")
|
||||
if initial_checkpoint:
|
||||
initial_checkpoint_path = _path(initial_checkpoint)
|
||||
if not _valid_model_checkpoint(initial_checkpoint_path):
|
||||
raise RuntimeError(f"INITIAL_CHECKPOINT_PATH is not a valid model checkpoint: {initial_checkpoint_path}")
|
||||
kwargs["checkpoint"] = str(initial_checkpoint_path)
|
||||
dtype_preflight, dtype_preflight_path = _dtype_preflight(params, kwargs, config_path, output_path)
|
||||
kwargs_path = output_path / "config-kwargs.json"
|
||||
kwargs_path.write_text(json.dumps(kwargs, ensure_ascii=False, indent=2), encoding="utf-8")
|
||||
launch_mode = _text(params, "LAUNCH_MODE", "single").lower()
|
||||
if launch_mode not in {"single", "accelerate"}:
|
||||
raise RuntimeError("LAUNCH_MODE must be single or accelerate")
|
||||
script = project_dir / "scripts" / "train.py"
|
||||
if launch_mode == "accelerate":
|
||||
gpu_count = _int(params, "GPU_COUNT", 1)
|
||||
@ -1196,8 +1573,7 @@ def run_train(
|
||||
command.extend([str(script), "--workspace", str(workspace), "--logging_dir", str(logging_dir), "--config", str(config_path)])
|
||||
else:
|
||||
command = [sys.executable, str(script), "--workspace", str(workspace), "--logging_dir", str(logging_dir), "--config", str(config_path)]
|
||||
if kwargs_path is not None:
|
||||
command.extend(["--kwargs", str(kwargs_path)])
|
||||
command.extend(["--kwargs", str(kwargs_path)])
|
||||
env = _command_env(params, output_path)
|
||||
hf_runtime = {
|
||||
"hfHome": env.get("HF_HOME", ""),
|
||||
@ -1206,28 +1582,50 @@ def run_train(
|
||||
and env.get("TRANSFORMERS_OFFLINE", "") == "1"
|
||||
and env.get("HF_DATASETS_OFFLINE", "") == "1",
|
||||
}
|
||||
command_path, stdout_path, stderr_path = _run_command(
|
||||
command,
|
||||
project_dir,
|
||||
output_path,
|
||||
env,
|
||||
{
|
||||
"framework": "RoboOrchardLab HoloBrain train",
|
||||
"config": str(config_path),
|
||||
"workspace": str(workspace),
|
||||
"dataRoot": str(data_root),
|
||||
"model": HOLOBRAIN_MODEL_REPO,
|
||||
"hfRuntime": hf_runtime,
|
||||
"launchMode": launch_mode,
|
||||
"fullTrainingDefault": True,
|
||||
},
|
||||
max_step = int(kwargs.get("max_step", _int(params, "MAX_STEP", 100000)))
|
||||
progress_reporter = _TrainingProgressReporter(
|
||||
run_id=run_id,
|
||||
node_id=node_id,
|
||||
output_path=output_path,
|
||||
workspace=workspace,
|
||||
max_step=max_step,
|
||||
training_mode=training_mode,
|
||||
interval_seconds=max(1, _int(params, "PROGRESS_INTERVAL_SECONDS", 15)),
|
||||
)
|
||||
progress_reporter.emit(force=True)
|
||||
try:
|
||||
command_path, stdout_path, stderr_path = _run_command(
|
||||
command,
|
||||
project_dir,
|
||||
output_path,
|
||||
env,
|
||||
{
|
||||
"framework": "RoboOrchardLab HoloBrain train",
|
||||
"config": str(config_path),
|
||||
"workspace": str(workspace),
|
||||
"dataRoot": str(data_root),
|
||||
"model": HOLOBRAIN_MODEL_REPO,
|
||||
"hfRuntime": hf_runtime,
|
||||
"launchMode": launch_mode,
|
||||
"trainingMode": training_mode,
|
||||
"resumePolicy": resume_policy,
|
||||
"resumeFrom": str(resume_checkpoint) if resume_checkpoint else "",
|
||||
"fullTrainingDefault": training_mode == "full",
|
||||
},
|
||||
progress_callback=progress_reporter.observe,
|
||||
)
|
||||
except Exception:
|
||||
progress_reporter.finish("failed")
|
||||
raise
|
||||
progress_reporter.finish("completed")
|
||||
progress = _parse_training_progress(stdout_path, stderr_path)
|
||||
latest_checkpoint = _latest_checkpoint(workspace)
|
||||
latest_checkpoint, checkpoint_artifact_selection = _select_output_checkpoint(params, workspace)
|
||||
structured_progress = json.loads(progress_reporter.artifact_path.read_text(encoding="utf-8"))
|
||||
report = {
|
||||
"datasetType": "holobrain-training-report",
|
||||
"valid": True,
|
||||
"status": "completed",
|
||||
"trainingMode": training_mode,
|
||||
"framework": "RoboOrchardLab HoloBrain",
|
||||
"model": {
|
||||
"repo": HOLOBRAIN_MODEL_REPO,
|
||||
@ -1237,7 +1635,7 @@ def run_train(
|
||||
"config": {
|
||||
"path": str(config_path),
|
||||
"sourceUrl": "https://github.com/HorizonRobotics/RoboOrchardLab/blob/master/projects/holobrain/configs/config_holobrain_qwen_common.py",
|
||||
"maxStep": int(kwargs.get("max_step", _int(params, "MAX_STEP", 100000))),
|
||||
"maxStep": max_step,
|
||||
"kwargs": kwargs,
|
||||
},
|
||||
"data": {
|
||||
@ -1249,11 +1647,26 @@ def run_train(
|
||||
"stderrPath": str(stderr_path),
|
||||
"trainingWorkspace": str(workspace),
|
||||
"latestCheckpoint": str(latest_checkpoint) if latest_checkpoint else "",
|
||||
"checkpointArtifactSelection": checkpoint_artifact_selection,
|
||||
"resume": {
|
||||
"policy": resume_policy,
|
||||
"selected": str(resume_checkpoint) if resume_checkpoint else "",
|
||||
"automaticallySelected": resume_policy == "auto" and resume_checkpoint is not None,
|
||||
},
|
||||
"dtypePreflight": dtype_preflight,
|
||||
"progress": structured_progress,
|
||||
"currentStep": progress.get("currentStep"),
|
||||
"lossSamples": progress.get("lossSamples", []),
|
||||
"finalLoss": progress.get("finalLoss"),
|
||||
}
|
||||
extras = [(command_path, "json"), (stdout_path, "text"), (stderr_path, "text")]
|
||||
extras = [
|
||||
(command_path, "json"),
|
||||
(stdout_path, "text"),
|
||||
(stderr_path, "text"),
|
||||
(kwargs_path, "json"),
|
||||
(dtype_preflight_path, "json"),
|
||||
(progress_reporter.artifact_path, "json"),
|
||||
]
|
||||
if latest_checkpoint and latest_checkpoint.is_file():
|
||||
extras.append((latest_checkpoint, "model"))
|
||||
return _framework_artifacts(helpers, run_id, node_id, output_path, "holobrain-training-report.json", report, extras, node_data)
|
||||
@ -1286,19 +1699,51 @@ def run_export(
|
||||
project_dir = repo_root / DEFAULT_PROJECT_DIR
|
||||
config_path = repo_root / _text(params, "CONFIG_PATH", DEFAULT_CONFIG)
|
||||
train_payload = _first_payload(inputs, helpers, "holobrain-training-report")
|
||||
training_mode = _training_mode(params, str(train_payload.get("trainingMode") or "full"))
|
||||
train_workspace = _path(_text(params, "TRAINING_WORKSPACE") or str(train_payload.get("trainingWorkspace") or ""))
|
||||
checkpoint = _text(params, "CHECKPOINT_PATH") or str(train_payload.get("latestCheckpoint") or "")
|
||||
if not checkpoint and train_workspace.exists():
|
||||
latest = _latest_checkpoint(train_workspace)
|
||||
checkpoint = str(latest) if latest else ""
|
||||
checkpoint_selection = _text(params, "CHECKPOINT_SELECTION", "latest_valid").lower()
|
||||
if checkpoint_selection not in {"latest_valid", "upstream", "explicit"}:
|
||||
raise RuntimeError("CHECKPOINT_SELECTION must be latest_valid, upstream, or explicit")
|
||||
explicit_checkpoint = _text(params, "CHECKPOINT_PATH")
|
||||
upstream_checkpoint = str(train_payload.get("latestCheckpoint") or "").strip()
|
||||
checkpoint = ""
|
||||
if checkpoint_selection == "explicit":
|
||||
if not explicit_checkpoint:
|
||||
raise RuntimeError("CHECKPOINT_PATH is required when CHECKPOINT_SELECTION=explicit")
|
||||
checkpoint = explicit_checkpoint
|
||||
elif checkpoint_selection == "upstream":
|
||||
checkpoint = upstream_checkpoint or explicit_checkpoint
|
||||
else:
|
||||
if explicit_checkpoint:
|
||||
checkpoint = explicit_checkpoint
|
||||
elif train_workspace.exists():
|
||||
latest = _latest_checkpoint(train_workspace)
|
||||
checkpoint = str(latest) if latest else ""
|
||||
if not checkpoint:
|
||||
checkpoint = upstream_checkpoint
|
||||
if training_mode == "smoke" and not checkpoint:
|
||||
raise RuntimeError("Smoke export requires a valid checkpoint produced by the smoke training node")
|
||||
checkpoint_validation: dict[str, Any] = {"validated": False, "reason": "not-configured"}
|
||||
if checkpoint:
|
||||
checkpoint_path, checkpoint_validation = _resolve_safetensors_checkpoint(_path(checkpoint))
|
||||
if checkpoint_path.is_dir():
|
||||
checkpoint_model = _checkpoint_model_file(checkpoint_path)
|
||||
if checkpoint_model is not None:
|
||||
checkpoint_path = checkpoint_model
|
||||
checkpoint_validation = {
|
||||
**checkpoint_validation,
|
||||
"validated": True,
|
||||
"resolvedFromTrainingStateDir": checkpoint,
|
||||
"checkpoint": str(checkpoint_path),
|
||||
}
|
||||
if training_mode == "smoke" and not _valid_model_checkpoint(checkpoint_path):
|
||||
raise RuntimeError(f"Selected HoloBrain export checkpoint is not valid: {checkpoint_path}")
|
||||
checkpoint = str(checkpoint_path)
|
||||
kwargs = _json_dict(params, "CONFIG_KWARGS_JSON", {})
|
||||
if checkpoint:
|
||||
kwargs["checkpoint"] = checkpoint
|
||||
workspace = _path(_text(params, "EXPORT_WORKSPACE", str(output_path / "holobrain-export")))
|
||||
workspace.mkdir(parents=True, exist_ok=True)
|
||||
source_urdf_dir = project_dir / "urdf"
|
||||
if source_urdf_dir.is_dir():
|
||||
shutil.copytree(source_urdf_dir, workspace / "urdf", dirs_exist_ok=True)
|
||||
@ -1317,6 +1762,8 @@ def run_export(
|
||||
{
|
||||
"framework": "RoboOrchardLab HoloBrain export",
|
||||
"workspace": str(workspace),
|
||||
"trainingMode": training_mode,
|
||||
"checkpointSelection": checkpoint_selection,
|
||||
"checkpoint": checkpoint,
|
||||
"checkpointValidation": checkpoint_validation,
|
||||
},
|
||||
@ -1333,10 +1780,12 @@ def run_export(
|
||||
"datasetType": "holobrain-export-manifest",
|
||||
"valid": model_dir.exists(),
|
||||
"status": "completed",
|
||||
"trainingMode": training_mode,
|
||||
"exportWorkspace": str(workspace),
|
||||
"exportedModelDir": str(model_dir),
|
||||
"modelArchive": str(archive_path) if archive_path.exists() else "",
|
||||
"checkpoint": checkpoint,
|
||||
"checkpointSelection": checkpoint_selection,
|
||||
"checkpointValidation": checkpoint_validation,
|
||||
"modelSafetensorsValidation": model_validation,
|
||||
"commandPath": str(command_path),
|
||||
@ -1363,10 +1812,20 @@ def run_robotwin_eval(
|
||||
output_path.mkdir(parents=True, exist_ok=True)
|
||||
repo_root = _ensure_roboorchard_repo(params, output_path)
|
||||
project_dir = repo_root / DEFAULT_PROJECT_DIR
|
||||
export_payload = _first_payload(inputs, helpers, "holobrain-export-manifest")
|
||||
training_mode = _training_mode(params, str(export_payload.get("trainingMode") or "full"))
|
||||
model_dir = _model_dir_from_inputs(params, inputs, helpers)
|
||||
output_json = output_path / "robotwin-eval-result.json"
|
||||
task_names = [str(item) for item in _json_list(params, "TASK_NAMES_JSON", []) if str(item).strip()]
|
||||
task_names = (
|
||||
[_text(params, "SMOKE_TASK_NAME", "beat_block_hammer")]
|
||||
if training_mode == "smoke"
|
||||
else [str(item) for item in _json_list(params, "TASK_NAMES_JSON", []) if str(item).strip()]
|
||||
)
|
||||
gpu_ids = [str(item) for item in _json_list(params, "GPU_IDS_JSON", [0]) if str(item).strip() != ""]
|
||||
eval_mode = _text(params, "SMOKE_EVAL_MODE", "local") if training_mode == "smoke" else _text(params, "EVAL_MODE", "ray")
|
||||
if eval_mode not in {"local", "ray"}:
|
||||
raise RuntimeError("EVAL_MODE must be local or ray")
|
||||
episode_num = _int(params, "SMOKE_EVAL_EPISODE_NUM", 1) if training_mode == "smoke" else _int(params, "EPISODE_NUM", 100)
|
||||
command = [
|
||||
sys.executable,
|
||||
str(project_dir / "scripts" / "robotwin_eval.py"),
|
||||
@ -1375,9 +1834,9 @@ def run_robotwin_eval(
|
||||
"--inference_prefix",
|
||||
_text(params, "INFERENCE_PREFIX", "robotwin2_0"),
|
||||
"--episode_num",
|
||||
str(_int(params, "EPISODE_NUM", 100)),
|
||||
str(episode_num),
|
||||
"--mode",
|
||||
_text(params, "EVAL_MODE", "ray"),
|
||||
eval_mode,
|
||||
"--config_type",
|
||||
_text(params, "CONFIG_TYPE", "demo_clean"),
|
||||
"--output_path",
|
||||
@ -1387,7 +1846,10 @@ def run_robotwin_eval(
|
||||
]
|
||||
if task_names:
|
||||
command.extend(["--task_names", *task_names])
|
||||
if gpu_ids:
|
||||
device = _text(params, "SMOKE_DEVICE", "cuda") if training_mode == "smoke" else _text(params, "DEVICE")
|
||||
if device:
|
||||
command.extend(["--device", device])
|
||||
if gpu_ids and eval_mode == "ray":
|
||||
command.extend(["--gpu_ids", *gpu_ids])
|
||||
if _bool(params, "SAVE_VIDEO", False):
|
||||
command.append("--save_video")
|
||||
@ -1397,7 +1859,14 @@ def run_robotwin_eval(
|
||||
project_dir,
|
||||
output_path,
|
||||
env,
|
||||
{"framework": "RoboOrchardLab HoloBrain RoboTwin eval", "modelDir": str(model_dir)},
|
||||
{
|
||||
"framework": "RoboOrchardLab HoloBrain RoboTwin eval",
|
||||
"modelDir": str(model_dir),
|
||||
"trainingMode": training_mode,
|
||||
"taskNames": task_names,
|
||||
"episodeNum": episode_num,
|
||||
"evalMode": eval_mode,
|
||||
},
|
||||
)
|
||||
metrics: dict[str, Any] = {}
|
||||
if output_json.exists():
|
||||
@ -1406,6 +1875,15 @@ def run_robotwin_eval(
|
||||
"datasetType": "holobrain-robotwin-evaluation",
|
||||
"valid": output_json.exists(),
|
||||
"status": "completed",
|
||||
"trainingMode": training_mode,
|
||||
"execution": {
|
||||
"backend": "official-robotwin-evaluator",
|
||||
"mode": eval_mode,
|
||||
"taskNames": task_names,
|
||||
"episodeNum": episode_num,
|
||||
"device": device,
|
||||
"syntheticResult": False,
|
||||
},
|
||||
"modelDir": str(model_dir),
|
||||
"metrics": metrics,
|
||||
"commandPath": str(command_path),
|
||||
@ -1435,59 +1913,87 @@ def run_inference_test(
|
||||
params = _params(helpers, node_data)
|
||||
output_path = pathlib.Path(output_dir)
|
||||
output_path.mkdir(parents=True, exist_ok=True)
|
||||
repo_root = _ensure_roboorchard_repo(params, output_path)
|
||||
project_dir = repo_root / DEFAULT_PROJECT_DIR
|
||||
export_payload = _first_payload(inputs, helpers, "holobrain-export-manifest")
|
||||
training_mode = _training_mode(params, str(export_payload.get("trainingMode") or "full"))
|
||||
model_dir = _model_dir_from_inputs(params, inputs, helpers)
|
||||
sample_path = _text(params, "SAMPLE_INPUT_PATH")
|
||||
if not sample_path:
|
||||
for payload in _artifact_payloads(inputs, helpers):
|
||||
candidates = payload.get("sampleCandidates")
|
||||
if isinstance(candidates, list) and candidates:
|
||||
sample_path = str(candidates[0])
|
||||
break
|
||||
if not sample_path:
|
||||
raise RuntimeError("HoloBrain inference test requires SAMPLE_INPUT_PATH or upstream real sampleCandidates")
|
||||
sample = _path(sample_path)
|
||||
if not sample.exists():
|
||||
raise RuntimeError(f"SAMPLE_INPUT_PATH does not exist: {sample}")
|
||||
script = output_path / "holobrain_inference_smoke.py"
|
||||
result_path = output_path / "holobrain-inference-result.json"
|
||||
script.write_text(
|
||||
"""
|
||||
import json
|
||||
import pathlib
|
||||
import sys
|
||||
|
||||
model_dir = pathlib.Path(sys.argv[1])
|
||||
sample_path = pathlib.Path(sys.argv[2])
|
||||
result_path = pathlib.Path(sys.argv[3])
|
||||
|
||||
config_files = sorted(path.name for path in model_dir.glob("*.config.json"))
|
||||
if not config_files:
|
||||
raise SystemExit(f"no inference config files found in {model_dir}")
|
||||
payload = {
|
||||
"datasetType": "holobrain-inference-test",
|
||||
"valid": True,
|
||||
"modelDir": str(model_dir),
|
||||
"samplePath": str(sample_path),
|
||||
"sampleSuffix": sample_path.suffix,
|
||||
"inferencePrefixes": [name[:-len(".config.json")] for name in config_files],
|
||||
"note": "Validated exported HoloBrain pipeline files against a real sample path; full action inference requires a task-specific sample decoder.",
|
||||
}
|
||||
result_path.write_text(json.dumps(payload, ensure_ascii=False, indent=2), encoding="utf-8")
|
||||
""".strip()
|
||||
+ "\n",
|
||||
encoding="utf-8",
|
||||
)
|
||||
command = [sys.executable, str(script), str(model_dir), str(sample), str(result_path)]
|
||||
inference_prefix = _text(params, "INFERENCE_PREFIX", "robotwin2_0")
|
||||
task_name = _text(params, "TASK_NAME", "beat_block_hammer")
|
||||
episode_num = max(1, _int(params, "EPISODE_NUM", 1))
|
||||
inference_mode = _text(params, "INFERENCE_MODE", "local").lower()
|
||||
if inference_mode not in {"local", "ray"}:
|
||||
raise RuntimeError("INFERENCE_MODE must be local or ray")
|
||||
device = _text(params, "DEVICE", "cuda")
|
||||
metrics_path = output_path / "holobrain-inference-metrics.json"
|
||||
command = [
|
||||
sys.executable,
|
||||
str(project_dir / "scripts" / "robotwin_eval.py"),
|
||||
"--model_dir",
|
||||
str(model_dir),
|
||||
"--inference_prefix",
|
||||
inference_prefix,
|
||||
"--episode_num",
|
||||
str(episode_num),
|
||||
"--mode",
|
||||
inference_mode,
|
||||
"--config_type",
|
||||
_text(params, "CONFIG_TYPE", "demo_clean"),
|
||||
"--output_path",
|
||||
str(metrics_path),
|
||||
"--workers_per_gpu",
|
||||
str(max(1, _int(params, "WORKERS_PER_GPU", 1))),
|
||||
"--task_names",
|
||||
task_name,
|
||||
"--device",
|
||||
device,
|
||||
]
|
||||
if inference_mode == "ray":
|
||||
gpu_ids = [str(item) for item in _json_list(params, "GPU_IDS_JSON", [0]) if str(item).strip() != ""]
|
||||
if not gpu_ids:
|
||||
raise RuntimeError("GPU_IDS_JSON must contain at least one GPU id when INFERENCE_MODE=ray")
|
||||
command.extend(["--gpu_ids", *gpu_ids])
|
||||
env = _command_env(params, output_path)
|
||||
command_path, stdout_path, stderr_path = _run_command(
|
||||
command,
|
||||
output_path,
|
||||
project_dir,
|
||||
output_path,
|
||||
env,
|
||||
{"framework": "HoloBrain inference smoke", "modelDir": str(model_dir), "samplePath": str(sample)},
|
||||
{
|
||||
"framework": "RoboOrchardLab HoloBrain real inference smoke",
|
||||
"modelDir": str(model_dir),
|
||||
"trainingMode": training_mode,
|
||||
"taskName": task_name,
|
||||
"episodeNum": episode_num,
|
||||
"inferenceMode": inference_mode,
|
||||
},
|
||||
)
|
||||
payload = json.loads(result_path.read_text(encoding="utf-8"))
|
||||
payload.update({"commandPath": str(command_path), "stdoutPath": str(stdout_path), "stderrPath": str(stderr_path)})
|
||||
dry_run = str(env.get("HOLOBRAIN_OPERATOR_DRY_RUN", "")).strip().lower() in TRUE_VALUES
|
||||
if not metrics_path.exists() and not dry_run:
|
||||
raise RuntimeError("Official RoboTwin inference smoke completed without writing metrics")
|
||||
metrics = json.loads(metrics_path.read_text(encoding="utf-8")) if metrics_path.exists() else {}
|
||||
payload = {
|
||||
"datasetType": "holobrain-inference-test",
|
||||
"valid": not dry_run,
|
||||
"status": "dry-run" if dry_run else "completed",
|
||||
"trainingMode": training_mode,
|
||||
"modelDir": str(model_dir),
|
||||
"metrics": metrics,
|
||||
"execution": {
|
||||
"backend": "official-robotwin-evaluator",
|
||||
"actualModelExecution": not dry_run,
|
||||
"syntheticResult": False,
|
||||
"dryRun": dry_run,
|
||||
"inferencePrefix": inference_prefix,
|
||||
"taskName": task_name,
|
||||
"episodeNum": episode_num,
|
||||
"mode": inference_mode,
|
||||
"device": device,
|
||||
},
|
||||
"commandPath": str(command_path),
|
||||
"stdoutPath": str(stdout_path),
|
||||
"stderrPath": str(stderr_path),
|
||||
}
|
||||
return _framework_artifacts(
|
||||
helpers,
|
||||
run_id,
|
||||
@ -1495,6 +2001,6 @@ result_path.write_text(json.dumps(payload, ensure_ascii=False, indent=2), encodi
|
||||
output_path,
|
||||
"holobrain-inference-result.json",
|
||||
payload,
|
||||
[(command_path, "json"), (stdout_path, "text"), (stderr_path, "text")],
|
||||
[(command_path, "json"), (stdout_path, "text"), (stderr_path, "text"), (metrics_path, "json")],
|
||||
node_data,
|
||||
)
|
||||
|
||||
@ -0,0 +1,79 @@
|
||||
{
|
||||
"acceptance": {
|
||||
"hardcodedOutputAccepted": false,
|
||||
"mockOnlyAccepted": false,
|
||||
"pocFullAcceptanceScript": "scripts/poc-operator-full-acceptance.sh",
|
||||
"requiresPersistentWorkspaceEvidence": true,
|
||||
"requiresRealInputs": true,
|
||||
"shallowOnlyAccepted": false,
|
||||
"simulationOnlyAccepted": false
|
||||
},
|
||||
"category": "AI",
|
||||
"containerArgs": [],
|
||||
"containerCommand": [
|
||||
"python",
|
||||
"/app/backend/operator-runner/main.py"
|
||||
],
|
||||
"containerEntrypoint": "backend/operator-runner/main.py",
|
||||
"entrypoint": "operator.py",
|
||||
"image": "ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/droboticflow-operator-holobrain-robotwin-eval:bd25938-holobrain-evalsapien-20260709032957",
|
||||
"imageId": "ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/droboticflow-operator-holobrain-robotwin-eval@sha256:4f0ca2efcb3d69ad672df06dc28805ce3587c5ad8df4ee790677ea719fc32add",
|
||||
"metadata": "operator.json",
|
||||
"name": "HoloBrain RoboTwin 评测",
|
||||
"operatorId": "operator-builtin-holobrain-robotwin-eval",
|
||||
"operatorSlug": "holobrain_robotwin_eval",
|
||||
"preferredSlug": "holobrain_robotwin_eval",
|
||||
"pythonImport": "backend.operators.builtin.holobrain_robotwin_eval.operator:run",
|
||||
"repositoryId": "builtin/holobrain_robotwin_eval",
|
||||
"runtimeContract": {
|
||||
"acceptance": {
|
||||
"requiresArtifactChecksum": true,
|
||||
"requiresFixtureChecksum": true,
|
||||
"requiresGpuEvidence": true,
|
||||
"requiresRealFixture": true,
|
||||
"requiresWorkflowTransfer": true
|
||||
},
|
||||
"artifacts": {
|
||||
"requiresChecksum": true,
|
||||
"requiresLineage": true,
|
||||
"requiresManifest": true
|
||||
},
|
||||
"entrypoint": "/app/backend/operator-runner/main.py",
|
||||
"handler": "builtin_holobrain_robotwin_eval",
|
||||
"imagePolicy": {
|
||||
"allowsSharedBaseLayer": true,
|
||||
"forbidsSharedOperatorRunnerFinalImage": true,
|
||||
"independentFinalImage": true
|
||||
},
|
||||
"operatorId": "operator-builtin-holobrain-robotwin-eval",
|
||||
"operatorSlug": "holobrain_robotwin_eval",
|
||||
"parameters": {
|
||||
"commandWrapperAllowed": false,
|
||||
"controlledScriptAllowed": false,
|
||||
"source": "hyperparams",
|
||||
"structured": true
|
||||
},
|
||||
"resources": {
|
||||
"minGpuCount": 1,
|
||||
"recommendedGpuType": "NVIDIA A800 80GB",
|
||||
"requiresGpu": true
|
||||
},
|
||||
"runtimeDependencies": [
|
||||
"roboorchardlab-robotwin-eval",
|
||||
"robotwin-benchmark",
|
||||
"gpu-a800"
|
||||
],
|
||||
"schemaVersion": "droboticflow.operator.runtime/v1"
|
||||
},
|
||||
"runtimeDependencies": [
|
||||
"roboorchardlab-robotwin-eval",
|
||||
"robotwin-benchmark",
|
||||
"gpu-a800"
|
||||
],
|
||||
"runtimeHandler": "builtin_holobrain_robotwin_eval",
|
||||
"runtimeSource": "backend/operators/builtin/holobrain_robotwin_eval/operator.py",
|
||||
"schemaVersion": "droboticflow.operator.repository/v1",
|
||||
"sourceRoot": "backend/operators/builtin/holobrain_robotwin_eval",
|
||||
"strictPocAcceptanceExternals": [],
|
||||
"type": "builtin"
|
||||
}
|
||||
82
backend/operators/builtin/holobrain_train/repository.json
Normal file
82
backend/operators/builtin/holobrain_train/repository.json
Normal file
@ -0,0 +1,82 @@
|
||||
{
|
||||
"acceptance": {
|
||||
"hardcodedOutputAccepted": false,
|
||||
"mockOnlyAccepted": false,
|
||||
"pocFullAcceptanceScript": "scripts/poc-operator-full-acceptance.sh",
|
||||
"requiresPersistentWorkspaceEvidence": true,
|
||||
"requiresRealInputs": true,
|
||||
"shallowOnlyAccepted": false,
|
||||
"simulationOnlyAccepted": false
|
||||
},
|
||||
"category": "AI",
|
||||
"containerArgs": [],
|
||||
"containerCommand": [
|
||||
"python",
|
||||
"/app/backend/operator-runner/main.py"
|
||||
],
|
||||
"containerEntrypoint": "backend/operator-runner/main.py",
|
||||
"entrypoint": "operator.py",
|
||||
"image": "ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/droboticflow-operator-holobrain-train:5289510-holobrain-offline28-20260708044102",
|
||||
"imageId": "ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/droboticflow-operator-holobrain-train@sha256:a21bb31ad50efed8cb12ab18e76ba6a394f648582273cbac47a305129198ed0b",
|
||||
"metadata": "operator.json",
|
||||
"name": "HoloBrain 完整训练",
|
||||
"operatorId": "operator-builtin-holobrain-train",
|
||||
"operatorSlug": "holobrain_train",
|
||||
"preferredSlug": "holobrain_train",
|
||||
"pythonImport": "backend.operators.builtin.holobrain_train.operator:run",
|
||||
"repositoryId": "builtin/holobrain_train",
|
||||
"runtimeContract": {
|
||||
"acceptance": {
|
||||
"requiresArtifactChecksum": true,
|
||||
"requiresFixtureChecksum": true,
|
||||
"requiresGpuEvidence": true,
|
||||
"requiresRealFixture": true,
|
||||
"requiresWorkflowTransfer": true
|
||||
},
|
||||
"artifacts": {
|
||||
"requiresChecksum": true,
|
||||
"requiresLineage": true,
|
||||
"requiresManifest": true
|
||||
},
|
||||
"entrypoint": "/app/backend/operator-runner/main.py",
|
||||
"handler": "builtin_holobrain_train",
|
||||
"imagePolicy": {
|
||||
"allowsSharedBaseLayer": true,
|
||||
"forbidsSharedOperatorRunnerFinalImage": true,
|
||||
"independentFinalImage": true
|
||||
},
|
||||
"longRunning": true,
|
||||
"operatorId": "operator-builtin-holobrain-train",
|
||||
"operatorSlug": "holobrain_train",
|
||||
"parameters": {
|
||||
"commandWrapperAllowed": false,
|
||||
"controlledScriptAllowed": false,
|
||||
"source": "hyperparams",
|
||||
"structured": true
|
||||
},
|
||||
"resources": {
|
||||
"minGpuCount": 1,
|
||||
"recommendedGpuType": "NVIDIA A800 80GB",
|
||||
"requiresGpu": true
|
||||
},
|
||||
"runtimeDependencies": [
|
||||
"roboorchardlab-holobrain-train",
|
||||
"official-robotwin2-dataset",
|
||||
"qwen-vl-checkpoint",
|
||||
"gpu-a800"
|
||||
],
|
||||
"schemaVersion": "droboticflow.operator.runtime/v1"
|
||||
},
|
||||
"runtimeDependencies": [
|
||||
"roboorchardlab-holobrain-train",
|
||||
"official-robotwin2-dataset",
|
||||
"qwen-vl-checkpoint",
|
||||
"gpu-a800"
|
||||
],
|
||||
"runtimeHandler": "builtin_holobrain_train",
|
||||
"runtimeSource": "backend/operators/builtin/holobrain_train/operator.py",
|
||||
"schemaVersion": "droboticflow.operator.repository/v1",
|
||||
"sourceRoot": "backend/operators/builtin/holobrain_train",
|
||||
"strictPocAcceptanceExternals": [],
|
||||
"type": "builtin"
|
||||
}
|
||||
@ -49,6 +49,7 @@
|
||||
"operatorSlug": "human_review",
|
||||
"parameters": {
|
||||
"commandWrapperAllowed": false,
|
||||
"controlledScriptAllowed": false,
|
||||
"source": "hyperparams",
|
||||
"structured": true
|
||||
},
|
||||
|
||||
@ -49,6 +49,7 @@
|
||||
"operatorSlug": "joint_limit_validate",
|
||||
"parameters": {
|
||||
"commandWrapperAllowed": false,
|
||||
"controlledScriptAllowed": false,
|
||||
"source": "hyperparams",
|
||||
"structured": true
|
||||
},
|
||||
|
||||
@ -49,6 +49,7 @@
|
||||
"operatorSlug": "json_field_extract",
|
||||
"parameters": {
|
||||
"commandWrapperAllowed": false,
|
||||
"controlledScriptAllowed": false,
|
||||
"source": "hyperparams",
|
||||
"structured": true
|
||||
},
|
||||
|
||||
@ -49,6 +49,7 @@
|
||||
"operatorSlug": "json_filter",
|
||||
"parameters": {
|
||||
"commandWrapperAllowed": false,
|
||||
"controlledScriptAllowed": false,
|
||||
"source": "hyperparams",
|
||||
"structured": true
|
||||
},
|
||||
|
||||
@ -49,6 +49,7 @@
|
||||
"operatorSlug": "json_map_rename",
|
||||
"parameters": {
|
||||
"commandWrapperAllowed": false,
|
||||
"controlledScriptAllowed": false,
|
||||
"source": "hyperparams",
|
||||
"structured": true
|
||||
},
|
||||
|
||||
@ -49,6 +49,7 @@
|
||||
"operatorSlug": "json_to_csv",
|
||||
"parameters": {
|
||||
"commandWrapperAllowed": false,
|
||||
"controlledScriptAllowed": false,
|
||||
"source": "hyperparams",
|
||||
"structured": true
|
||||
},
|
||||
|
||||
@ -49,6 +49,7 @@
|
||||
"operatorSlug": "language_instruction_validate",
|
||||
"parameters": {
|
||||
"commandWrapperAllowed": false,
|
||||
"controlledScriptAllowed": false,
|
||||
"source": "hyperparams",
|
||||
"structured": true
|
||||
},
|
||||
|
||||
@ -49,6 +49,7 @@
|
||||
"operatorSlug": "lerobot_dataset_validate",
|
||||
"parameters": {
|
||||
"commandWrapperAllowed": false,
|
||||
"controlledScriptAllowed": false,
|
||||
"source": "hyperparams",
|
||||
"structured": true
|
||||
},
|
||||
|
||||
@ -49,6 +49,7 @@
|
||||
"operatorSlug": "lerobot_metadata_consistency_validate",
|
||||
"parameters": {
|
||||
"commandWrapperAllowed": false,
|
||||
"controlledScriptAllowed": false,
|
||||
"source": "hyperparams",
|
||||
"structured": true
|
||||
},
|
||||
|
||||
@ -16,8 +16,8 @@
|
||||
],
|
||||
"containerEntrypoint": "backend/operator-runner/main.py",
|
||||
"entrypoint": "operator.py",
|
||||
"image": "ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/droboticflow-operator-lerobot-summary:builtin",
|
||||
"imageId": "ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/droboticflow-operator-lerobot-summary@sha256:c8e1878dced01da3da3a068cd53a395b03061b27f3e52e20cef2faedf4081dbf",
|
||||
"image": "ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/droboticflow-operator-lerobot-summary:69b0e0e-poc-20260630072404",
|
||||
"imageId": "ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/droboticflow-operator-lerobot-summary:69b0e0e-poc-20260630072404@sha256:9cb7288be1a06c0098d0babd83da3e1b821be02644483b8d02ad92145d43dd95",
|
||||
"metadata": "operator.json",
|
||||
"name": "LeRobot 数据集概览",
|
||||
"operatorId": "operator-builtin-lerobot-summary",
|
||||
@ -49,6 +49,7 @@
|
||||
"operatorSlug": "lerobot_summary",
|
||||
"parameters": {
|
||||
"commandWrapperAllowed": false,
|
||||
"controlledScriptAllowed": false,
|
||||
"source": "hyperparams",
|
||||
"structured": true
|
||||
},
|
||||
|
||||
@ -49,6 +49,7 @@
|
||||
"operatorSlug": "lerobot_v3_episode_index_validate",
|
||||
"parameters": {
|
||||
"commandWrapperAllowed": false,
|
||||
"controlledScriptAllowed": false,
|
||||
"source": "hyperparams",
|
||||
"structured": true
|
||||
},
|
||||
|
||||
@ -49,6 +49,7 @@
|
||||
"operatorSlug": "lerobot_video_alignment_validate",
|
||||
"parameters": {
|
||||
"commandWrapperAllowed": false,
|
||||
"controlledScriptAllowed": false,
|
||||
"source": "hyperparams",
|
||||
"structured": true
|
||||
},
|
||||
|
||||
@ -49,6 +49,7 @@
|
||||
"operatorSlug": "libero_hdf5_task_validate",
|
||||
"parameters": {
|
||||
"commandWrapperAllowed": false,
|
||||
"controlledScriptAllowed": false,
|
||||
"source": "hyperparams",
|
||||
"structured": true
|
||||
},
|
||||
|
||||
@ -49,6 +49,7 @@
|
||||
"operatorSlug": "maniskill_trajectory_validate",
|
||||
"parameters": {
|
||||
"commandWrapperAllowed": false,
|
||||
"controlledScriptAllowed": false,
|
||||
"source": "hyperparams",
|
||||
"structured": true
|
||||
},
|
||||
|
||||
@ -49,6 +49,7 @@
|
||||
"operatorSlug": "mcap_topic_summary",
|
||||
"parameters": {
|
||||
"commandWrapperAllowed": false,
|
||||
"controlledScriptAllowed": false,
|
||||
"source": "hyperparams",
|
||||
"structured": true
|
||||
},
|
||||
|
||||
@ -49,6 +49,7 @@
|
||||
"operatorSlug": "media_reference_validate",
|
||||
"parameters": {
|
||||
"commandWrapperAllowed": false,
|
||||
"controlledScriptAllowed": false,
|
||||
"source": "hyperparams",
|
||||
"structured": true
|
||||
},
|
||||
|
||||
@ -49,6 +49,7 @@
|
||||
"operatorSlug": "merge",
|
||||
"parameters": {
|
||||
"commandWrapperAllowed": false,
|
||||
"controlledScriptAllowed": false,
|
||||
"source": "hyperparams",
|
||||
"structured": true
|
||||
},
|
||||
|
||||
@ -49,6 +49,7 @@
|
||||
"operatorSlug": "mjcf_actuator_validate",
|
||||
"parameters": {
|
||||
"commandWrapperAllowed": false,
|
||||
"controlledScriptAllowed": false,
|
||||
"source": "hyperparams",
|
||||
"structured": true
|
||||
},
|
||||
|
||||
@ -49,6 +49,7 @@
|
||||
"operatorSlug": "model_inference",
|
||||
"parameters": {
|
||||
"commandWrapperAllowed": false,
|
||||
"controlledScriptAllowed": false,
|
||||
"source": "hyperparams",
|
||||
"structured": true
|
||||
},
|
||||
|
||||
@ -49,6 +49,7 @@
|
||||
"operatorSlug": "mongodb_write",
|
||||
"parameters": {
|
||||
"commandWrapperAllowed": false,
|
||||
"controlledScriptAllowed": false,
|
||||
"source": "hyperparams",
|
||||
"structured": true
|
||||
},
|
||||
|
||||
@ -16,8 +16,8 @@
|
||||
],
|
||||
"containerEntrypoint": "backend/operator-runner/main.py",
|
||||
"entrypoint": "operator.py",
|
||||
"image": "ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/droboticflow-operator-openvla-finetune:builtin",
|
||||
"imageId": "ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/droboticflow-operator-openvla-finetune@sha256:36184d088fb2ca79a69c6c11adfba4099a1afa32eac7ec3da6408946044837d2",
|
||||
"image": "ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/droboticflow-operator-openvla-finetune:1442552-poc-20260630062516",
|
||||
"imageId": "ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/droboticflow-operator-openvla-finetune:1442552-poc-20260630062516@sha256:dda74e65fa48fd5d33afcece7779455e95569ce036ac74a07789718e69e67b79",
|
||||
"metadata": "operator.json",
|
||||
"name": "OpenVLA 微调训练",
|
||||
"operatorId": "operator-builtin-openvla-finetune",
|
||||
@ -49,6 +49,7 @@
|
||||
"operatorSlug": "openvla_finetune",
|
||||
"parameters": {
|
||||
"commandWrapperAllowed": false,
|
||||
"controlledScriptAllowed": false,
|
||||
"source": "hyperparams",
|
||||
"structured": true
|
||||
},
|
||||
@ -58,15 +59,17 @@
|
||||
"requiresGpu": true
|
||||
},
|
||||
"runtimeDependencies": [
|
||||
"openvla-training-command",
|
||||
"vla-sample-action-manifest",
|
||||
"openvla-lora-finetune",
|
||||
"rlds-vla-dataset",
|
||||
"peft",
|
||||
"gpu-a800"
|
||||
],
|
||||
"schemaVersion": "droboticflow.operator.runtime/v1"
|
||||
},
|
||||
"runtimeDependencies": [
|
||||
"openvla-training-command",
|
||||
"vla-sample-action-manifest",
|
||||
"openvla-lora-finetune",
|
||||
"rlds-vla-dataset",
|
||||
"peft",
|
||||
"gpu-a800"
|
||||
],
|
||||
"runtimeHandler": "builtin_openvla_finetune",
|
||||
|
||||
@ -16,8 +16,8 @@
|
||||
],
|
||||
"containerEntrypoint": "backend/operator-runner/main.py",
|
||||
"entrypoint": "operator.py",
|
||||
"image": "ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/droboticflow-operator-openvla-inference:builtin",
|
||||
"imageId": "ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/droboticflow-operator-openvla-inference@sha256:3336a89556d87b18a268be0234ff95acd6b23405e90c0da6fe9cdcbf7d3c524e",
|
||||
"image": "ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/droboticflow-operator-openvla-inference:a0c1e77-poc-20260630052949",
|
||||
"imageId": "ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/droboticflow-operator-openvla-inference:a0c1e77-poc-20260630052949@sha256:80d5e8e36b2b160f98133c060869e81d78461c6e4feb0166f0984830f3513a3c",
|
||||
"metadata": "operator.json",
|
||||
"name": "OpenVLA 推理",
|
||||
"operatorId": "operator-builtin-openvla-inference",
|
||||
@ -49,6 +49,7 @@
|
||||
"operatorSlug": "openvla_inference",
|
||||
"parameters": {
|
||||
"commandWrapperAllowed": false,
|
||||
"controlledScriptAllowed": false,
|
||||
"source": "hyperparams",
|
||||
"structured": true
|
||||
},
|
||||
@ -58,15 +59,15 @@
|
||||
"requiresGpu": true
|
||||
},
|
||||
"runtimeDependencies": [
|
||||
"openvla-inference-command",
|
||||
"openvla-model-weights",
|
||||
"openvla-transformers-inference",
|
||||
"openvla-model-or-upstream-adapter",
|
||||
"gpu-a800"
|
||||
],
|
||||
"schemaVersion": "droboticflow.operator.runtime/v1"
|
||||
},
|
||||
"runtimeDependencies": [
|
||||
"openvla-inference-command",
|
||||
"openvla-model-weights",
|
||||
"openvla-transformers-inference",
|
||||
"openvla-model-or-upstream-adapter",
|
||||
"gpu-a800"
|
||||
],
|
||||
"runtimeHandler": "builtin_openvla_inference",
|
||||
|
||||
@ -49,6 +49,7 @@
|
||||
"operatorSlug": "package",
|
||||
"parameters": {
|
||||
"commandWrapperAllowed": false,
|
||||
"controlledScriptAllowed": false,
|
||||
"source": "hyperparams",
|
||||
"structured": true
|
||||
},
|
||||
|
||||
@ -49,6 +49,7 @@
|
||||
"operatorSlug": "parquet_table_summary",
|
||||
"parameters": {
|
||||
"commandWrapperAllowed": false,
|
||||
"controlledScriptAllowed": false,
|
||||
"source": "hyperparams",
|
||||
"structured": true
|
||||
},
|
||||
|
||||
@ -49,6 +49,7 @@
|
||||
"operatorSlug": "partnet_mobility_asset_validate",
|
||||
"parameters": {
|
||||
"commandWrapperAllowed": false,
|
||||
"controlledScriptAllowed": false,
|
||||
"source": "hyperparams",
|
||||
"structured": true
|
||||
},
|
||||
|
||||
@ -49,6 +49,7 @@
|
||||
"operatorSlug": "pointcloud_summary",
|
||||
"parameters": {
|
||||
"commandWrapperAllowed": false,
|
||||
"controlledScriptAllowed": false,
|
||||
"source": "hyperparams",
|
||||
"structured": true
|
||||
},
|
||||
|
||||
@ -39,7 +39,7 @@
|
||||
"requiresManifest": true
|
||||
},
|
||||
"entrypoint": "/app/backend/operator-runner/main.py",
|
||||
"handler": "builtin_source",
|
||||
"handler": "source",
|
||||
"imagePolicy": {
|
||||
"allowsSharedBaseLayer": true,
|
||||
"forbidsSharedOperatorRunnerFinalImage": true,
|
||||
@ -49,6 +49,7 @@
|
||||
"operatorSlug": "real_source",
|
||||
"parameters": {
|
||||
"commandWrapperAllowed": false,
|
||||
"controlledScriptAllowed": false,
|
||||
"source": "hyperparams",
|
||||
"structured": true
|
||||
},
|
||||
|
||||
@ -49,6 +49,7 @@
|
||||
"operatorSlug": "rgbd_frame_pair_validate",
|
||||
"parameters": {
|
||||
"commandWrapperAllowed": false,
|
||||
"controlledScriptAllowed": false,
|
||||
"source": "hyperparams",
|
||||
"structured": true
|
||||
},
|
||||
|
||||
@ -49,6 +49,7 @@
|
||||
"operatorSlug": "rh20t_scene_validate",
|
||||
"parameters": {
|
||||
"commandWrapperAllowed": false,
|
||||
"controlledScriptAllowed": false,
|
||||
"source": "hyperparams",
|
||||
"structured": true
|
||||
},
|
||||
|
||||
@ -49,6 +49,7 @@
|
||||
"operatorSlug": "rlbench_dataset_validate",
|
||||
"parameters": {
|
||||
"commandWrapperAllowed": false,
|
||||
"controlledScriptAllowed": false,
|
||||
"source": "hyperparams",
|
||||
"structured": true
|
||||
},
|
||||
|
||||
@ -49,6 +49,7 @@
|
||||
"operatorSlug": "rlds_episode_summary",
|
||||
"parameters": {
|
||||
"commandWrapperAllowed": false,
|
||||
"controlledScriptAllowed": false,
|
||||
"source": "hyperparams",
|
||||
"structured": true
|
||||
},
|
||||
|
||||
@ -49,6 +49,7 @@
|
||||
"operatorSlug": "robocasa_hdf5_demonstration_validate",
|
||||
"parameters": {
|
||||
"commandWrapperAllowed": false,
|
||||
"controlledScriptAllowed": false,
|
||||
"source": "hyperparams",
|
||||
"structured": true
|
||||
},
|
||||
|
||||
@ -49,6 +49,7 @@
|
||||
"operatorSlug": "robomimic_hdf5_validate",
|
||||
"parameters": {
|
||||
"commandWrapperAllowed": false,
|
||||
"controlledScriptAllowed": false,
|
||||
"source": "hyperparams",
|
||||
"structured": true
|
||||
},
|
||||
|
||||
@ -49,6 +49,7 @@
|
||||
"operatorSlug": "robomind_hdf5_quality_validate",
|
||||
"parameters": {
|
||||
"commandWrapperAllowed": false,
|
||||
"controlledScriptAllowed": false,
|
||||
"source": "hyperparams",
|
||||
"structured": true
|
||||
},
|
||||
|
||||
@ -49,6 +49,7 @@
|
||||
"operatorSlug": "roboset_hdf5_validate",
|
||||
"parameters": {
|
||||
"commandWrapperAllowed": false,
|
||||
"controlledScriptAllowed": false,
|
||||
"source": "hyperparams",
|
||||
"structured": true
|
||||
},
|
||||
|
||||
@ -49,6 +49,7 @@
|
||||
"operatorSlug": "robot_model_asset_validate",
|
||||
"parameters": {
|
||||
"commandWrapperAllowed": false,
|
||||
"controlledScriptAllowed": false,
|
||||
"source": "hyperparams",
|
||||
"structured": true
|
||||
},
|
||||
|
||||
@ -49,6 +49,7 @@
|
||||
"operatorSlug": "roboturk_real_hdf5_validate",
|
||||
"parameters": {
|
||||
"commandWrapperAllowed": false,
|
||||
"controlledScriptAllowed": false,
|
||||
"source": "hyperparams",
|
||||
"structured": true
|
||||
},
|
||||
|
||||
@ -49,6 +49,7 @@
|
||||
"operatorSlug": "ros_joint_state_validate",
|
||||
"parameters": {
|
||||
"commandWrapperAllowed": false,
|
||||
"controlledScriptAllowed": false,
|
||||
"source": "hyperparams",
|
||||
"structured": true
|
||||
},
|
||||
|
||||
@ -16,8 +16,8 @@
|
||||
],
|
||||
"containerEntrypoint": "backend/operator-runner/main.py",
|
||||
"entrypoint": "operator.py",
|
||||
"image": "ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/droboticflow-operator-rosbag-summary:builtin",
|
||||
"imageId": "ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/droboticflow-operator-rosbag-summary@sha256:9d41ed0073c84068869b7c844cf2a5362601dab551835a0ce0a3b1a9d00de9c5",
|
||||
"image": "ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/droboticflow-operator-rosbag-summary:69b0e0e-poc-20260630072404",
|
||||
"imageId": "ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/droboticflow-operator-rosbag-summary:69b0e0e-poc-20260630072404@sha256:ac7d5fbcd7cf2b80c51e6f5f972bc66d7b9563ca3ceeaac7ceba6b3101c9b1f0",
|
||||
"metadata": "operator.json",
|
||||
"name": "ROSBag 数据概览",
|
||||
"operatorId": "operator-builtin-rosbag-summary",
|
||||
@ -49,6 +49,7 @@
|
||||
"operatorSlug": "rosbag_summary",
|
||||
"parameters": {
|
||||
"commandWrapperAllowed": false,
|
||||
"controlledScriptAllowed": false,
|
||||
"source": "hyperparams",
|
||||
"structured": true
|
||||
},
|
||||
|
||||
@ -49,6 +49,7 @@
|
||||
"operatorSlug": "rtx_action_schema_validate",
|
||||
"parameters": {
|
||||
"commandWrapperAllowed": false,
|
||||
"controlledScriptAllowed": false,
|
||||
"source": "hyperparams",
|
||||
"structured": true
|
||||
},
|
||||
|
||||
@ -49,6 +49,7 @@
|
||||
"operatorSlug": "segmentation_mask_validate",
|
||||
"parameters": {
|
||||
"commandWrapperAllowed": false,
|
||||
"controlledScriptAllowed": false,
|
||||
"source": "hyperparams",
|
||||
"structured": true
|
||||
},
|
||||
|
||||
@ -49,6 +49,7 @@
|
||||
"operatorSlug": "sensor_timestamp_sync_validate",
|
||||
"parameters": {
|
||||
"commandWrapperAllowed": false,
|
||||
"controlledScriptAllowed": false,
|
||||
"source": "hyperparams",
|
||||
"structured": true
|
||||
},
|
||||
|
||||
@ -48,7 +48,8 @@
|
||||
"operatorId": "operator-builtin-shell-command",
|
||||
"operatorSlug": "shell_command",
|
||||
"parameters": {
|
||||
"commandWrapperAllowed": true,
|
||||
"commandWrapperAllowed": false,
|
||||
"controlledScriptAllowed": true,
|
||||
"source": "hyperparams",
|
||||
"structured": true
|
||||
},
|
||||
|
||||
@ -39,7 +39,7 @@
|
||||
"requiresManifest": true
|
||||
},
|
||||
"entrypoint": "/app/backend/operator-runner/main.py",
|
||||
"handler": "builtin_sim3d_asset_generate",
|
||||
"handler": "sim3d_asset_generate",
|
||||
"imagePolicy": {
|
||||
"allowsSharedBaseLayer": true,
|
||||
"forbidsSharedOperatorRunnerFinalImage": true,
|
||||
@ -49,6 +49,7 @@
|
||||
"operatorSlug": "sim3d_asset_generate",
|
||||
"parameters": {
|
||||
"commandWrapperAllowed": false,
|
||||
"controlledScriptAllowed": false,
|
||||
"source": "hyperparams",
|
||||
"structured": true
|
||||
},
|
||||
|
||||
@ -49,6 +49,7 @@
|
||||
"operatorSlug": "template_render",
|
||||
"parameters": {
|
||||
"commandWrapperAllowed": false,
|
||||
"controlledScriptAllowed": false,
|
||||
"source": "hyperparams",
|
||||
"structured": true
|
||||
},
|
||||
|
||||
@ -49,6 +49,7 @@
|
||||
"operatorSlug": "tf_transform_tree_validate",
|
||||
"parameters": {
|
||||
"commandWrapperAllowed": false,
|
||||
"controlledScriptAllowed": false,
|
||||
"source": "hyperparams",
|
||||
"structured": true
|
||||
},
|
||||
|
||||
@ -49,6 +49,7 @@
|
||||
"operatorSlug": "tfrecord_structural_validate",
|
||||
"parameters": {
|
||||
"commandWrapperAllowed": false,
|
||||
"controlledScriptAllowed": false,
|
||||
"source": "hyperparams",
|
||||
"structured": true
|
||||
},
|
||||
|
||||
@ -49,6 +49,7 @@
|
||||
"operatorSlug": "trajectory_integrity_validate",
|
||||
"parameters": {
|
||||
"commandWrapperAllowed": false,
|
||||
"controlledScriptAllowed": false,
|
||||
"source": "hyperparams",
|
||||
"structured": true
|
||||
},
|
||||
|
||||
@ -49,6 +49,7 @@
|
||||
"operatorSlug": "umi_zarr_dataset_validate",
|
||||
"parameters": {
|
||||
"commandWrapperAllowed": false,
|
||||
"controlledScriptAllowed": false,
|
||||
"source": "hyperparams",
|
||||
"structured": true
|
||||
},
|
||||
|
||||
@ -49,6 +49,7 @@
|
||||
"operatorSlug": "upload",
|
||||
"parameters": {
|
||||
"commandWrapperAllowed": false,
|
||||
"controlledScriptAllowed": false,
|
||||
"source": "hyperparams",
|
||||
"structured": true
|
||||
},
|
||||
|
||||
@ -49,6 +49,7 @@
|
||||
"operatorSlug": "video_annotate",
|
||||
"parameters": {
|
||||
"commandWrapperAllowed": false,
|
||||
"controlledScriptAllowed": false,
|
||||
"source": "hyperparams",
|
||||
"structured": true
|
||||
},
|
||||
|
||||
@ -49,6 +49,7 @@
|
||||
"operatorSlug": "video_filter",
|
||||
"parameters": {
|
||||
"commandWrapperAllowed": false,
|
||||
"controlledScriptAllowed": false,
|
||||
"source": "hyperparams",
|
||||
"structured": true
|
||||
},
|
||||
|
||||
@ -49,6 +49,7 @@
|
||||
"operatorSlug": "video_quality",
|
||||
"parameters": {
|
||||
"commandWrapperAllowed": false,
|
||||
"controlledScriptAllowed": false,
|
||||
"source": "hyperparams",
|
||||
"structured": true
|
||||
},
|
||||
|
||||
@ -49,6 +49,7 @@
|
||||
"operatorSlug": "video_slice",
|
||||
"parameters": {
|
||||
"commandWrapperAllowed": false,
|
||||
"controlledScriptAllowed": false,
|
||||
"source": "hyperparams",
|
||||
"structured": true
|
||||
},
|
||||
|
||||
@ -49,6 +49,7 @@
|
||||
"operatorSlug": "video_target_clip",
|
||||
"parameters": {
|
||||
"commandWrapperAllowed": false,
|
||||
"controlledScriptAllowed": false,
|
||||
"source": "hyperparams",
|
||||
"structured": true
|
||||
},
|
||||
|
||||
@ -39,7 +39,7 @@
|
||||
"requiresManifest": true
|
||||
},
|
||||
"entrypoint": "/app/backend/operator-runner/main.py",
|
||||
"handler": "builtin_vla_model_evaluate",
|
||||
"handler": "vla_model_evaluate",
|
||||
"imagePolicy": {
|
||||
"allowsSharedBaseLayer": true,
|
||||
"forbidsSharedOperatorRunnerFinalImage": true,
|
||||
@ -49,6 +49,7 @@
|
||||
"operatorSlug": "vla_model_evaluate",
|
||||
"parameters": {
|
||||
"commandWrapperAllowed": false,
|
||||
"controlledScriptAllowed": false,
|
||||
"source": "hyperparams",
|
||||
"structured": true
|
||||
},
|
||||
|
||||
@ -39,7 +39,7 @@
|
||||
"requiresManifest": true
|
||||
},
|
||||
"entrypoint": "/app/backend/operator-runner/main.py",
|
||||
"handler": "builtin_vla_model_inference",
|
||||
"handler": "vla_model_inference",
|
||||
"imagePolicy": {
|
||||
"allowsSharedBaseLayer": true,
|
||||
"forbidsSharedOperatorRunnerFinalImage": true,
|
||||
@ -49,6 +49,7 @@
|
||||
"operatorSlug": "vla_model_inference",
|
||||
"parameters": {
|
||||
"commandWrapperAllowed": false,
|
||||
"controlledScriptAllowed": false,
|
||||
"source": "hyperparams",
|
||||
"structured": true
|
||||
},
|
||||
|
||||
@ -39,7 +39,7 @@
|
||||
"requiresManifest": true
|
||||
},
|
||||
"entrypoint": "/app/backend/operator-runner/main.py",
|
||||
"handler": "builtin_vla_model_train",
|
||||
"handler": "vla_model_train",
|
||||
"imagePolicy": {
|
||||
"allowsSharedBaseLayer": true,
|
||||
"forbidsSharedOperatorRunnerFinalImage": true,
|
||||
@ -49,6 +49,7 @@
|
||||
"operatorSlug": "vla_model_train",
|
||||
"parameters": {
|
||||
"commandWrapperAllowed": false,
|
||||
"controlledScriptAllowed": false,
|
||||
"source": "hyperparams",
|
||||
"structured": true
|
||||
},
|
||||
|
||||
@ -39,7 +39,7 @@
|
||||
"requiresManifest": true
|
||||
},
|
||||
"entrypoint": "/app/backend/operator-runner/main.py",
|
||||
"handler": "builtin_vla_sample_manifest_validate",
|
||||
"handler": "vla_sample_manifest_validate",
|
||||
"imagePolicy": {
|
||||
"allowsSharedBaseLayer": true,
|
||||
"forbidsSharedOperatorRunnerFinalImage": true,
|
||||
@ -49,6 +49,7 @@
|
||||
"operatorSlug": "vla_sample_manifest_validate",
|
||||
"parameters": {
|
||||
"commandWrapperAllowed": false,
|
||||
"controlledScriptAllowed": false,
|
||||
"source": "hyperparams",
|
||||
"structured": true
|
||||
},
|
||||
|
||||
@ -49,6 +49,7 @@
|
||||
"operatorSlug": "webdataset_shard_summary",
|
||||
"parameters": {
|
||||
"commandWrapperAllowed": false,
|
||||
"controlledScriptAllowed": false,
|
||||
"source": "hyperparams",
|
||||
"structured": true
|
||||
},
|
||||
|
||||
82
backend/operators/builtin/wilor_hand_pose/repository.json
Normal file
82
backend/operators/builtin/wilor_hand_pose/repository.json
Normal file
@ -0,0 +1,82 @@
|
||||
{
|
||||
"acceptance": {
|
||||
"hardcodedOutputAccepted": false,
|
||||
"mockOnlyAccepted": false,
|
||||
"pocFullAcceptanceScript": "scripts/poc-operator-full-acceptance.sh",
|
||||
"requiresPersistentWorkspaceEvidence": true,
|
||||
"requiresRealInputs": true,
|
||||
"shallowOnlyAccepted": false,
|
||||
"simulationOnlyAccepted": false
|
||||
},
|
||||
"category": "AI",
|
||||
"containerArgs": [],
|
||||
"containerCommand": [
|
||||
"python",
|
||||
"/app/backend/operator-runner/main.py"
|
||||
],
|
||||
"containerEntrypoint": "backend/operator-runner/main.py",
|
||||
"entrypoint": "operator.py",
|
||||
"image": "ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/droboticflow-operator-wilor-hand-pose:wilor-hand-pose-io",
|
||||
"imageId": "ccr-29eug8s3-pub.cnc.bj.baidubce.com/dataflow-poc/droboticflow-operator-wilor-hand-pose@sha256:454fe90ab54513bb3e022ced3f8fddfe6fd78a3e347780d66488ce0d2c05287c",
|
||||
"metadata": "operator.json",
|
||||
"name": "WiLoR 3D手部姿态估计",
|
||||
"operatorId": "operator-builtin-wilor-hand-pose",
|
||||
"operatorSlug": "wilor_hand_pose",
|
||||
"preferredSlug": "wilor_hand_pose",
|
||||
"pythonImport": "backend.operators.builtin.wilor_hand_pose.operator:run",
|
||||
"repositoryId": "builtin/wilor_hand_pose",
|
||||
"runtimeContract": {
|
||||
"acceptance": {
|
||||
"requiresArtifactChecksum": true,
|
||||
"requiresFixtureChecksum": true,
|
||||
"requiresGpuEvidence": true,
|
||||
"requiresRealFixture": true,
|
||||
"requiresWorkflowTransfer": true
|
||||
},
|
||||
"artifacts": {
|
||||
"requiresChecksum": true,
|
||||
"requiresLineage": true,
|
||||
"requiresManifest": true
|
||||
},
|
||||
"entrypoint": "/app/backend/operator-runner/main.py",
|
||||
"handler": "builtin_wilor_hand_pose",
|
||||
"imagePolicy": {
|
||||
"allowsSharedBaseLayer": true,
|
||||
"forbidsSharedOperatorRunnerFinalImage": true,
|
||||
"independentFinalImage": true
|
||||
},
|
||||
"operatorId": "operator-builtin-wilor-hand-pose",
|
||||
"operatorSlug": "wilor_hand_pose",
|
||||
"parameters": {
|
||||
"commandWrapperAllowed": false,
|
||||
"controlledScriptAllowed": false,
|
||||
"source": "hyperparams",
|
||||
"structured": true
|
||||
},
|
||||
"resources": {
|
||||
"externalGpuService": true,
|
||||
"minGpuCount": 0,
|
||||
"recommendedGpuType": "NVIDIA A800 80GB",
|
||||
"requiresGpu": false
|
||||
},
|
||||
"runtimeDependencies": [
|
||||
"wilor-inference-service",
|
||||
"image-video-files",
|
||||
"http-api",
|
||||
"gpu-a800-service"
|
||||
],
|
||||
"schemaVersion": "droboticflow.operator.runtime/v1"
|
||||
},
|
||||
"runtimeDependencies": [
|
||||
"wilor-inference-service",
|
||||
"image-video-files",
|
||||
"http-api",
|
||||
"gpu-a800-service"
|
||||
],
|
||||
"runtimeHandler": "builtin_wilor_hand_pose",
|
||||
"runtimeSource": "backend/operators/builtin/wilor_hand_pose/operator.py",
|
||||
"schemaVersion": "droboticflow.operator.repository/v1",
|
||||
"sourceRoot": "backend/operators/builtin/wilor_hand_pose",
|
||||
"strictPocAcceptanceExternals": [],
|
||||
"type": "builtin"
|
||||
}
|
||||
@ -49,6 +49,7 @@
|
||||
"operatorSlug": "xplatform_dataset_index",
|
||||
"parameters": {
|
||||
"commandWrapperAllowed": false,
|
||||
"controlledScriptAllowed": false,
|
||||
"source": "hyperparams",
|
||||
"structured": true
|
||||
},
|
||||
|
||||
@ -49,6 +49,7 @@
|
||||
"operatorSlug": "xplatform_dataset_validate",
|
||||
"parameters": {
|
||||
"commandWrapperAllowed": false,
|
||||
"controlledScriptAllowed": false,
|
||||
"source": "hyperparams",
|
||||
"structured": true
|
||||
},
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user