forked from longtao.wu/droboticflow
✨ Harden production workflow execution
This commit is contained in:
parent
be5c6233ed
commit
8f09af0b1e
@ -2,7 +2,7 @@ from __future__ import annotations
|
||||
|
||||
from typing import Any
|
||||
|
||||
from backend.operators.builtin.structured_model_operator import HelperMap, run_policy_training
|
||||
from backend.operators.builtin.structured_model_operator import HelperMap, run_lerobot_act_training
|
||||
|
||||
|
||||
def run(
|
||||
@ -13,13 +13,4 @@ def run(
|
||||
inputs: list[dict[str, Any]],
|
||||
helpers: HelperMap,
|
||||
) -> list[dict[str, Any]]:
|
||||
return run_policy_training(
|
||||
run_id,
|
||||
node_id,
|
||||
output_dir,
|
||||
node_data,
|
||||
inputs,
|
||||
helpers,
|
||||
operator_name="ACT 策略训练",
|
||||
model_family="ACT",
|
||||
)
|
||||
return run_lerobot_act_training(run_id, node_id, output_dir, node_data, inputs, helpers)
|
||||
|
||||
@ -2,7 +2,7 @@ from __future__ import annotations
|
||||
|
||||
from typing import Any
|
||||
|
||||
from backend.operators.builtin.structured_model_operator import HelperMap, run_policy_training
|
||||
from backend.operators.builtin.structured_model_operator import HelperMap, run_diffusion_policy_training
|
||||
|
||||
|
||||
def run(
|
||||
@ -13,13 +13,4 @@ def run(
|
||||
inputs: list[dict[str, Any]],
|
||||
helpers: HelperMap,
|
||||
) -> list[dict[str, Any]]:
|
||||
return run_policy_training(
|
||||
run_id,
|
||||
node_id,
|
||||
output_dir,
|
||||
node_data,
|
||||
inputs,
|
||||
helpers,
|
||||
operator_name="Diffusion Policy 训练",
|
||||
model_family="Diffusion Policy",
|
||||
)
|
||||
return run_diffusion_policy_training(run_id, node_id, output_dir, node_data, inputs, helpers)
|
||||
|
||||
@ -2,7 +2,7 @@ from __future__ import annotations
|
||||
|
||||
from typing import Any
|
||||
|
||||
from backend.operators.builtin.structured_model_operator import HelperMap, run_transformers_text_finetune
|
||||
from backend.operators.builtin.structured_model_operator import HelperMap, run_openvla_finetune
|
||||
|
||||
|
||||
def run(
|
||||
@ -13,4 +13,4 @@ def run(
|
||||
inputs: list[dict[str, Any]],
|
||||
helpers: HelperMap,
|
||||
) -> list[dict[str, Any]]:
|
||||
return run_transformers_text_finetune(run_id, node_id, output_dir, node_data, inputs, helpers)
|
||||
return run_openvla_finetune(run_id, node_id, output_dir, node_data, inputs, helpers)
|
||||
|
||||
@ -2,7 +2,7 @@ from __future__ import annotations
|
||||
|
||||
from typing import Any
|
||||
|
||||
from backend.operators.builtin.structured_model_operator import HelperMap, run_transformers_text_inference
|
||||
from backend.operators.builtin.structured_model_operator import HelperMap, run_openvla_inference
|
||||
|
||||
|
||||
def run(
|
||||
@ -13,4 +13,4 @@ def run(
|
||||
inputs: list[dict[str, Any]],
|
||||
helpers: HelperMap,
|
||||
) -> list[dict[str, Any]]:
|
||||
return run_transformers_text_inference(run_id, node_id, output_dir, node_data, inputs, helpers)
|
||||
return run_openvla_inference(run_id, node_id, output_dir, node_data, inputs, helpers)
|
||||
|
||||
@ -2,12 +2,14 @@ from __future__ import annotations
|
||||
|
||||
import csv
|
||||
import contextlib
|
||||
import datetime as dt
|
||||
import hashlib
|
||||
import json
|
||||
import math
|
||||
import os
|
||||
import pathlib
|
||||
import shutil
|
||||
import subprocess
|
||||
import zipfile
|
||||
from typing import Any, Callable
|
||||
|
||||
@ -45,6 +47,25 @@ def _float(params: dict[str, str], key: str, default: float) -> float:
|
||||
return parsed
|
||||
|
||||
|
||||
def _bool(params: dict[str, str], key: str, default: bool) -> bool:
|
||||
value = _text(params, key, "true" if default else "false").lower()
|
||||
if value in {"1", "true", "yes", "on"}:
|
||||
return True
|
||||
if value in {"0", "false", "no", "off"}:
|
||||
return False
|
||||
raise RuntimeError(f"{key} must be a boolean")
|
||||
|
||||
|
||||
def _json_list(params: dict[str, str], key: str) -> list[Any]:
|
||||
value = _text(params, key)
|
||||
if not value:
|
||||
return []
|
||||
payload = json.loads(value)
|
||||
if not isinstance(payload, list):
|
||||
raise RuntimeError(f"{key} must be a JSON array")
|
||||
return payload
|
||||
|
||||
|
||||
def _dataset_path(params: dict[str, str], inputs: list[dict[str, Any]]) -> pathlib.Path:
|
||||
explicit = _text(params, "DATASET_PATH") or _text(params, "TRAIN_DATA_PATH") or _text(params, "SOURCE_PATH")
|
||||
if explicit:
|
||||
@ -77,6 +98,87 @@ def _prepare_transformers_cache(params: dict[str, str], output_dir: pathlib.Path
|
||||
return cache_dir
|
||||
|
||||
|
||||
def _find_first_file(root: pathlib.Path, suffixes: tuple[str, ...]) -> pathlib.Path | None:
|
||||
if root.is_file() and root.suffix.lower() in suffixes:
|
||||
return root
|
||||
if not root.exists():
|
||||
return None
|
||||
candidates = [path for path in root.rglob("*") if path.is_file() and path.suffix.lower() in suffixes]
|
||||
if not candidates:
|
||||
return None
|
||||
priority_names = ("best.pt", "latest.ckpt", "last.pt")
|
||||
for name in priority_names:
|
||||
for candidate in candidates:
|
||||
if candidate.name == name:
|
||||
return candidate
|
||||
candidates.sort(key=lambda path: path.stat().st_mtime, reverse=True)
|
||||
return candidates[0]
|
||||
|
||||
|
||||
def _zip_directory(source_dir: pathlib.Path, archive_path: pathlib.Path) -> pathlib.Path:
|
||||
if not source_dir.exists() or not source_dir.is_dir():
|
||||
raise RuntimeError(f"model directory does not exist: {source_dir}")
|
||||
with zipfile.ZipFile(archive_path, "w", compression=zipfile.ZIP_DEFLATED) as archive:
|
||||
for item in sorted(source_dir.rglob("*")):
|
||||
if item.is_file():
|
||||
archive.write(item, item.relative_to(source_dir.parent))
|
||||
return archive_path
|
||||
|
||||
|
||||
def _run_framework_command(
|
||||
command: list[str],
|
||||
*,
|
||||
cwd: pathlib.Path | None,
|
||||
output_dir: pathlib.Path,
|
||||
framework: str,
|
||||
metadata: dict[str, Any],
|
||||
env: dict[str, str] | None = None,
|
||||
) -> dict[str, Any]:
|
||||
output_dir.mkdir(parents=True, exist_ok=True)
|
||||
started = dt.datetime.now(dt.timezone.utc).isoformat().replace("+00:00", "Z")
|
||||
result = subprocess.run(
|
||||
command,
|
||||
cwd=str(cwd) if cwd else None,
|
||||
env=env,
|
||||
text=True,
|
||||
capture_output=True,
|
||||
check=False,
|
||||
)
|
||||
(output_dir / "framework-stdout.log").write_text(result.stdout or "", encoding="utf-8")
|
||||
(output_dir / "framework-stderr.log").write_text(result.stderr or "", encoding="utf-8")
|
||||
payload = {
|
||||
"framework": framework,
|
||||
"command": command,
|
||||
"cwd": str(cwd) if cwd else "",
|
||||
"returnCode": result.returncode,
|
||||
"startedAt": started,
|
||||
**metadata,
|
||||
}
|
||||
(output_dir / "framework-command.json").write_text(json.dumps(payload, ensure_ascii=False, indent=2, sort_keys=True) + "\n", encoding="utf-8")
|
||||
if result.returncode != 0:
|
||||
raise RuntimeError(f"{framework} training command failed with exit code {result.returncode}; see framework-stderr.log")
|
||||
return payload
|
||||
|
||||
|
||||
def _framework_artifacts(
|
||||
helpers: HelperMap,
|
||||
run_id: str,
|
||||
node_id: str,
|
||||
output_dir: pathlib.Path,
|
||||
metrics: dict[str, Any],
|
||||
model_path: pathlib.Path,
|
||||
) -> list[dict[str, Any]]:
|
||||
if not model_path.exists():
|
||||
raise RuntimeError(f"expected framework model artifact was not produced: {model_path}")
|
||||
return [
|
||||
helpers["write_json_artifact"](run_id, node_id, output_dir, "metrics.json", metrics),
|
||||
helpers["build_artifact"](run_id, node_id, output_dir / "framework-command.json", "json"),
|
||||
helpers["build_artifact"](run_id, node_id, output_dir / "framework-stdout.log", "log"),
|
||||
helpers["build_artifact"](run_id, node_id, output_dir / "framework-stderr.log", "log"),
|
||||
helpers["build_artifact"](run_id, node_id, model_path, "model"),
|
||||
]
|
||||
|
||||
|
||||
def _load_json_records(path: pathlib.Path) -> list[dict[str, Any]]:
|
||||
if path.is_dir():
|
||||
candidates = [
|
||||
@ -213,6 +315,7 @@ def run_policy_training(
|
||||
metrics = {
|
||||
"operator": operator_name,
|
||||
"modelFamily": model_family,
|
||||
"trainingBackend": "torch_mlp",
|
||||
"datasetPath": str(dataset_path),
|
||||
"sampleCount": len(records),
|
||||
"stateDim": state_dim,
|
||||
@ -230,6 +333,192 @@ def run_policy_training(
|
||||
]
|
||||
|
||||
|
||||
def run_lerobot_act_training(
|
||||
run_id: str,
|
||||
node_id: str,
|
||||
output_dir: Any,
|
||||
node_data: dict[str, Any],
|
||||
inputs: list[dict[str, Any]],
|
||||
helpers: HelperMap,
|
||||
) -> list[dict[str, Any]]:
|
||||
params = helpers["hyperparams"](node_data)
|
||||
backend = _text(params, "TRAINING_BACKEND", "lerobot").lower()
|
||||
if backend == "torch_mlp":
|
||||
return run_policy_training(
|
||||
run_id,
|
||||
node_id,
|
||||
output_dir,
|
||||
node_data,
|
||||
inputs,
|
||||
helpers,
|
||||
operator_name="ACT 策略训练",
|
||||
model_family="ACT",
|
||||
)
|
||||
if backend != "lerobot":
|
||||
raise RuntimeError("ACT TRAINING_BACKEND must be lerobot or torch_mlp")
|
||||
|
||||
dataset_repo_id = _text(params, "DATASET_REPO_ID")
|
||||
dataset_root = _text(params, "DATASET_PATH") or _text(params, "TRAIN_DATA_PATH")
|
||||
if not dataset_repo_id and not dataset_root:
|
||||
raise RuntimeError("ACT LeRobot training requires DATASET_REPO_ID or DATASET_PATH")
|
||||
if dataset_root and not pathlib.Path(dataset_root).exists():
|
||||
raise RuntimeError(f"ACT DATASET_PATH does not exist: {dataset_root}")
|
||||
|
||||
output_path = pathlib.Path(output_dir)
|
||||
train_dir = output_path / "lerobot-act"
|
||||
command = [
|
||||
_text(params, "LEROBOT_TRAIN_BIN", "lerobot-train"),
|
||||
f"--policy.type={_text(params, 'POLICY_TYPE', 'act')}",
|
||||
f"--output_dir={train_dir}",
|
||||
f"--job_name={_text(params, 'JOB_NAME', f'droboticflow-act-{run_id[:8]}')}",
|
||||
f"--policy.device={_text(params, 'DEVICE', 'cuda')}",
|
||||
f"--wandb.enable={str(_bool(params, 'WANDB_ENABLE', False)).lower()}",
|
||||
]
|
||||
if dataset_repo_id:
|
||||
command.append(f"--dataset.repo_id={dataset_repo_id}")
|
||||
if dataset_root:
|
||||
command.append(f"--dataset.root={dataset_root}")
|
||||
policy_repo_id = _text(params, "POLICY_REPO_ID")
|
||||
if policy_repo_id:
|
||||
command.append(f"--policy.repo_id={policy_repo_id}")
|
||||
if _text(params, "MAX_STEPS"):
|
||||
command.append(f"--steps={_int(params, 'MAX_STEPS', 1000)}")
|
||||
if _text(params, "BATCH_SIZE"):
|
||||
command.append(f"--batch_size={_int(params, 'BATCH_SIZE', 8)}")
|
||||
if _text(params, "LEARNING_RATE"):
|
||||
command.append(f"--optimizer.lr={_float(params, 'LEARNING_RATE', 0.0001)}")
|
||||
if _text(params, "CHUNK_SIZE"):
|
||||
command.append(f"--policy.chunk_size={_int(params, 'CHUNK_SIZE', 100)}")
|
||||
for override in _json_list(params, "LEROBOT_OVERRIDES_JSON"):
|
||||
if not isinstance(override, str) or not override.strip() or override.strip().startswith("-"):
|
||||
raise RuntimeError("LEROBOT_OVERRIDES_JSON entries must be non-empty Hydra override strings")
|
||||
command.append(override.strip())
|
||||
|
||||
_run_framework_command(
|
||||
command,
|
||||
cwd=None,
|
||||
output_dir=output_path,
|
||||
framework="LeRobot ACT",
|
||||
metadata={
|
||||
"datasetRepoId": dataset_repo_id,
|
||||
"datasetRoot": dataset_root,
|
||||
"trainingBackend": backend,
|
||||
},
|
||||
env={**os.environ, "HF_HUB_DISABLE_XET": os.environ.get("HF_HUB_DISABLE_XET", "1")},
|
||||
)
|
||||
checkpoint = _find_first_file(train_dir, (".safetensors", ".pt", ".pth", ".bin"))
|
||||
if checkpoint is None:
|
||||
raise RuntimeError("LeRobot ACT training completed but no checkpoint file was found")
|
||||
copied_checkpoint = output_path / checkpoint.name
|
||||
if checkpoint != copied_checkpoint:
|
||||
shutil.copy2(checkpoint, copied_checkpoint)
|
||||
metrics = {
|
||||
"operator": "ACT 策略训练",
|
||||
"modelFamily": "LeRobot ACT",
|
||||
"trainingBackend": backend,
|
||||
"datasetRepoId": dataset_repo_id,
|
||||
"datasetRoot": dataset_root,
|
||||
"outputDir": str(train_dir),
|
||||
"checkpoint": str(copied_checkpoint),
|
||||
"device": _text(params, "DEVICE", "cuda"),
|
||||
}
|
||||
return _framework_artifacts(helpers, run_id, node_id, output_path, metrics, copied_checkpoint)
|
||||
|
||||
|
||||
def run_diffusion_policy_training(
|
||||
run_id: str,
|
||||
node_id: str,
|
||||
output_dir: Any,
|
||||
node_data: dict[str, Any],
|
||||
inputs: list[dict[str, Any]],
|
||||
helpers: HelperMap,
|
||||
) -> list[dict[str, Any]]:
|
||||
params = helpers["hyperparams"](node_data)
|
||||
backend = _text(params, "TRAINING_BACKEND", "diffusion_policy").lower()
|
||||
if backend == "torch_mlp":
|
||||
return run_policy_training(
|
||||
run_id,
|
||||
node_id,
|
||||
output_dir,
|
||||
node_data,
|
||||
inputs,
|
||||
helpers,
|
||||
operator_name="Diffusion Policy 训练",
|
||||
model_family="Diffusion Policy",
|
||||
)
|
||||
if backend != "diffusion_policy":
|
||||
raise RuntimeError("Diffusion Policy TRAINING_BACKEND must be diffusion_policy or torch_mlp")
|
||||
|
||||
repo_root = pathlib.Path(_text(params, "DIFFUSION_POLICY_ROOT") or os.environ.get("DIFFUSION_POLICY_ROOT", "/opt/diffusion_policy"))
|
||||
train_py = repo_root / "train.py"
|
||||
if not train_py.exists():
|
||||
raise RuntimeError(f"Diffusion Policy train.py does not exist: {train_py}")
|
||||
dataset_path = _dataset_path(params, inputs)
|
||||
output_path = pathlib.Path(output_dir)
|
||||
train_dir = output_path / "diffusion-policy"
|
||||
config_name = _text(params, "CONFIG_NAME", "image_pusht_diffusion_policy_cnn")
|
||||
command = [
|
||||
"python",
|
||||
str(train_py),
|
||||
"--config-dir",
|
||||
_text(params, "CONFIG_DIR", "."),
|
||||
f"--config-name={config_name}",
|
||||
f"hydra.run.dir={train_dir}",
|
||||
f"training.device={_text(params, 'DEVICE', 'cuda:0')}",
|
||||
]
|
||||
task_name = _text(params, "TASK_NAME")
|
||||
if task_name:
|
||||
command.append(f"task={task_name}")
|
||||
command.extend(
|
||||
[
|
||||
f"task.dataset.zarr_path={dataset_path}",
|
||||
f"training.num_epochs={_int(params, 'EPOCHS', 1)}",
|
||||
f"dataloader.batch_size={_int(params, 'BATCH_SIZE', 8)}",
|
||||
f"optimizer.lr={_float(params, 'LEARNING_RATE', 0.0001)}",
|
||||
]
|
||||
)
|
||||
if _text(params, "HORIZON"):
|
||||
command.append(f"horizon={_int(params, 'HORIZON', 16)}")
|
||||
if _text(params, "DIFFUSION_STEPS"):
|
||||
command.append(f"policy.num_inference_steps={_int(params, 'DIFFUSION_STEPS', 32)}")
|
||||
for override in _json_list(params, "HYDRA_OVERRIDES_JSON"):
|
||||
if not isinstance(override, str) or not override.strip() or override.strip().startswith("-"):
|
||||
raise RuntimeError("HYDRA_OVERRIDES_JSON entries must be non-empty Hydra override strings")
|
||||
command.append(override.strip())
|
||||
|
||||
_run_framework_command(
|
||||
command,
|
||||
cwd=repo_root,
|
||||
output_dir=output_path,
|
||||
framework="real-stanford Diffusion Policy",
|
||||
metadata={
|
||||
"datasetPath": str(dataset_path),
|
||||
"trainingBackend": backend,
|
||||
"configName": config_name,
|
||||
"taskName": task_name,
|
||||
},
|
||||
env={**os.environ, "WANDB_MODE": os.environ.get("WANDB_MODE", "offline")},
|
||||
)
|
||||
checkpoint = _find_first_file(train_dir, (".ckpt", ".pt", ".pth"))
|
||||
if checkpoint is None:
|
||||
raise RuntimeError("Diffusion Policy training completed but no checkpoint file was found")
|
||||
copied_checkpoint = output_path / checkpoint.name
|
||||
if checkpoint != copied_checkpoint:
|
||||
shutil.copy2(checkpoint, copied_checkpoint)
|
||||
metrics = {
|
||||
"operator": "Diffusion Policy 训练",
|
||||
"modelFamily": "real-stanford Diffusion Policy",
|
||||
"trainingBackend": backend,
|
||||
"datasetPath": str(dataset_path),
|
||||
"configName": config_name,
|
||||
"taskName": task_name,
|
||||
"outputDir": str(train_dir),
|
||||
"checkpoint": str(copied_checkpoint),
|
||||
"device": _text(params, "DEVICE", "cuda:0"),
|
||||
}
|
||||
return _framework_artifacts(helpers, run_id, node_id, output_path, metrics, copied_checkpoint)
|
||||
|
||||
|
||||
def run_yolo_training(
|
||||
run_id: str,
|
||||
node_id: str,
|
||||
@ -299,6 +588,158 @@ def run_yolo_training(
|
||||
]
|
||||
|
||||
|
||||
def _input_model_path(inputs: list[dict[str, Any]], output_dir: pathlib.Path) -> pathlib.Path | None:
|
||||
for artifact in inputs:
|
||||
artifact_type = str(artifact.get("type") or "").lower()
|
||||
name = str(artifact.get("name") or artifact.get("filename") or "").lower()
|
||||
raw_path = str(artifact.get("path") or artifact.get("uri") or "")
|
||||
if not raw_path:
|
||||
continue
|
||||
candidate = pathlib.Path(raw_path)
|
||||
if not candidate.exists():
|
||||
continue
|
||||
if artifact_type == "model" or name.endswith((".zip", ".pt", ".pth", ".safetensors", ".bin")):
|
||||
if candidate.suffix.lower() == ".zip":
|
||||
extract_dir = output_dir / "upstream-model"
|
||||
if extract_dir.exists():
|
||||
shutil.rmtree(extract_dir)
|
||||
extract_dir.mkdir(parents=True, exist_ok=True)
|
||||
with zipfile.ZipFile(candidate) as archive:
|
||||
archive.extractall(extract_dir)
|
||||
children = [item for item in extract_dir.iterdir() if item.is_dir()]
|
||||
return children[0] if len(children) == 1 else extract_dir
|
||||
return candidate
|
||||
return None
|
||||
|
||||
|
||||
def run_openvla_finetune(
|
||||
run_id: str,
|
||||
node_id: str,
|
||||
output_dir: Any,
|
||||
node_data: dict[str, Any],
|
||||
inputs: list[dict[str, Any]],
|
||||
helpers: HelperMap,
|
||||
) -> list[dict[str, Any]]:
|
||||
params = helpers["hyperparams"](node_data)
|
||||
backend = _text(params, "TRAINING_BACKEND", "openvla_lora").lower()
|
||||
if backend in {"transformers_text", "causal_lm"}:
|
||||
return run_transformers_text_finetune(run_id, node_id, output_dir, node_data, inputs, helpers)
|
||||
if backend != "openvla_lora":
|
||||
raise RuntimeError("OpenVLA TRAINING_BACKEND must be openvla_lora or transformers_text")
|
||||
|
||||
openvla_root = pathlib.Path(_text(params, "OPENVLA_ROOT") or os.environ.get("OPENVLA_ROOT", "/opt/openvla"))
|
||||
script = openvla_root / "vla-scripts" / "finetune.py"
|
||||
if not script.exists():
|
||||
raise RuntimeError(f"OpenVLA fine-tune script does not exist: {script}")
|
||||
base_model = _text(params, "BASE_MODEL", "openvla/openvla-7b")
|
||||
data_root = pathlib.Path(_text(params, "DATA_ROOT_DIR") or str(_dataset_path(params, inputs)))
|
||||
if not data_root.exists():
|
||||
raise RuntimeError(f"OpenVLA DATA_ROOT_DIR does not exist: {data_root}")
|
||||
dataset_name = _text(params, "DATASET_NAME")
|
||||
if not dataset_name:
|
||||
raise RuntimeError("OpenVLA DATASET_NAME is required for RLDS fine-tune")
|
||||
output_path = pathlib.Path(output_dir)
|
||||
run_root = output_path / "openvla-runs"
|
||||
adapter_dir = output_path / "openvla-adapter"
|
||||
gpu_count = _int(params, "GPU_COUNT", 1)
|
||||
command = [
|
||||
"torchrun",
|
||||
"--standalone",
|
||||
"--nnodes",
|
||||
"1",
|
||||
"--nproc-per-node",
|
||||
str(gpu_count),
|
||||
str(script),
|
||||
"--vla_path",
|
||||
base_model,
|
||||
"--data_root_dir",
|
||||
str(data_root),
|
||||
"--dataset_name",
|
||||
dataset_name,
|
||||
"--run_root_dir",
|
||||
str(run_root),
|
||||
"--adapter_tmp_dir",
|
||||
str(adapter_dir),
|
||||
"--batch_size",
|
||||
str(_int(params, "BATCH_SIZE", 8)),
|
||||
"--max_steps",
|
||||
str(_int(params, "MAX_STEPS", 1000)),
|
||||
"--save_steps",
|
||||
str(_int(params, "SAVE_STEPS", 500)),
|
||||
"--learning_rate",
|
||||
str(_float(params, "LEARNING_RATE", 0.0005)),
|
||||
"--lora_rank",
|
||||
str(_int(params, "LORA_RANK", 32)),
|
||||
"--lora_dropout",
|
||||
str(_float(params, "LORA_DROPOUT", 0.0)),
|
||||
"--use_lora",
|
||||
"True",
|
||||
"--use_quantization",
|
||||
"True" if _bool(params, "USE_QUANTIZATION", False) else "False",
|
||||
"--image_aug",
|
||||
"True" if _bool(params, "IMAGE_AUG", True) else "False",
|
||||
]
|
||||
for override in _json_list(params, "OPENVLA_OVERRIDES_JSON"):
|
||||
if not isinstance(override, str) or not override.strip() or override.strip().startswith("-"):
|
||||
raise RuntimeError("OPENVLA_OVERRIDES_JSON entries must be non-empty draccus override strings")
|
||||
command.append(override.strip())
|
||||
|
||||
_run_framework_command(
|
||||
command,
|
||||
cwd=openvla_root,
|
||||
output_dir=output_path,
|
||||
framework="OpenVLA LoRA fine-tune",
|
||||
metadata={
|
||||
"baseModel": base_model,
|
||||
"dataRootDir": str(data_root),
|
||||
"datasetName": dataset_name,
|
||||
"trainingBackend": backend,
|
||||
"gpuCount": gpu_count,
|
||||
},
|
||||
env={**os.environ, "TOKENIZERS_PARALLELISM": "false", "WANDB_MODE": os.environ.get("WANDB_MODE", "offline")},
|
||||
)
|
||||
if not adapter_dir.exists():
|
||||
found_model_dir = next((path for path in run_root.rglob("*") if path.is_dir() and any(item.name == "adapter_config.json" for item in path.iterdir())), None)
|
||||
if found_model_dir is not None:
|
||||
adapter_dir = found_model_dir
|
||||
archive_path = _zip_directory(adapter_dir, output_path / "openvla-adapter.zip")
|
||||
metrics = {
|
||||
"operator": "OpenVLA 微调训练",
|
||||
"modelFamily": "OpenVLA LoRA",
|
||||
"trainingBackend": backend,
|
||||
"baseModel": base_model,
|
||||
"dataRootDir": str(data_root),
|
||||
"datasetName": dataset_name,
|
||||
"runRootDir": str(run_root),
|
||||
"adapterDir": str(adapter_dir),
|
||||
"modelArchive": str(archive_path),
|
||||
"gpuCount": gpu_count,
|
||||
}
|
||||
return _framework_artifacts(helpers, run_id, node_id, output_path, metrics, archive_path)
|
||||
|
||||
|
||||
def run_openvla_inference(
|
||||
run_id: str,
|
||||
node_id: str,
|
||||
output_dir: Any,
|
||||
node_data: dict[str, Any],
|
||||
inputs: list[dict[str, Any]],
|
||||
helpers: HelperMap,
|
||||
) -> list[dict[str, Any]]:
|
||||
params = helpers["hyperparams"](node_data)
|
||||
backend = _text(params, "INFERENCE_BACKEND", "openvla_transformers").lower()
|
||||
output_path = pathlib.Path(output_dir)
|
||||
upstream_model = _input_model_path(inputs, output_path)
|
||||
if not _text(params, "MODEL_PATH") and upstream_model is not None:
|
||||
node_data = dict(node_data)
|
||||
hyperparams = [dict(item) for item in node_data.get("hyperparams", []) if isinstance(item, dict)]
|
||||
hyperparams.append({"key": "MODEL_PATH", "value": str(upstream_model)})
|
||||
node_data["hyperparams"] = hyperparams
|
||||
if backend in {"openvla_transformers", "transformers_text", "causal_lm"}:
|
||||
return run_transformers_text_inference(run_id, node_id, output_dir, node_data, inputs, helpers)
|
||||
raise RuntimeError("OpenVLA INFERENCE_BACKEND must be openvla_transformers")
|
||||
|
||||
|
||||
def run_transformers_text_finetune(
|
||||
run_id: str,
|
||||
node_id: str,
|
||||
|
||||
@ -22,7 +22,7 @@
|
||||
- Worker 会先把上游 artifact 汇总到 `INPUT_ARTIFACTS_PATH`,再把节点配置通过 `NODE_DATA_JSON` 注入运行容器。
|
||||
- 节点执行结果会写入 `OUTPUT_DIR`、`RESULT_OUTPUT_PATH` 和 `STAGE_MANIFEST_PATH` 对应的文件,再由 worker 汇总进运行记录。
|
||||
- 大文件和大 JSON 不应依赖 API 内联传输,应该通过 `artifact.path`、`dataRef.payloadPath`、共享 PVC 或对象存储引用传递。
|
||||
- 当前独立实现入口是 `operator-repos/builtin/sim3d_asset_generate/src/operator.py` 中的 `run(...)`,平台 runtimeHandler 为 `builtin_sim3d_asset_generate`。
|
||||
- 当前独立实现入口是 `operator-repos/builtin/sim3d_asset_generate/src/operator.py` 中的 `run(...)`,平台 runtimeHandler 为 `sim3d_asset_generate`。
|
||||
|
||||
## 设计边界
|
||||
|
||||
|
||||
@ -15,7 +15,7 @@
|
||||
|
||||
## 平台语义
|
||||
|
||||
ACT 策略训练算子;使用 DATASET_PATH/STATE_FIELD/ACTION_FIELD 等结构化参数读取真实轨迹样本,在独立 GPU 镜像中训练并输出 checkpoint.pt 与 metrics.json。推荐 1 张 A800 80GB。
|
||||
ACT 策略训练算子;生产默认使用 Hugging Face LeRobot ACT 训练入口,读取 DATASET_REPO_ID 或 DATASET_PATH 指向的真实 LeRobot 数据集并输出 checkpoint 与 metrics。推荐 1 张 A800 80GB;仅本地单元测试可显式设置 TRAINING_BACKEND=torch_mlp。
|
||||
|
||||
## 运行时契约
|
||||
|
||||
@ -47,14 +47,15 @@ flowchart LR
|
||||
|
||||
## 关键超参数
|
||||
|
||||
- `DATASET_PATH`:类型 `string`,默认值 空字符串或由工作流显式填写。真实训练数据路径;支持 JSON/JSONL/CSV 或包含 samples.json/jsonl 的目录 通常建议在工作流中显式配置。
|
||||
- `STATE_FIELD`:类型 `string`,默认值 `state`。状态向量字段名 可直接使用默认值,也可在节点级覆盖。
|
||||
- `ACTION_FIELD`:类型 `string`,默认值 `action`。动作向量字段名 可直接使用默认值,也可在节点级覆盖。
|
||||
- `EPOCHS`:类型 `number`,默认值 `5`。训练轮数 可直接使用默认值,也可在节点级覆盖。
|
||||
- `TRAINING_BACKEND`:类型 `string`,默认值 `lerobot`。生产训练后端;默认 lerobot,测试 fallback 才允许 torch_mlp 可直接使用默认值,也可在节点级覆盖。
|
||||
- `DATASET_REPO_ID`:类型 `string`,默认值 空字符串或由工作流显式填写。Hugging Face LeRobot 数据集 repo_id,例如 org/robot_dataset 通常建议在工作流中显式配置。
|
||||
- `DATASET_PATH`:类型 `string`,默认值 空字符串或由工作流显式填写。POC/PVC 中的真实 LeRobot 数据集根目录;与 DATASET_REPO_ID 至少提供一个 通常建议在工作流中显式配置。
|
||||
- `POLICY_REPO_ID`:类型 `string`,默认值 空字符串或由工作流显式填写。可选的 LeRobot policy repo_id,用于后续发布或复现实验 通常建议在工作流中显式配置。
|
||||
- `MAX_STEPS`:类型 `number`,默认值 `1000`。短训最大 step 数,生产长训按数据规模调大 可直接使用默认值,也可在节点级覆盖。
|
||||
- `BATCH_SIZE`:类型 `number`,默认值 `8`。训练 batch size 可直接使用默认值,也可在节点级覆盖。
|
||||
- `LEARNING_RATE`:类型 `number`,默认值 `0.001`。AdamW 学习率 可直接使用默认值,也可在节点级覆盖。
|
||||
- `HIDDEN_DIM`:类型 `number`,默认值 `128`。策略网络隐藏层宽度 可直接使用默认值,也可在节点级覆盖。
|
||||
- `CHUNK_SIZE`:类型 `number`,默认值 `1`。ACT action chunk size 可直接使用默认值,也可在节点级覆盖。
|
||||
- `LEARNING_RATE`:类型 `number`,默认值 `0.0001`。LeRobot optimizer.lr 可直接使用默认值,也可在节点级覆盖。
|
||||
- `CHUNK_SIZE`:类型 `number`,默认值 `100`。ACT action chunk size 可直接使用默认值,也可在节点级覆盖。
|
||||
- `LEROBOT_OVERRIDES_JSON`:类型 `json`,默认值 `[]`。额外 Hydra override 字符串数组,不允许 shell 命令 可直接使用默认值,也可在节点级覆盖。
|
||||
- `RECOMMENDED_GPU`:类型 `string`,默认值 `1x NVIDIA A800 80GB`。推荐 GPU 配置 可直接使用默认值,也可在节点级覆盖。
|
||||
|
||||
## 执行前准备
|
||||
@ -81,14 +82,15 @@ flowchart LR
|
||||
"type": "builtin",
|
||||
"category": "AI",
|
||||
"hyperparams": {
|
||||
"TRAINING_BACKEND": "lerobot",
|
||||
"DATASET_REPO_ID": "<按节点填写>",
|
||||
"DATASET_PATH": "<按节点填写>",
|
||||
"STATE_FIELD": "state",
|
||||
"ACTION_FIELD": "action",
|
||||
"EPOCHS": "5",
|
||||
"POLICY_REPO_ID": "<按节点填写>",
|
||||
"MAX_STEPS": "1000",
|
||||
"BATCH_SIZE": "8",
|
||||
"LEARNING_RATE": "0.001",
|
||||
"HIDDEN_DIM": "128",
|
||||
"CHUNK_SIZE": "1",
|
||||
"LEARNING_RATE": "0.0001",
|
||||
"CHUNK_SIZE": "100",
|
||||
"LEROBOT_OVERRIDES_JSON": "[]",
|
||||
"RECOMMENDED_GPU": "1x NVIDIA A800 80GB"
|
||||
}
|
||||
}
|
||||
|
||||
@ -15,7 +15,7 @@
|
||||
|
||||
## 平台语义
|
||||
|
||||
Diffusion Policy 训练算子;使用 DATASET_PATH/STATE_FIELD/ACTION_FIELD/HORIZON/DIFFUSION_STEPS 等结构化参数读取真实轨迹数据,输出 checkpoint.pt 与 metrics.json。推荐 1 张 A800 80GB。
|
||||
Diffusion Policy 训练算子;生产默认使用 real-stanford/diffusion_policy 的 Hydra train.py,读取真实 Zarr/轨迹数据并输出 .ckpt、logs 和 metrics。推荐 1 张 A800 80GB;仅本地单元测试可显式设置 TRAINING_BACKEND=torch_mlp。
|
||||
|
||||
## 运行时契约
|
||||
|
||||
@ -47,15 +47,17 @@ flowchart LR
|
||||
|
||||
## 关键超参数
|
||||
|
||||
- `DATASET_PATH`:类型 `string`,默认值 空字符串或由工作流显式填写。真实训练数据路径;支持 JSON/JSONL/CSV 或包含 samples.json/jsonl 的目录 通常建议在工作流中显式配置。
|
||||
- `STATE_FIELD`:类型 `string`,默认值 `state`。观测/状态向量字段名 可直接使用默认值,也可在节点级覆盖。
|
||||
- `ACTION_FIELD`:类型 `string`,默认值 `action`。动作向量字段名 可直接使用默认值,也可在节点级覆盖。
|
||||
- `EPOCHS`:类型 `number`,默认值 `5`。训练轮数 可直接使用默认值,也可在节点级覆盖。
|
||||
- `TRAINING_BACKEND`:类型 `string`,默认值 `diffusion_policy`。生产训练后端;默认 diffusion_policy,测试 fallback 才允许 torch_mlp 可直接使用默认值,也可在节点级覆盖。
|
||||
- `DIFFUSION_POLICY_ROOT`:类型 `string`,默认值 `/opt/diffusion_policy`。real-stanford/diffusion_policy 仓库路径 可直接使用默认值,也可在节点级覆盖。
|
||||
- `DATASET_PATH`:类型 `string`,默认值 空字符串或由工作流显式填写。真实 Zarr/轨迹数据路径,会作为 task.dataset.zarr_path 传入 通常建议在工作流中显式配置。
|
||||
- `CONFIG_NAME`:类型 `string`,默认值 `image_pusht_diffusion_policy_cnn`。Hydra config name 或 config yaml 名称 可直接使用默认值,也可在节点级覆盖。
|
||||
- `TASK_NAME`:类型 `string`,默认值 空字符串或由工作流显式填写。可选 task override 通常建议在工作流中显式配置。
|
||||
- `EPOCHS`:类型 `number`,默认值 `1`。短训 epoch 数,生产长训按数据规模调大 可直接使用默认值,也可在节点级覆盖。
|
||||
- `BATCH_SIZE`:类型 `number`,默认值 `8`。训练 batch size 可直接使用默认值,也可在节点级覆盖。
|
||||
- `LEARNING_RATE`:类型 `number`,默认值 `0.001`。AdamW 学习率 可直接使用默认值,也可在节点级覆盖。
|
||||
- `HIDDEN_DIM`:类型 `number`,默认值 `256`。策略网络隐藏层宽度 可直接使用默认值,也可在节点级覆盖。
|
||||
- `LEARNING_RATE`:类型 `number`,默认值 `0.0001`。optimizer.lr 可直接使用默认值,也可在节点级覆盖。
|
||||
- `HORIZON`:类型 `number`,默认值 `16`。预测 horizon 可直接使用默认值,也可在节点级覆盖。
|
||||
- `DIFFUSION_STEPS`:类型 `number`,默认值 `32`。扩散步数配置,用于训练记录和下游复现 可直接使用默认值,也可在节点级覆盖。
|
||||
- `HYDRA_OVERRIDES_JSON`:类型 `json`,默认值 `[]`。额外 Hydra override 字符串数组,不允许 shell 命令 可直接使用默认值,也可在节点级覆盖。
|
||||
- `RECOMMENDED_GPU`:类型 `string`,默认值 `1x NVIDIA A800 80GB`。推荐 GPU 配置 可直接使用默认值,也可在节点级覆盖。
|
||||
|
||||
## 执行前准备
|
||||
@ -82,15 +84,17 @@ flowchart LR
|
||||
"type": "builtin",
|
||||
"category": "AI",
|
||||
"hyperparams": {
|
||||
"TRAINING_BACKEND": "diffusion_policy",
|
||||
"DIFFUSION_POLICY_ROOT": "/opt/diffusion_policy",
|
||||
"DATASET_PATH": "<按节点填写>",
|
||||
"STATE_FIELD": "state",
|
||||
"ACTION_FIELD": "action",
|
||||
"EPOCHS": "5",
|
||||
"CONFIG_NAME": "image_pusht_diffusion_policy_cnn",
|
||||
"TASK_NAME": "<按节点填写>",
|
||||
"EPOCHS": "1",
|
||||
"BATCH_SIZE": "8",
|
||||
"LEARNING_RATE": "0.001",
|
||||
"HIDDEN_DIM": "256",
|
||||
"LEARNING_RATE": "0.0001",
|
||||
"HORIZON": "16",
|
||||
"DIFFUSION_STEPS": "32",
|
||||
"HYDRA_OVERRIDES_JSON": "[]",
|
||||
"RECOMMENDED_GPU": "1x NVIDIA A800 80GB"
|
||||
}
|
||||
}
|
||||
|
||||
@ -22,7 +22,7 @@
|
||||
- Worker 会先把上游 artifact 汇总到 `INPUT_ARTIFACTS_PATH`,再把节点配置通过 `NODE_DATA_JSON` 注入运行容器。
|
||||
- 节点执行结果会写入 `OUTPUT_DIR`、`RESULT_OUTPUT_PATH` 和 `STAGE_MANIFEST_PATH` 对应的文件,再由 worker 汇总进运行记录。
|
||||
- 大文件和大 JSON 不应依赖 API 内联传输,应该通过 `artifact.path`、`dataRef.payloadPath`、共享 PVC 或对象存储引用传递。
|
||||
- 当前独立实现入口是 `operator-repos/builtin/lerobot_summary/src/operator.py` 中的 `run(...)`,平台 runtimeHandler 为 `builtin_lerobot_summary`。
|
||||
- 当前独立实现入口是 `operator-repos/builtin/lerobot_summary/src/operator.py` 中的 `run(...)`,平台 runtimeHandler 为 `lerobot`。
|
||||
|
||||
## 设计边界
|
||||
|
||||
|
||||
@ -15,7 +15,7 @@
|
||||
|
||||
## 平台语义
|
||||
|
||||
OpenVLA 微调算子;使用 BASE_MODEL、DATASET_PATH、TEXT_FIELD、TARGET_FIELD 等结构化参数,通过 Transformers/PyTorch 对真实指令-动作样本训练并输出模型目录与 metrics.json。推荐 1 张 A800 80GB。
|
||||
OpenVLA 微调算子;生产默认使用 OpenVLA 官方 vla-scripts/finetune.py 的 PEFT/LoRA 路径,读取真实 RLDS 数据集并输出 LoRA adapter artifact 与 metrics。推荐 1 张 A800 80GB。
|
||||
|
||||
## 运行时契约
|
||||
|
||||
@ -47,14 +47,17 @@ flowchart LR
|
||||
|
||||
## 关键超参数
|
||||
|
||||
- `BASE_MODEL`:类型 `string`,默认值 空字符串或由工作流显式填写。Hugging Face 或本地基础模型路径 通常建议在工作流中显式配置。
|
||||
- `DATASET_PATH`:类型 `string`,默认值 空字符串或由工作流显式填写。真实微调数据 JSON/JSONL/CSV 路径 通常建议在工作流中显式配置。
|
||||
- `TEXT_FIELD`:类型 `string`,默认值 `instruction`。指令/观测文本字段名 可直接使用默认值,也可在节点级覆盖。
|
||||
- `TARGET_FIELD`:类型 `string`,默认值 `action`。目标动作文本字段名 可直接使用默认值,也可在节点级覆盖。
|
||||
- `MAX_LENGTH`:类型 `number`,默认值 `256`。token 最大长度 可直接使用默认值,也可在节点级覆盖。
|
||||
- `EPOCHS`:类型 `number`,默认值 `1`。训练轮数 可直接使用默认值,也可在节点级覆盖。
|
||||
- `BATCH_SIZE`:类型 `number`,默认值 `1`。训练 batch size 可直接使用默认值,也可在节点级覆盖。
|
||||
- `LEARNING_RATE`:类型 `number`,默认值 `0.00005`。AdamW 学习率 可直接使用默认值,也可在节点级覆盖。
|
||||
- `TRAINING_BACKEND`:类型 `string`,默认值 `openvla_lora`。生产训练后端;默认 openvla_lora,兼容测试可显式 transformers_text 可直接使用默认值,也可在节点级覆盖。
|
||||
- `OPENVLA_ROOT`:类型 `string`,默认值 `/opt/openvla`。OpenVLA 仓库路径 可直接使用默认值,也可在节点级覆盖。
|
||||
- `BASE_MODEL`:类型 `string`,默认值 `openvla/openvla-7b`。OpenVLA 基础模型路径或 HF 模型名 可直接使用默认值,也可在节点级覆盖。
|
||||
- `DATA_ROOT_DIR`:类型 `string`,默认值 空字符串或由工作流显式填写。真实 RLDS 数据集根目录 通常建议在工作流中显式配置。
|
||||
- `DATASET_NAME`:类型 `string`,默认值 空字符串或由工作流显式填写。RLDS 数据集名称,例如 droid_wipe 通常建议在工作流中显式配置。
|
||||
- `MAX_STEPS`:类型 `number`,默认值 `1000`。短训最大 step 数,生产长训按数据规模调大 可直接使用默认值,也可在节点级覆盖。
|
||||
- `SAVE_STEPS`:类型 `number`,默认值 `500`。checkpoint 保存间隔 可直接使用默认值,也可在节点级覆盖。
|
||||
- `BATCH_SIZE`:类型 `number`,默认值 `8`。LoRA fine-tune batch size 可直接使用默认值,也可在节点级覆盖。
|
||||
- `LEARNING_RATE`:类型 `number`,默认值 `0.0005`。LoRA 学习率 可直接使用默认值,也可在节点级覆盖。
|
||||
- `LORA_RANK`:类型 `number`,默认值 `32`。LoRA rank 可直接使用默认值,也可在节点级覆盖。
|
||||
- `USE_QUANTIZATION`:类型 `boolean`,默认值 `false`。是否启用 4-bit quantization 可直接使用默认值,也可在节点级覆盖。
|
||||
- `PRECISION`:类型 `string`,默认值 `bf16`。推荐精度配置 可直接使用默认值,也可在节点级覆盖。
|
||||
- `RECOMMENDED_GPU`:类型 `string`,默认值 `1x NVIDIA A800 80GB`。推荐 GPU 配置 可直接使用默认值,也可在节点级覆盖。
|
||||
|
||||
@ -82,14 +85,17 @@ flowchart LR
|
||||
"type": "builtin",
|
||||
"category": "AI",
|
||||
"hyperparams": {
|
||||
"BASE_MODEL": "<按节点填写>",
|
||||
"DATASET_PATH": "<按节点填写>",
|
||||
"TEXT_FIELD": "instruction",
|
||||
"TARGET_FIELD": "action",
|
||||
"MAX_LENGTH": "256",
|
||||
"EPOCHS": "1",
|
||||
"BATCH_SIZE": "1",
|
||||
"LEARNING_RATE": "0.00005",
|
||||
"TRAINING_BACKEND": "openvla_lora",
|
||||
"OPENVLA_ROOT": "/opt/openvla",
|
||||
"BASE_MODEL": "openvla/openvla-7b",
|
||||
"DATA_ROOT_DIR": "<按节点填写>",
|
||||
"DATASET_NAME": "<按节点填写>",
|
||||
"MAX_STEPS": "1000",
|
||||
"SAVE_STEPS": "500",
|
||||
"BATCH_SIZE": "8",
|
||||
"LEARNING_RATE": "0.0005",
|
||||
"LORA_RANK": "32",
|
||||
"USE_QUANTIZATION": "false",
|
||||
"PRECISION": "bf16",
|
||||
"RECOMMENDED_GPU": "1x NVIDIA A800 80GB"
|
||||
}
|
||||
|
||||
@ -47,7 +47,8 @@ flowchart LR
|
||||
|
||||
## 关键超参数
|
||||
|
||||
- `MODEL_PATH`:类型 `string`,默认值 空字符串或由工作流显式填写。本地模型目录或 Hugging Face 模型名 通常建议在工作流中显式配置。
|
||||
- `INFERENCE_BACKEND`:类型 `string`,默认值 `openvla_transformers`。推理后端;默认从 MODEL_PATH 或上游 fine-tune artifact 加载 OpenVLA/Transformers 权重 可直接使用默认值,也可在节点级覆盖。
|
||||
- `MODEL_PATH`:类型 `string`,默认值 空字符串或由工作流显式填写。本地模型目录或 Hugging Face 模型名;为空时自动消费上游模型 artifact 通常建议在工作流中显式配置。
|
||||
- `BASE_MODEL`:类型 `string`,默认值 空字符串或由工作流显式填写。未提供 MODEL_PATH 时使用的基础模型 通常建议在工作流中显式配置。
|
||||
- `PROMPT`:类型 `string`,默认值 空字符串或由工作流显式填写。推理 prompt;为空则从上游样本读取 TEXT_FIELD 通常建议在工作流中显式配置。
|
||||
- `TEXT_FIELD`:类型 `string`,默认值 `instruction`。上游样本指令字段名 可直接使用默认值,也可在节点级覆盖。
|
||||
@ -79,6 +80,7 @@ flowchart LR
|
||||
"type": "builtin",
|
||||
"category": "AI",
|
||||
"hyperparams": {
|
||||
"INFERENCE_BACKEND": "openvla_transformers",
|
||||
"MODEL_PATH": "<按节点填写>",
|
||||
"BASE_MODEL": "<按节点填写>",
|
||||
"PROMPT": "<按节点填写>",
|
||||
|
||||
@ -22,7 +22,7 @@
|
||||
- Worker 会先把上游 artifact 汇总到 `INPUT_ARTIFACTS_PATH`,再把节点配置通过 `NODE_DATA_JSON` 注入运行容器。
|
||||
- 节点执行结果会写入 `OUTPUT_DIR`、`RESULT_OUTPUT_PATH` 和 `STAGE_MANIFEST_PATH` 对应的文件,再由 worker 汇总进运行记录。
|
||||
- 大文件和大 JSON 不应依赖 API 内联传输,应该通过 `artifact.path`、`dataRef.payloadPath`、共享 PVC 或对象存储引用传递。
|
||||
- 当前独立实现入口是 `operator-repos/builtin/rosbag_summary/src/operator.py` 中的 `run(...)`,平台 runtimeHandler 为 `builtin_rosbag_summary`。
|
||||
- 当前独立实现入口是 `operator-repos/builtin/rosbag_summary/src/operator.py` 中的 `run(...)`,平台 runtimeHandler 为 `rosbag`。
|
||||
|
||||
## 设计边界
|
||||
|
||||
|
||||
@ -22,7 +22,7 @@
|
||||
- Worker 会先把上游 artifact 汇总到 `INPUT_ARTIFACTS_PATH`,再把节点配置通过 `NODE_DATA_JSON` 注入运行容器。
|
||||
- 节点执行结果会写入 `OUTPUT_DIR`、`RESULT_OUTPUT_PATH` 和 `STAGE_MANIFEST_PATH` 对应的文件,再由 worker 汇总进运行记录。
|
||||
- 大文件和大 JSON 不应依赖 API 内联传输,应该通过 `artifact.path`、`dataRef.payloadPath`、共享 PVC 或对象存储引用传递。
|
||||
- 当前独立实现入口是 `operator-repos/builtin/vla_sample_manifest_validate/src/operator.py` 中的 `run(...)`,平台 runtimeHandler 为 `builtin_vla_sample_manifest_validate`。
|
||||
- 当前独立实现入口是 `operator-repos/builtin/vla_sample_manifest_validate/src/operator.py` 中的 `run(...)`,平台 runtimeHandler 为 `vla_sample_manifest_validate`。
|
||||
|
||||
## 设计边界
|
||||
|
||||
|
||||
@ -52,6 +52,7 @@ flowchart LR
|
||||
- `EPOCHS`:类型 `number`,默认值 `10`。训练轮数 可直接使用默认值,也可在节点级覆盖。
|
||||
- `IMAGE_SIZE`:类型 `number`,默认值 `640`。输入图片尺寸 可直接使用默认值,也可在节点级覆盖。
|
||||
- `BATCH_SIZE`:类型 `number`,默认值 `8`。训练 batch size 可直接使用默认值,也可在节点级覆盖。
|
||||
- `WORKERS`:类型 `number`,默认值 `0`。数据加载 worker 数;K8s 默认共享内存较小时建议为 0 可直接使用默认值,也可在节点级覆盖。
|
||||
- `CONF`:类型 `number`,默认值 `0.25`。后续检测推荐置信度 可直接使用默认值,也可在节点级覆盖。
|
||||
- `TARGET_LABELS`:类型 `string`,默认值 空字符串或由工作流显式填写。关注类别,逗号分隔 通常建议在工作流中显式配置。
|
||||
- `RECOMMENDED_GPU`:类型 `string`,默认值 `1x NVIDIA A800 80GB`。推荐 GPU 配置 可直接使用默认值,也可在节点级覆盖。
|
||||
@ -85,6 +86,7 @@ flowchart LR
|
||||
"EPOCHS": "10",
|
||||
"IMAGE_SIZE": "640",
|
||||
"BATCH_SIZE": "8",
|
||||
"WORKERS": "0",
|
||||
"CONF": "0.25",
|
||||
"TARGET_LABELS": "<按节点填写>",
|
||||
"RECOMMENDED_GPU": "1x NVIDIA A800 80GB"
|
||||
|
||||
@ -23,7 +23,7 @@
|
||||
- Worker 会先把上游 artifact 汇总到 `INPUT_ARTIFACTS_PATH`,再把节点配置通过 `NODE_DATA_JSON` 注入运行容器。
|
||||
- 节点执行结果会写入 `OUTPUT_DIR`、`RESULT_OUTPUT_PATH` 和 `STAGE_MANIFEST_PATH` 对应的文件,再由 worker 汇总进运行记录。
|
||||
- 大文件和大 JSON 不应依赖 API 内联传输,应该通过 `artifact.path`、`dataRef.payloadPath`、共享 PVC 或对象存储引用传递。
|
||||
- 当前独立实现入口是 `operator-repos/builtin/real_source/src/operator.py` 中的 `run(...)`,平台 runtimeHandler 为 `builtin_source`。
|
||||
- 当前独立实现入口是 `operator-repos/builtin/real_source/src/operator.py` 中的 `run(...)`,平台 runtimeHandler 为 `source`。
|
||||
- 该类源算子没有显式上游输入,主要依赖节点超参数和运行时注入的存储连接信息。
|
||||
|
||||
## 设计边界
|
||||
|
||||
@ -22,7 +22,7 @@
|
||||
- Worker 会先把上游 artifact 汇总到 `INPUT_ARTIFACTS_PATH`,再把节点配置通过 `NODE_DATA_JSON` 注入运行容器。
|
||||
- 节点执行结果会写入 `OUTPUT_DIR`、`RESULT_OUTPUT_PATH` 和 `STAGE_MANIFEST_PATH` 对应的文件,再由 worker 汇总进运行记录。
|
||||
- 大文件和大 JSON 不应依赖 API 内联传输,应该通过 `artifact.path`、`dataRef.payloadPath`、共享 PVC 或对象存储引用传递。
|
||||
- 当前独立实现入口是 `operator-repos/builtin/vla_model_evaluate/src/operator.py` 中的 `run(...)`,平台 runtimeHandler 为 `builtin_vla_model_evaluate`。
|
||||
- 当前独立实现入口是 `operator-repos/builtin/vla_model_evaluate/src/operator.py` 中的 `run(...)`,平台 runtimeHandler 为 `vla_model_evaluate`。
|
||||
|
||||
## 设计边界
|
||||
|
||||
|
||||
@ -22,7 +22,7 @@
|
||||
- Worker 会先把上游 artifact 汇总到 `INPUT_ARTIFACTS_PATH`,再把节点配置通过 `NODE_DATA_JSON` 注入运行容器。
|
||||
- 节点执行结果会写入 `OUTPUT_DIR`、`RESULT_OUTPUT_PATH` 和 `STAGE_MANIFEST_PATH` 对应的文件,再由 worker 汇总进运行记录。
|
||||
- 大文件和大 JSON 不应依赖 API 内联传输,应该通过 `artifact.path`、`dataRef.payloadPath`、共享 PVC 或对象存储引用传递。
|
||||
- 当前独立实现入口是 `operator-repos/builtin/vla_model_inference/src/operator.py` 中的 `run(...)`,平台 runtimeHandler 为 `builtin_vla_model_inference`。
|
||||
- 当前独立实现入口是 `operator-repos/builtin/vla_model_inference/src/operator.py` 中的 `run(...)`,平台 runtimeHandler 为 `vla_model_inference`。
|
||||
|
||||
## 设计边界
|
||||
|
||||
|
||||
@ -22,7 +22,7 @@
|
||||
- Worker 会先把上游 artifact 汇总到 `INPUT_ARTIFACTS_PATH`,再把节点配置通过 `NODE_DATA_JSON` 注入运行容器。
|
||||
- 节点执行结果会写入 `OUTPUT_DIR`、`RESULT_OUTPUT_PATH` 和 `STAGE_MANIFEST_PATH` 对应的文件,再由 worker 汇总进运行记录。
|
||||
- 大文件和大 JSON 不应依赖 API 内联传输,应该通过 `artifact.path`、`dataRef.payloadPath`、共享 PVC 或对象存储引用传递。
|
||||
- 当前独立实现入口是 `operator-repos/builtin/vla_model_train/src/operator.py` 中的 `run(...)`,平台 runtimeHandler 为 `builtin_vla_model_train`。
|
||||
- 当前独立实现入口是 `operator-repos/builtin/vla_model_train/src/operator.py` 中的 `run(...)`,平台 runtimeHandler 为 `vla_model_train`。
|
||||
|
||||
## 设计边界
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -33,6 +33,7 @@ import (
|
||||
|
||||
type validationIssue struct {
|
||||
Field string `json:"field"`
|
||||
Code string `json:"code,omitempty"`
|
||||
Message string `json:"message"`
|
||||
}
|
||||
|
||||
@ -1429,6 +1430,10 @@ func (server *server) handleAIWorkflowGenerate(writer http.ResponseWriter, reque
|
||||
renderAIError(writer, err)
|
||||
return
|
||||
}
|
||||
if issues := validateWorkflowGraphTopology(item.Nodes, item.Edges); len(issues) > 0 {
|
||||
renderValidationError(writer, issues...)
|
||||
return
|
||||
}
|
||||
renderJSON(writer, http.StatusOK, item)
|
||||
}
|
||||
|
||||
@ -2596,7 +2601,7 @@ func (server *server) handleProjectWorkflowsCreate(writer http.ResponseWriter, r
|
||||
renderValidationError(writer, issues...)
|
||||
return
|
||||
}
|
||||
if issues := validateInputPortConnectionTopology(payload.Nodes, payload.Edges); len(issues) > 0 {
|
||||
if issues := validateWorkflowTopology(payload.Nodes, payload.Edges); len(issues) > 0 {
|
||||
renderValidationError(writer, issues...)
|
||||
return
|
||||
}
|
||||
@ -2953,6 +2958,7 @@ func validateInputPortConnectionTopology(nodes []domain.WorkflowNode, edges []do
|
||||
}
|
||||
issues = append(issues, validationIssue{
|
||||
Field: "edges",
|
||||
Code: "workflow_input_port_conflict",
|
||||
Message: "节点“" + nodeLabel + "”的输入端口“" + portName + "”连接了多条上游连线。" +
|
||||
"每个输入端口只能连接一条上游连线;如需上传多个结果,请为每个结果添加单独的上传算子。",
|
||||
})
|
||||
@ -2960,6 +2966,43 @@ func validateInputPortConnectionTopology(nodes []domain.WorkflowNode, edges []do
|
||||
return issues
|
||||
}
|
||||
|
||||
func validateWorkflowGraphTopology(nodes []domain.WorkflowNode, edges []domain.WorkflowEdge) []validationIssue {
|
||||
graphIssues := domain.ValidateSingleConnectedWorkflowGraph(nodes, edges)
|
||||
if len(graphIssues) == 0 {
|
||||
return nil
|
||||
}
|
||||
issues := make([]validationIssue, 0, len(graphIssues))
|
||||
for _, graphIssue := range graphIssues {
|
||||
switch graphIssue.Code {
|
||||
case domain.WorkflowGraphIssueIsolatedNode:
|
||||
issues = append(issues, validationIssue{
|
||||
Field: "nodes",
|
||||
Code: string(graphIssue.Code),
|
||||
Message: "工作流存在孤立算子节点:" + strings.Join(graphIssue.NodeIDs, ", ") + "。请将所有算子接入同一条业务链路后再保存或运行。",
|
||||
})
|
||||
case domain.WorkflowGraphIssueDisconnected:
|
||||
issues = append(issues, validationIssue{
|
||||
Field: "edges",
|
||||
Code: string(graphIssue.Code),
|
||||
Message: "工作流存在多条互不连接的独立链路,分支节点:" + strings.Join(graphIssue.Component, ", ") + "。请把所有算子通过 artifact/lineage 连成一个单连通工作流。",
|
||||
})
|
||||
default:
|
||||
issues = append(issues, validationIssue{
|
||||
Field: "edges",
|
||||
Code: string(graphIssue.Code),
|
||||
Message: graphIssue.Message,
|
||||
})
|
||||
}
|
||||
}
|
||||
return issues
|
||||
}
|
||||
|
||||
func validateWorkflowTopology(nodes []domain.WorkflowNode, edges []domain.WorkflowEdge) []validationIssue {
|
||||
issues := validateInputPortConnectionTopology(nodes, edges)
|
||||
issues = append(issues, validateWorkflowGraphTopology(nodes, edges)...)
|
||||
return issues
|
||||
}
|
||||
|
||||
func (server *server) handleWorkflowsUpdate(writer http.ResponseWriter, request *http.Request) {
|
||||
item, err := server.store.GetWorkflow(request.Context(), chi.URLParam(request, "id"))
|
||||
if err != nil {
|
||||
@ -3093,7 +3136,7 @@ func (server *server) handleWorkflowsUpdate(writer http.ResponseWriter, request
|
||||
renderValidationError(writer, issues...)
|
||||
return
|
||||
}
|
||||
if issues := validateInputPortConnectionTopology(item.Nodes, item.Edges); len(issues) > 0 {
|
||||
if issues := validateWorkflowTopology(item.Nodes, item.Edges); len(issues) > 0 {
|
||||
renderValidationError(writer, issues...)
|
||||
return
|
||||
}
|
||||
@ -3187,7 +3230,7 @@ func (server *server) handleWorkflowRun(writer http.ResponseWriter, request *htt
|
||||
return
|
||||
}
|
||||
}
|
||||
if issues := validateInputPortConnectionTopology(workflow.Nodes, workflow.Edges); len(issues) > 0 {
|
||||
if issues := validateWorkflowTopology(workflow.Nodes, workflow.Edges); len(issues) > 0 {
|
||||
renderValidationError(writer, issues...)
|
||||
return
|
||||
}
|
||||
@ -3398,7 +3441,7 @@ func (server *server) handleTemplatesCreate(writer http.ResponseWriter, request
|
||||
payload.Type = normalizedScanWorkflowType(payload.ScanConfig)
|
||||
payload.MaxConcurrentRuns = normalizedScanMaxConcurrentRuns(payload.MaxConcurrentRuns)
|
||||
}
|
||||
if issues := validateInputPortConnectionTopology(payload.Nodes, payload.Edges); len(issues) > 0 {
|
||||
if issues := validateWorkflowTopology(payload.Nodes, payload.Edges); len(issues) > 0 {
|
||||
renderValidationError(writer, issues...)
|
||||
return
|
||||
}
|
||||
@ -3563,7 +3606,7 @@ func (server *server) handleTemplatesUpdate(writer http.ResponseWriter, request
|
||||
item.Type = normalizedScanWorkflowType(item.ScanConfig)
|
||||
item.MaxConcurrentRuns = normalizedScanMaxConcurrentRuns(item.MaxConcurrentRuns)
|
||||
}
|
||||
if issues := validateInputPortConnectionTopology(item.Nodes, item.Edges); len(issues) > 0 {
|
||||
if issues := validateWorkflowTopology(item.Nodes, item.Edges); len(issues) > 0 {
|
||||
renderValidationError(writer, issues...)
|
||||
return
|
||||
}
|
||||
|
||||
@ -5754,7 +5754,7 @@ func TestTemplateExecutionConfigValidationAndPersistence(t *testing.T) {
|
||||
"sourcePath":"oss://incoming"
|
||||
},
|
||||
"nodes":[],
|
||||
"edges":[]
|
||||
"edges":[{"id":"edge-runner-custom","source":"runner-node","sourceHandle":"out-1","target":"custom-node","targetHandle":"in-1"}]
|
||||
}`)
|
||||
|
||||
createRecorder := httptest.NewRecorder()
|
||||
@ -5875,7 +5875,7 @@ func TestWorkflowExecutionConfigValidationAndPersistence(t *testing.T) {
|
||||
"maxRetryAttempts":3,
|
||||
"retryBackoffSeconds":15,
|
||||
"nodes":[{"id":"node-source","type":"operator","data":{"label":"真实数据源","category":"IO","description":"source","inputs":[],"outputs":[{"id":"out-1","name":"file","type":"file"}],"hyperparams":[{"key":"SOURCE_TEXT","value":"api-test"}]},"position":{"x":0,"y":0}}],
|
||||
"edges":[]
|
||||
"edges":[{"id":"edge-runner-custom","source":"runner-node","sourceHandle":"out-1","target":"custom-node","targetHandle":"in-1"}]
|
||||
}`)
|
||||
|
||||
createRecorder := httptest.NewRecorder()
|
||||
@ -5948,7 +5948,7 @@ func TestWorkflowExecutionConfigValidationAndPersistence(t *testing.T) {
|
||||
"maxRetryAttempts":-2,
|
||||
"retryBackoffSeconds":-3,
|
||||
"nodes":[],
|
||||
"edges":[]
|
||||
"edges":[{"id":"edge-runner-custom","source":"runner-node","sourceHandle":"out-1","target":"custom-node","targetHandle":"in-1"}]
|
||||
}`)
|
||||
invalidCreateRecorder := httptest.NewRecorder()
|
||||
invalidCreateRequest := httptest.NewRequest(http.MethodPost, "/api/projects/"+project.ID+"/workflows", bytes.NewReader(invalidCreatePayload))
|
||||
@ -6346,7 +6346,7 @@ func TestCreateAndUpdatePreserveOperatorRunnerImage(t *testing.T) {
|
||||
"position":{"x":180,"y":0}
|
||||
}
|
||||
],
|
||||
"edges":[]
|
||||
"edges":[{"id":"edge-runner-custom","source":"runner-node","sourceHandle":"out-1","target":"custom-node","targetHandle":"in-1"}]
|
||||
}`)
|
||||
workflowCreateRecorder := httptest.NewRecorder()
|
||||
handler.ServeHTTP(workflowCreateRecorder, httptest.NewRequest(http.MethodPost, "/api/projects/"+project.ID+"/workflows", bytes.NewReader(workflowCreatePayload)))
|
||||
@ -6444,7 +6444,7 @@ func TestCreateAndUpdatePreserveOperatorRunnerImage(t *testing.T) {
|
||||
"position":{"x":180,"y":0}
|
||||
}
|
||||
],
|
||||
"edges":[]
|
||||
"edges":[{"id":"edge-runner-custom","source":"runner-node","sourceHandle":"out-1","target":"custom-node","targetHandle":"in-1"}]
|
||||
}`)
|
||||
templateCreateRecorder := httptest.NewRecorder()
|
||||
handler.ServeHTTP(templateCreateRecorder, httptest.NewRequest(http.MethodPost, "/api/templates", bytes.NewReader(templateCreatePayload)))
|
||||
|
||||
@ -354,6 +354,7 @@ type NodeExecutionRecord struct {
|
||||
OperatorVersion string `json:"operatorVersion,omitempty" bson:"operatorVersion,omitempty"`
|
||||
OperatorImage string `json:"operatorImage,omitempty" bson:"operatorImage,omitempty"`
|
||||
OperatorImageID string `json:"operatorImageId,omitempty" bson:"operatorImageId,omitempty"`
|
||||
Attempt int `json:"attempt,omitempty" bson:"attempt,omitempty"`
|
||||
Status NodeExecutionStatus `json:"status" bson:"status"`
|
||||
StartedAt string `json:"startedAt,omitempty" bson:"startedAt,omitempty"`
|
||||
EndedAt string `json:"endedAt,omitempty" bson:"endedAt,omitempty"`
|
||||
@ -438,63 +439,68 @@ type ArtifactLineageRecord struct {
|
||||
|
||||
type K8sRef struct {
|
||||
NodeID string `json:"nodeId" bson:"nodeId"`
|
||||
Attempt int `json:"attempt,omitempty" bson:"attempt,omitempty"`
|
||||
JobName string `json:"jobName" bson:"jobName"`
|
||||
Namespace string `json:"namespace" bson:"namespace"`
|
||||
}
|
||||
|
||||
type RunRecord struct {
|
||||
ID string `json:"id" bson:"id"`
|
||||
OrganizationID string `json:"organizationId,omitempty" bson:"organizationId,omitempty"`
|
||||
WorkflowID string `json:"workflowId" bson:"workflowId"`
|
||||
WorkflowName string `json:"workflowName" bson:"workflowName"`
|
||||
ProjectID string `json:"projectId" bson:"projectId"`
|
||||
ProjectName string `json:"projectName" bson:"projectName"`
|
||||
Trigger RunTrigger `json:"trigger" bson:"trigger"`
|
||||
Attempt int `json:"attempt,omitempty" bson:"attempt,omitempty"`
|
||||
ParentRunID string `json:"parentRunId,omitempty" bson:"parentRunId,omitempty"`
|
||||
RestartFromNodeID string `json:"restartFromNodeId,omitempty" bson:"restartFromNodeId,omitempty"`
|
||||
AvailableAt string `json:"availableAt,omitempty" bson:"availableAt,omitempty"`
|
||||
Status RunStatus `json:"status" bson:"status"`
|
||||
StopMode RunStopMode `json:"stopMode,omitempty" bson:"stopMode,omitempty"`
|
||||
StopRequestedAt string `json:"stopRequestedAt,omitempty" bson:"stopRequestedAt,omitempty"`
|
||||
PreviousRunAt string `json:"previousRunAt,omitempty" bson:"previousRunAt,omitempty"`
|
||||
CurrentRunAt string `json:"currentRunAt,omitempty" bson:"currentRunAt,omitempty"`
|
||||
StartedAt string `json:"startedAt,omitempty" bson:"startedAt,omitempty"`
|
||||
EndedAt string `json:"endedAt,omitempty" bson:"endedAt,omitempty"`
|
||||
DurationMS int64 `json:"durationMs,omitempty" bson:"durationMs,omitempty"`
|
||||
CurrentNodeID string `json:"currentNodeId,omitempty" bson:"currentNodeId,omitempty"`
|
||||
NodeExecutions []NodeExecutionRecord `json:"nodeExecutions" bson:"nodeExecutions"`
|
||||
Logs []LogEntryRecord `json:"logs" bson:"logs"`
|
||||
ResourceSeries []ResourceSample `json:"resourceSeries" bson:"resourceSeries"`
|
||||
Artifacts []ExecutionArtifact `json:"artifacts" bson:"artifacts"`
|
||||
K8sRefs []K8sRef `json:"k8sRefs" bson:"k8sRefs"`
|
||||
Error string `json:"error,omitempty" bson:"error,omitempty"`
|
||||
CreatedAt string `json:"createdAt" bson:"createdAt"`
|
||||
UpdatedAt string `json:"updatedAt" bson:"updatedAt"`
|
||||
ID string `json:"id" bson:"id"`
|
||||
OrganizationID string `json:"organizationId,omitempty" bson:"organizationId,omitempty"`
|
||||
WorkflowID string `json:"workflowId" bson:"workflowId"`
|
||||
WorkflowName string `json:"workflowName" bson:"workflowName"`
|
||||
ProjectID string `json:"projectId" bson:"projectId"`
|
||||
ProjectName string `json:"projectName" bson:"projectName"`
|
||||
Trigger RunTrigger `json:"trigger" bson:"trigger"`
|
||||
Attempt int `json:"attempt,omitempty" bson:"attempt,omitempty"`
|
||||
ParentRunID string `json:"parentRunId,omitempty" bson:"parentRunId,omitempty"`
|
||||
RestartFromNodeID string `json:"restartFromNodeId,omitempty" bson:"restartFromNodeId,omitempty"`
|
||||
AvailableAt string `json:"availableAt,omitempty" bson:"availableAt,omitempty"`
|
||||
ExecutionLeaseOwner string `json:"executionLeaseOwner,omitempty" bson:"executionLeaseOwner,omitempty"`
|
||||
ExecutionLeaseExpiresAt string `json:"executionLeaseExpiresAt,omitempty" bson:"executionLeaseExpiresAt,omitempty"`
|
||||
Status RunStatus `json:"status" bson:"status"`
|
||||
StopMode RunStopMode `json:"stopMode,omitempty" bson:"stopMode,omitempty"`
|
||||
StopRequestedAt string `json:"stopRequestedAt,omitempty" bson:"stopRequestedAt,omitempty"`
|
||||
PreviousRunAt string `json:"previousRunAt,omitempty" bson:"previousRunAt,omitempty"`
|
||||
CurrentRunAt string `json:"currentRunAt,omitempty" bson:"currentRunAt,omitempty"`
|
||||
StartedAt string `json:"startedAt,omitempty" bson:"startedAt,omitempty"`
|
||||
EndedAt string `json:"endedAt,omitempty" bson:"endedAt,omitempty"`
|
||||
DurationMS int64 `json:"durationMs,omitempty" bson:"durationMs,omitempty"`
|
||||
CurrentNodeID string `json:"currentNodeId,omitempty" bson:"currentNodeId,omitempty"`
|
||||
NodeExecutions []NodeExecutionRecord `json:"nodeExecutions" bson:"nodeExecutions"`
|
||||
Logs []LogEntryRecord `json:"logs" bson:"logs"`
|
||||
ResourceSeries []ResourceSample `json:"resourceSeries" bson:"resourceSeries"`
|
||||
Artifacts []ExecutionArtifact `json:"artifacts" bson:"artifacts"`
|
||||
K8sRefs []K8sRef `json:"k8sRefs" bson:"k8sRefs"`
|
||||
Error string `json:"error,omitempty" bson:"error,omitempty"`
|
||||
CreatedAt string `json:"createdAt" bson:"createdAt"`
|
||||
UpdatedAt string `json:"updatedAt" bson:"updatedAt"`
|
||||
}
|
||||
|
||||
type RunSummary struct {
|
||||
ID string `json:"id" bson:"id"`
|
||||
OrganizationID string `json:"organizationId,omitempty" bson:"organizationId,omitempty"`
|
||||
WorkflowID string `json:"workflowId" bson:"workflowId"`
|
||||
WorkflowName string `json:"workflowName" bson:"workflowName"`
|
||||
ProjectID string `json:"projectId" bson:"projectId"`
|
||||
ProjectName string `json:"projectName" bson:"projectName"`
|
||||
Trigger RunTrigger `json:"trigger" bson:"trigger"`
|
||||
Attempt int `json:"attempt,omitempty" bson:"attempt,omitempty"`
|
||||
ParentRunID string `json:"parentRunId,omitempty" bson:"parentRunId,omitempty"`
|
||||
RestartFromNodeID string `json:"restartFromNodeId,omitempty" bson:"restartFromNodeId,omitempty"`
|
||||
AvailableAt string `json:"availableAt,omitempty" bson:"availableAt,omitempty"`
|
||||
Status RunStatus `json:"status" bson:"status"`
|
||||
StopMode RunStopMode `json:"stopMode,omitempty" bson:"stopMode,omitempty"`
|
||||
StopRequestedAt string `json:"stopRequestedAt,omitempty" bson:"stopRequestedAt,omitempty"`
|
||||
StartedAt string `json:"startedAt,omitempty" bson:"startedAt,omitempty"`
|
||||
EndedAt string `json:"endedAt,omitempty" bson:"endedAt,omitempty"`
|
||||
DurationMS int64 `json:"durationMs,omitempty" bson:"durationMs,omitempty"`
|
||||
CurrentNodeID string `json:"currentNodeId,omitempty" bson:"currentNodeId,omitempty"`
|
||||
Error string `json:"error,omitempty" bson:"error,omitempty"`
|
||||
CreatedAt string `json:"createdAt" bson:"createdAt"`
|
||||
UpdatedAt string `json:"updatedAt" bson:"updatedAt"`
|
||||
ID string `json:"id" bson:"id"`
|
||||
OrganizationID string `json:"organizationId,omitempty" bson:"organizationId,omitempty"`
|
||||
WorkflowID string `json:"workflowId" bson:"workflowId"`
|
||||
WorkflowName string `json:"workflowName" bson:"workflowName"`
|
||||
ProjectID string `json:"projectId" bson:"projectId"`
|
||||
ProjectName string `json:"projectName" bson:"projectName"`
|
||||
Trigger RunTrigger `json:"trigger" bson:"trigger"`
|
||||
Attempt int `json:"attempt,omitempty" bson:"attempt,omitempty"`
|
||||
ParentRunID string `json:"parentRunId,omitempty" bson:"parentRunId,omitempty"`
|
||||
RestartFromNodeID string `json:"restartFromNodeId,omitempty" bson:"restartFromNodeId,omitempty"`
|
||||
AvailableAt string `json:"availableAt,omitempty" bson:"availableAt,omitempty"`
|
||||
ExecutionLeaseOwner string `json:"executionLeaseOwner,omitempty" bson:"executionLeaseOwner,omitempty"`
|
||||
ExecutionLeaseExpiresAt string `json:"executionLeaseExpiresAt,omitempty" bson:"executionLeaseExpiresAt,omitempty"`
|
||||
Status RunStatus `json:"status" bson:"status"`
|
||||
StopMode RunStopMode `json:"stopMode,omitempty" bson:"stopMode,omitempty"`
|
||||
StopRequestedAt string `json:"stopRequestedAt,omitempty" bson:"stopRequestedAt,omitempty"`
|
||||
StartedAt string `json:"startedAt,omitempty" bson:"startedAt,omitempty"`
|
||||
EndedAt string `json:"endedAt,omitempty" bson:"endedAt,omitempty"`
|
||||
DurationMS int64 `json:"durationMs,omitempty" bson:"durationMs,omitempty"`
|
||||
CurrentNodeID string `json:"currentNodeId,omitempty" bson:"currentNodeId,omitempty"`
|
||||
Error string `json:"error,omitempty" bson:"error,omitempty"`
|
||||
CreatedAt string `json:"createdAt" bson:"createdAt"`
|
||||
UpdatedAt string `json:"updatedAt" bson:"updatedAt"`
|
||||
}
|
||||
|
||||
type AuditTaskPayload struct {
|
||||
|
||||
@ -73,6 +73,20 @@ type InputPortConflict struct {
|
||||
EdgeIDs []string `json:"edgeIds"`
|
||||
}
|
||||
|
||||
type WorkflowGraphIssueCode string
|
||||
|
||||
const (
|
||||
WorkflowGraphIssueDisconnected WorkflowGraphIssueCode = "workflow_graph_disconnected"
|
||||
WorkflowGraphIssueIsolatedNode WorkflowGraphIssueCode = "workflow_graph_isolated_node"
|
||||
)
|
||||
|
||||
type WorkflowGraphIssue struct {
|
||||
Code WorkflowGraphIssueCode `json:"code"`
|
||||
NodeIDs []string `json:"nodeIds,omitempty"`
|
||||
Component []string `json:"component,omitempty"`
|
||||
Message string `json:"message"`
|
||||
}
|
||||
|
||||
func normalizeWorkflowHandle(value string) string {
|
||||
return strings.TrimSpace(value)
|
||||
}
|
||||
@ -157,6 +171,105 @@ func FindInputPortConflicts(nodes []WorkflowNode, edges []WorkflowEdge) []InputP
|
||||
return conflicts
|
||||
}
|
||||
|
||||
func ValidateSingleConnectedWorkflowGraph(nodes []WorkflowNode, edges []WorkflowEdge) []WorkflowGraphIssue {
|
||||
if len(nodes) <= 1 {
|
||||
return nil
|
||||
}
|
||||
nodeByID := make(map[string]WorkflowNode, len(nodes))
|
||||
for _, node := range nodes {
|
||||
trimmedID := strings.TrimSpace(node.ID)
|
||||
if trimmedID == "" {
|
||||
continue
|
||||
}
|
||||
nodeByID[trimmedID] = node
|
||||
}
|
||||
if len(nodeByID) <= 1 {
|
||||
return nil
|
||||
}
|
||||
|
||||
adjacent := make(map[string]map[string]struct{}, len(nodeByID))
|
||||
degree := make(map[string]int, len(nodeByID))
|
||||
for nodeID := range nodeByID {
|
||||
adjacent[nodeID] = map[string]struct{}{}
|
||||
}
|
||||
for _, edge := range edges {
|
||||
source := strings.TrimSpace(edge.Source)
|
||||
target := strings.TrimSpace(edge.Target)
|
||||
if source == "" || target == "" {
|
||||
continue
|
||||
}
|
||||
if _, ok := nodeByID[source]; !ok {
|
||||
continue
|
||||
}
|
||||
if _, ok := nodeByID[target]; !ok {
|
||||
continue
|
||||
}
|
||||
if _, ok := adjacent[source][target]; !ok {
|
||||
adjacent[source][target] = struct{}{}
|
||||
adjacent[target][source] = struct{}{}
|
||||
degree[source]++
|
||||
degree[target]++
|
||||
}
|
||||
}
|
||||
|
||||
issues := make([]WorkflowGraphIssue, 0)
|
||||
isolated := make([]string, 0)
|
||||
for nodeID := range nodeByID {
|
||||
if degree[nodeID] == 0 {
|
||||
isolated = append(isolated, nodeID)
|
||||
}
|
||||
}
|
||||
if len(isolated) > 0 {
|
||||
sort.Strings(isolated)
|
||||
issues = append(issues, WorkflowGraphIssue{
|
||||
Code: WorkflowGraphIssueIsolatedNode,
|
||||
NodeIDs: isolated,
|
||||
Message: "workflow contains isolated nodes",
|
||||
})
|
||||
}
|
||||
|
||||
visited := make(map[string]struct{}, len(nodeByID))
|
||||
components := make([][]string, 0)
|
||||
for nodeID := range nodeByID {
|
||||
if _, ok := visited[nodeID]; ok {
|
||||
continue
|
||||
}
|
||||
queue := []string{nodeID}
|
||||
visited[nodeID] = struct{}{}
|
||||
component := make([]string, 0)
|
||||
for len(queue) > 0 {
|
||||
current := queue[0]
|
||||
queue = queue[1:]
|
||||
component = append(component, current)
|
||||
for next := range adjacent[current] {
|
||||
if _, ok := visited[next]; ok {
|
||||
continue
|
||||
}
|
||||
visited[next] = struct{}{}
|
||||
queue = append(queue, next)
|
||||
}
|
||||
}
|
||||
sort.Strings(component)
|
||||
components = append(components, component)
|
||||
}
|
||||
if len(components) > 1 {
|
||||
sort.Slice(components, func(i, j int) bool {
|
||||
if len(components[i]) != len(components[j]) {
|
||||
return len(components[i]) > len(components[j])
|
||||
}
|
||||
return strings.Join(components[i], "\x00") < strings.Join(components[j], "\x00")
|
||||
})
|
||||
for _, component := range components[1:] {
|
||||
issues = append(issues, WorkflowGraphIssue{
|
||||
Code: WorkflowGraphIssueDisconnected,
|
||||
Component: component,
|
||||
Message: "workflow contains multiple disconnected chains",
|
||||
})
|
||||
}
|
||||
}
|
||||
return issues
|
||||
}
|
||||
|
||||
func auditDecisionMatchesHandle(handle string, decision AuditStatus) bool {
|
||||
if handle == "" {
|
||||
return decision == AuditStatusApproved
|
||||
|
||||
@ -16,6 +16,7 @@ import (
|
||||
|
||||
batchv1 "k8s.io/api/batch/v1"
|
||||
corev1 "k8s.io/api/core/v1"
|
||||
apierrors "k8s.io/apimachinery/pkg/api/errors"
|
||||
"k8s.io/apimachinery/pkg/api/resource"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/client-go/kubernetes"
|
||||
@ -36,6 +37,7 @@ type LaunchInput struct {
|
||||
WorkflowID string
|
||||
NodeID string
|
||||
NodeLabel string
|
||||
Attempt int
|
||||
TimeoutSeconds int
|
||||
Env map[string]string
|
||||
CPURequest string
|
||||
@ -128,6 +130,27 @@ func sanitizeName(value string) string {
|
||||
return normalized
|
||||
}
|
||||
|
||||
func launchAttempt(input LaunchInput) int {
|
||||
if input.Attempt <= 0 {
|
||||
return 1
|
||||
}
|
||||
return input.Attempt
|
||||
}
|
||||
|
||||
func launchJobName(input LaunchInput) string {
|
||||
jobName := sanitizeName(fmt.Sprintf("%s-%s-a%d", input.RunID, input.NodeID, launchAttempt(input)))
|
||||
if jobName == "" {
|
||||
jobName = "droboticflow-node-a1"
|
||||
}
|
||||
if len(jobName) > 63 {
|
||||
jobName = strings.Trim(jobName[:63], "-")
|
||||
}
|
||||
if jobName == "" {
|
||||
return "droboticflow-node-a1"
|
||||
}
|
||||
return jobName
|
||||
}
|
||||
|
||||
func parseResourceQuantity(field string, value string) (*resource.Quantity, error) {
|
||||
trimmed := strings.TrimSpace(value)
|
||||
if trimmed == "" {
|
||||
@ -422,18 +445,13 @@ func CreateJobManifest(namespace string, imagePullSecretName string, workspacePV
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
jobPrefix := sanitizeName(input.RunID + "-" + input.NodeID)
|
||||
if len(jobPrefix) > 52 {
|
||||
jobPrefix = jobPrefix[:52]
|
||||
}
|
||||
if jobPrefix == "" {
|
||||
jobPrefix = "droboticflow-node"
|
||||
}
|
||||
jobName := launchJobName(input)
|
||||
envVars := []corev1.EnvVar{
|
||||
{Name: "RUN_ID", Value: input.RunID},
|
||||
{Name: "WORKFLOW_ID", Value: input.WorkflowID},
|
||||
{Name: "NODE_ID", Value: input.NodeID},
|
||||
{Name: "NODE_LABEL", Value: input.NodeLabel},
|
||||
{Name: "RUN_ATTEMPT", Value: strconv.Itoa(launchAttempt(input))},
|
||||
}
|
||||
envKeys := make([]string, 0, len(input.Env))
|
||||
for key := range input.Env {
|
||||
@ -449,14 +467,15 @@ func CreateJobManifest(namespace string, imagePullSecretName string, workspacePV
|
||||
}
|
||||
job := &batchv1.Job{
|
||||
ObjectMeta: metav1.ObjectMeta{
|
||||
GenerateName: jobPrefix + "-",
|
||||
Namespace: namespace,
|
||||
Name: jobName,
|
||||
Namespace: namespace,
|
||||
Labels: map[string]string{
|
||||
"app": "droboticflow",
|
||||
"component": "operator-runner",
|
||||
"runId": input.RunID,
|
||||
"workflowId": input.WorkflowID,
|
||||
"nodeId": input.NodeID,
|
||||
"attempt": strconv.Itoa(launchAttempt(input)),
|
||||
},
|
||||
},
|
||||
Spec: batchv1.JobSpec{
|
||||
@ -467,6 +486,8 @@ func CreateJobManifest(namespace string, imagePullSecretName string, workspacePV
|
||||
"app": "droboticflow",
|
||||
"component": "operator-runner",
|
||||
"runId": input.RunID,
|
||||
"nodeId": input.NodeID,
|
||||
"attempt": strconv.Itoa(launchAttempt(input)),
|
||||
},
|
||||
},
|
||||
Spec: corev1.PodSpec{
|
||||
@ -805,7 +826,13 @@ func (launcher *Launcher) Launch(ctx context.Context, input LaunchInput) (*Launc
|
||||
}
|
||||
created, err := launcher.clientset.BatchV1().Jobs(launcher.namespace).Create(ctx, job, metav1.CreateOptions{})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
if !apierrors.IsAlreadyExists(err) {
|
||||
return nil, err
|
||||
}
|
||||
created, err = launcher.clientset.BatchV1().Jobs(launcher.namespace).Get(ctx, job.Name, metav1.GetOptions{})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
jobName := created.Name
|
||||
reference := &JobReference{JobName: jobName, Namespace: launcher.namespace}
|
||||
|
||||
@ -48,8 +48,8 @@ func TestCreateJobManifest(t *testing.T) {
|
||||
t.Fatalf("CreateJobManifest returned error: %v", err)
|
||||
}
|
||||
|
||||
if manifest.GenerateName == "" || manifest.GenerateName[:5] != "run-1" {
|
||||
t.Fatalf("expected manifest generateName to contain run id, got %s", manifest.GenerateName)
|
||||
if manifest.Name != "run-1-node-1-a1" {
|
||||
t.Fatalf("expected deterministic manifest name, got %s", manifest.Name)
|
||||
}
|
||||
if manifest.Spec.Template.Spec.Containers[0].Image != "ccr.example.com/dataflow/operator-runner:latest" {
|
||||
t.Fatalf("unexpected image: %s", manifest.Spec.Template.Spec.Containers[0].Image)
|
||||
|
||||
@ -114,6 +114,43 @@ func runIsAvailable(run *domain.RunRecord, now time.Time) bool {
|
||||
return !availableAt.After(now)
|
||||
}
|
||||
|
||||
func runLeaseExpiresAt(run *domain.RunRecord) time.Time {
|
||||
if run == nil {
|
||||
return time.Time{}
|
||||
}
|
||||
if parsed, ok := parseISOTime(run.ExecutionLeaseExpiresAt); ok {
|
||||
return parsed
|
||||
}
|
||||
return time.Time{}
|
||||
}
|
||||
|
||||
func runHasActiveLease(run *domain.RunRecord, now time.Time) bool {
|
||||
if run == nil || strings.TrimSpace(run.ExecutionLeaseOwner) == "" {
|
||||
return false
|
||||
}
|
||||
expiresAt := runLeaseExpiresAt(run)
|
||||
return !expiresAt.IsZero() && expiresAt.After(now)
|
||||
}
|
||||
|
||||
func setRunLease(run *domain.RunRecord, owner string, ttl time.Duration, now time.Time) {
|
||||
if run == nil {
|
||||
return
|
||||
}
|
||||
if ttl <= 0 {
|
||||
ttl = 5 * time.Minute
|
||||
}
|
||||
run.ExecutionLeaseOwner = strings.TrimSpace(owner)
|
||||
run.ExecutionLeaseExpiresAt = now.Add(ttl).UTC().Format(time.RFC3339Nano)
|
||||
}
|
||||
|
||||
func clearRunLease(run *domain.RunRecord) {
|
||||
if run == nil {
|
||||
return
|
||||
}
|
||||
run.ExecutionLeaseOwner = ""
|
||||
run.ExecutionLeaseExpiresAt = ""
|
||||
}
|
||||
|
||||
func clone[T any](value T) T {
|
||||
data, _ := json.Marshal(value)
|
||||
var out T
|
||||
|
||||
@ -901,7 +901,7 @@ func (store *MemoryStore) CreateRun(_ context.Context, workflowID string, trigge
|
||||
return &cloned, nil
|
||||
}
|
||||
|
||||
func (store *MemoryStore) ClaimNextQueuedRun(_ context.Context) (*domain.RunRecord, error) {
|
||||
func (store *MemoryStore) ClaimNextQueuedRun(_ context.Context, leaseOwner string, leaseTTL time.Duration) (*domain.RunRecord, error) {
|
||||
store.mu.Lock()
|
||||
defer store.mu.Unlock()
|
||||
var selected *domain.RunRecord
|
||||
@ -911,7 +911,7 @@ func (store *MemoryStore) ClaimNextQueuedRun(_ context.Context) (*domain.RunReco
|
||||
continue
|
||||
}
|
||||
candidate := clone(run)
|
||||
if !runIsAvailable(&candidate, now) {
|
||||
if !runIsAvailable(&candidate, now) || runHasActiveLease(&candidate, now) {
|
||||
continue
|
||||
}
|
||||
if selected == nil || candidate.CreatedAt < selected.CreatedAt {
|
||||
@ -924,31 +924,80 @@ func (store *MemoryStore) ClaimNextQueuedRun(_ context.Context) (*domain.RunReco
|
||||
selected.Status = domain.RunStatusRunning
|
||||
selected.StartedAt = nowISO()
|
||||
selected.UpdatedAt = nowISO()
|
||||
setRunLease(selected, leaseOwner, leaseTTL, now)
|
||||
computeRunDuration(selected)
|
||||
store.runs[selected.ID] = clone(*selected)
|
||||
cloned := clone(*selected)
|
||||
return &cloned, nil
|
||||
}
|
||||
|
||||
func (store *MemoryStore) ClaimQueuedRun(_ context.Context, runID string) (*domain.RunRecord, error) {
|
||||
func (store *MemoryStore) ClaimQueuedRun(_ context.Context, runID string, leaseOwner string, leaseTTL time.Duration) (*domain.RunRecord, error) {
|
||||
store.mu.Lock()
|
||||
defer store.mu.Unlock()
|
||||
run, ok := store.runs[runID]
|
||||
if !ok || run.Status != domain.RunStatusQueued {
|
||||
return nil, nil
|
||||
}
|
||||
if !runIsAvailable(&run, time.Now().UTC()) {
|
||||
now := time.Now().UTC()
|
||||
if !runIsAvailable(&run, now) || runHasActiveLease(&run, now) {
|
||||
return nil, nil
|
||||
}
|
||||
run.Status = domain.RunStatusRunning
|
||||
run.StartedAt = nowISO()
|
||||
run.UpdatedAt = nowISO()
|
||||
setRunLease(&run, leaseOwner, leaseTTL, now)
|
||||
computeRunDuration(&run)
|
||||
store.runs[run.ID] = clone(run)
|
||||
cloned := clone(run)
|
||||
return &cloned, nil
|
||||
}
|
||||
|
||||
func (store *MemoryStore) AcquireRunLease(_ context.Context, runID string, owner string, ttl time.Duration) (*domain.RunRecord, bool, error) {
|
||||
store.mu.Lock()
|
||||
defer store.mu.Unlock()
|
||||
run, ok := store.runs[runID]
|
||||
if !ok {
|
||||
return nil, false, nil
|
||||
}
|
||||
trimmedOwner := strings.TrimSpace(owner)
|
||||
now := time.Now().UTC()
|
||||
if runHasActiveLease(&run, now) && strings.TrimSpace(run.ExecutionLeaseOwner) != trimmedOwner {
|
||||
cloned := clone(run)
|
||||
return &cloned, false, nil
|
||||
}
|
||||
setRunLease(&run, trimmedOwner, ttl, now)
|
||||
run.UpdatedAt = nowISO()
|
||||
store.runs[run.ID] = clone(run)
|
||||
cloned := clone(run)
|
||||
return &cloned, true, nil
|
||||
}
|
||||
|
||||
func (store *MemoryStore) RenewRunLease(_ context.Context, runID string, owner string, ttl time.Duration) (bool, error) {
|
||||
store.mu.Lock()
|
||||
defer store.mu.Unlock()
|
||||
run, ok := store.runs[runID]
|
||||
if !ok || strings.TrimSpace(run.ExecutionLeaseOwner) != strings.TrimSpace(owner) {
|
||||
return false, nil
|
||||
}
|
||||
setRunLease(&run, owner, ttl, time.Now().UTC())
|
||||
run.UpdatedAt = nowISO()
|
||||
store.runs[run.ID] = clone(run)
|
||||
return true, nil
|
||||
}
|
||||
|
||||
func (store *MemoryStore) ReleaseRunLease(_ context.Context, runID string, owner string) error {
|
||||
store.mu.Lock()
|
||||
defer store.mu.Unlock()
|
||||
run, ok := store.runs[runID]
|
||||
if !ok || strings.TrimSpace(run.ExecutionLeaseOwner) != strings.TrimSpace(owner) {
|
||||
return nil
|
||||
}
|
||||
clearRunLease(&run)
|
||||
run.UpdatedAt = nowISO()
|
||||
store.runs[run.ID] = clone(run)
|
||||
return nil
|
||||
}
|
||||
|
||||
func (store *MemoryStore) RequestRunStop(_ context.Context, runID string, mode domain.RunStopMode) (*domain.RunRecord, error) {
|
||||
store.mu.Lock()
|
||||
defer store.mu.Unlock()
|
||||
|
||||
@ -789,8 +789,37 @@ func (store *MongoStore) CreateRun(ctx context.Context, workflowID string, trigg
|
||||
return &run, nil
|
||||
}
|
||||
|
||||
func (store *MongoStore) ClaimNextQueuedRun(ctx context.Context) (*domain.RunRecord, error) {
|
||||
now := nowISO()
|
||||
func mongoRunLeaseAvailableFilter(now string) []bson.M {
|
||||
return []bson.M{
|
||||
{"executionLeaseOwner": bson.M{"$exists": false}},
|
||||
{"executionLeaseOwner": ""},
|
||||
{"executionLeaseExpiresAt": bson.M{"$exists": false}},
|
||||
{"executionLeaseExpiresAt": ""},
|
||||
{"executionLeaseExpiresAt": bson.M{"$lte": now}},
|
||||
}
|
||||
}
|
||||
|
||||
func mongoRunLeaseSet(owner string, ttl time.Duration, now time.Time) bson.M {
|
||||
if ttl <= 0 {
|
||||
ttl = 5 * time.Minute
|
||||
}
|
||||
return bson.M{
|
||||
"executionLeaseOwner": strings.TrimSpace(owner),
|
||||
"executionLeaseExpiresAt": now.Add(ttl).UTC().Format(time.RFC3339Nano),
|
||||
}
|
||||
}
|
||||
|
||||
func (store *MongoStore) ClaimNextQueuedRun(ctx context.Context, leaseOwner string, leaseTTL time.Duration) (*domain.RunRecord, error) {
|
||||
nowTime := time.Now().UTC()
|
||||
now := nowTime.Format(time.RFC3339Nano)
|
||||
set := bson.M{
|
||||
"status": string(domain.RunStatusRunning),
|
||||
"startedAt": now,
|
||||
"updatedAt": now,
|
||||
}
|
||||
for key, value := range mongoRunLeaseSet(leaseOwner, leaseTTL, nowTime) {
|
||||
set[key] = value
|
||||
}
|
||||
result := store.runs.FindOneAndUpdate(
|
||||
ctx,
|
||||
bson.M{
|
||||
@ -800,12 +829,11 @@ func (store *MongoStore) ClaimNextQueuedRun(ctx context.Context) (*domain.RunRec
|
||||
{"availableAt": ""},
|
||||
{"availableAt": bson.M{"$lte": now}},
|
||||
},
|
||||
"$and": []bson.M{
|
||||
{"$or": mongoRunLeaseAvailableFilter(now)},
|
||||
},
|
||||
},
|
||||
bson.M{"$set": bson.M{
|
||||
"status": string(domain.RunStatusRunning),
|
||||
"startedAt": now,
|
||||
"updatedAt": now,
|
||||
}},
|
||||
bson.M{"$set": set},
|
||||
options.FindOneAndUpdate().SetSort(bson.D{{Key: "createdAt", Value: 1}}).SetReturnDocument(options.After),
|
||||
)
|
||||
var item domain.RunRecord
|
||||
@ -820,8 +848,17 @@ func (store *MongoStore) ClaimNextQueuedRun(ctx context.Context) (*domain.RunRec
|
||||
return &item, nil
|
||||
}
|
||||
|
||||
func (store *MongoStore) ClaimQueuedRun(ctx context.Context, runID string) (*domain.RunRecord, error) {
|
||||
now := nowISO()
|
||||
func (store *MongoStore) ClaimQueuedRun(ctx context.Context, runID string, leaseOwner string, leaseTTL time.Duration) (*domain.RunRecord, error) {
|
||||
nowTime := time.Now().UTC()
|
||||
now := nowTime.Format(time.RFC3339Nano)
|
||||
set := bson.M{
|
||||
"status": string(domain.RunStatusRunning),
|
||||
"startedAt": now,
|
||||
"updatedAt": now,
|
||||
}
|
||||
for key, value := range mongoRunLeaseSet(leaseOwner, leaseTTL, nowTime) {
|
||||
set[key] = value
|
||||
}
|
||||
result := store.runs.FindOneAndUpdate(
|
||||
ctx,
|
||||
bson.M{
|
||||
@ -832,12 +869,11 @@ func (store *MongoStore) ClaimQueuedRun(ctx context.Context, runID string) (*dom
|
||||
{"availableAt": ""},
|
||||
{"availableAt": bson.M{"$lte": now}},
|
||||
},
|
||||
"$and": []bson.M{
|
||||
{"$or": mongoRunLeaseAvailableFilter(now)},
|
||||
},
|
||||
},
|
||||
bson.M{"$set": bson.M{
|
||||
"status": string(domain.RunStatusRunning),
|
||||
"startedAt": now,
|
||||
"updatedAt": now,
|
||||
}},
|
||||
bson.M{"$set": set},
|
||||
options.FindOneAndUpdate().SetReturnDocument(options.After),
|
||||
)
|
||||
var item domain.RunRecord
|
||||
@ -852,6 +888,71 @@ func (store *MongoStore) ClaimQueuedRun(ctx context.Context, runID string) (*dom
|
||||
return &item, nil
|
||||
}
|
||||
|
||||
func (store *MongoStore) AcquireRunLease(ctx context.Context, runID string, owner string, ttl time.Duration) (*domain.RunRecord, bool, error) {
|
||||
nowTime := time.Now().UTC()
|
||||
now := nowTime.Format(time.RFC3339Nano)
|
||||
set := bson.M{"updatedAt": now}
|
||||
for key, value := range mongoRunLeaseSet(owner, ttl, nowTime) {
|
||||
set[key] = value
|
||||
}
|
||||
result := store.runs.FindOneAndUpdate(
|
||||
ctx,
|
||||
bson.M{
|
||||
"id": runID,
|
||||
"$or": append(
|
||||
mongoRunLeaseAvailableFilter(now),
|
||||
bson.M{"executionLeaseOwner": strings.TrimSpace(owner)},
|
||||
),
|
||||
},
|
||||
bson.M{"$set": set},
|
||||
options.FindOneAndUpdate().SetReturnDocument(options.After),
|
||||
)
|
||||
var item domain.RunRecord
|
||||
err := result.Decode(&item)
|
||||
if err == mongo.ErrNoDocuments {
|
||||
current, getErr := store.GetRun(ctx, runID)
|
||||
return current, false, getErr
|
||||
}
|
||||
if err != nil {
|
||||
return nil, false, err
|
||||
}
|
||||
hydrateRunDerivedFields(&item)
|
||||
return &item, true, nil
|
||||
}
|
||||
|
||||
func (store *MongoStore) RenewRunLease(ctx context.Context, runID string, owner string, ttl time.Duration) (bool, error) {
|
||||
nowTime := time.Now().UTC()
|
||||
now := nowTime.Format(time.RFC3339Nano)
|
||||
set := bson.M{"updatedAt": now}
|
||||
for key, value := range mongoRunLeaseSet(owner, ttl, nowTime) {
|
||||
set[key] = value
|
||||
}
|
||||
result, err := store.runs.UpdateOne(
|
||||
ctx,
|
||||
bson.M{"id": runID, "executionLeaseOwner": strings.TrimSpace(owner)},
|
||||
bson.M{"$set": set},
|
||||
)
|
||||
if err != nil {
|
||||
return false, err
|
||||
}
|
||||
return result.MatchedCount > 0, nil
|
||||
}
|
||||
|
||||
func (store *MongoStore) ReleaseRunLease(ctx context.Context, runID string, owner string) error {
|
||||
_, err := store.runs.UpdateOne(
|
||||
ctx,
|
||||
bson.M{"id": runID, "executionLeaseOwner": strings.TrimSpace(owner)},
|
||||
bson.M{
|
||||
"$set": bson.M{"updatedAt": nowISO()},
|
||||
"$unset": bson.M{
|
||||
"executionLeaseOwner": "",
|
||||
"executionLeaseExpiresAt": "",
|
||||
},
|
||||
},
|
||||
)
|
||||
return err
|
||||
}
|
||||
|
||||
func (store *MongoStore) RequestRunStop(ctx context.Context, runID string, mode domain.RunStopMode) (*domain.RunRecord, error) {
|
||||
run, err := store.GetRun(ctx, runID)
|
||||
if err != nil || run == nil {
|
||||
|
||||
@ -71,6 +71,7 @@ func (store *MongoStore) EnsureIndexes(ctx context.Context) error {
|
||||
uniqueIndex("id_unique", bson.D{{Key: "id", Value: 1}}),
|
||||
index("organizationId_status_createdAt", bson.D{{Key: "organizationId", Value: 1}, {Key: "status", Value: 1}, {Key: "createdAt", Value: -1}}),
|
||||
index("status_availableAt_createdAt", bson.D{{Key: "status", Value: 1}, {Key: "availableAt", Value: 1}, {Key: "createdAt", Value: -1}}),
|
||||
index("status_lease_availableAt_createdAt", bson.D{{Key: "status", Value: 1}, {Key: "executionLeaseExpiresAt", Value: 1}, {Key: "availableAt", Value: 1}, {Key: "createdAt", Value: -1}}),
|
||||
index("workflowId_createdAt", bson.D{{Key: "workflowId", Value: 1}, {Key: "createdAt", Value: -1}}),
|
||||
index("projectId_createdAt", bson.D{{Key: "projectId", Value: 1}, {Key: "createdAt", Value: -1}}),
|
||||
},
|
||||
|
||||
@ -3,6 +3,7 @@ package store
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"time"
|
||||
|
||||
"droboticflow/internal/domain"
|
||||
)
|
||||
@ -59,8 +60,11 @@ type Store interface {
|
||||
ListRunSummariesByOrganization(context.Context, string, string) ([]domain.RunSummary, error)
|
||||
GetRun(context.Context, string) (*domain.RunRecord, error)
|
||||
CreateRun(context.Context, string, domain.RunTrigger) (*domain.RunRecord, error)
|
||||
ClaimNextQueuedRun(context.Context) (*domain.RunRecord, error)
|
||||
ClaimQueuedRun(context.Context, string) (*domain.RunRecord, error)
|
||||
ClaimNextQueuedRun(context.Context, string, time.Duration) (*domain.RunRecord, error)
|
||||
ClaimQueuedRun(context.Context, string, string, time.Duration) (*domain.RunRecord, error)
|
||||
AcquireRunLease(context.Context, string, string, time.Duration) (*domain.RunRecord, bool, error)
|
||||
RenewRunLease(context.Context, string, string, time.Duration) (bool, error)
|
||||
ReleaseRunLease(context.Context, string, string) error
|
||||
RequestRunStop(context.Context, string, domain.RunStopMode) (*domain.RunRecord, error)
|
||||
UpsertRun(context.Context, domain.RunRecord) error
|
||||
GetSourceState(context.Context, string, string, string) (*domain.SourceStateRecord, error)
|
||||
|
||||
@ -589,6 +589,7 @@ func (runtime *Runtime) executeNode(ctx context.Context, run *domain.RunRecord,
|
||||
WorkflowID: run.WorkflowID,
|
||||
NodeID: node.ID,
|
||||
NodeLabel: node.Data.Label,
|
||||
Attempt: run.Attempt,
|
||||
TimeoutSeconds: nodeTimeoutSeconds,
|
||||
Env: env,
|
||||
CPURequest: resources.CPURequest,
|
||||
|
||||
@ -148,12 +148,12 @@ func writeDurationHistogram(writer http.ResponseWriter, name string, sum uint64,
|
||||
}
|
||||
|
||||
func (server *HTTPServer) handleProcessOnce(writer http.ResponseWriter, request *http.Request) {
|
||||
run, err := server.runtime.ProcessOnce(request.Context())
|
||||
result, err := server.runtime.ProcessOnce(request.Context())
|
||||
if err != nil {
|
||||
renderWorkerJSON(writer, http.StatusInternalServerError, map[string]string{"error": err.Error()})
|
||||
return
|
||||
}
|
||||
renderWorkerJSON(writer, http.StatusOK, map[string]any{"run": run})
|
||||
renderWorkerJSON(writer, http.StatusOK, result)
|
||||
}
|
||||
|
||||
func (server *HTTPServer) handleRetry(writer http.ResponseWriter, request *http.Request) {
|
||||
|
||||
@ -37,6 +37,21 @@ type Runtime struct {
|
||||
metrics WorkerMetrics
|
||||
processMu sync.Mutex
|
||||
activeRuns map[string]struct{}
|
||||
dispatchOwner string
|
||||
runLeaseTTL time.Duration
|
||||
}
|
||||
|
||||
type ProcessOnceStatus string
|
||||
|
||||
const (
|
||||
ProcessOnceStatusClaimed ProcessOnceStatus = "claimed"
|
||||
ProcessOnceStatusSkippedLeaseActive ProcessOnceStatus = "skipped_lease_active"
|
||||
ProcessOnceStatusNoQueuedRun ProcessOnceStatus = "no_queued_run"
|
||||
)
|
||||
|
||||
type ProcessOnceResult struct {
|
||||
Status ProcessOnceStatus `json:"status"`
|
||||
Run *domain.RunRecord `json:"run,omitempty"`
|
||||
}
|
||||
|
||||
var globalActiveDispatchStatuses = map[domain.RunStatus]struct{}{
|
||||
@ -72,9 +87,48 @@ func NewRuntime(dataStore store.Store, namespace string, imagePullSecretName str
|
||||
workspaceRoot: trimmedWorkspaceRoot,
|
||||
globalBOSEndpoint: strings.TrimSpace(globalBOSEndpoint),
|
||||
launcher: launcher,
|
||||
dispatchOwner: defaultDispatchOwner(),
|
||||
runLeaseTTL: defaultRunLeaseTTL(),
|
||||
}, nil
|
||||
}
|
||||
|
||||
func defaultDispatchOwner() string {
|
||||
hostname, err := os.Hostname()
|
||||
if err != nil || strings.TrimSpace(hostname) == "" {
|
||||
hostname = "unknown-host"
|
||||
}
|
||||
return fmt.Sprintf("%s:%d", hostname, os.Getpid())
|
||||
}
|
||||
|
||||
func defaultRunLeaseTTL() time.Duration {
|
||||
raw := strings.TrimSpace(os.Getenv("WORKER_RUN_LEASE_TTL_SECONDS"))
|
||||
if raw == "" {
|
||||
return 15 * time.Minute
|
||||
}
|
||||
seconds, err := strconv.Atoi(raw)
|
||||
if err != nil || seconds <= 0 {
|
||||
return 15 * time.Minute
|
||||
}
|
||||
return time.Duration(seconds) * time.Second
|
||||
}
|
||||
|
||||
func (runtime *Runtime) leaseOwner() string {
|
||||
if runtime == nil {
|
||||
return ""
|
||||
}
|
||||
if strings.TrimSpace(runtime.dispatchOwner) == "" {
|
||||
runtime.dispatchOwner = defaultDispatchOwner()
|
||||
}
|
||||
return runtime.dispatchOwner
|
||||
}
|
||||
|
||||
func (runtime *Runtime) leaseTTL() time.Duration {
|
||||
if runtime == nil || runtime.runLeaseTTL <= 0 {
|
||||
return defaultRunLeaseTTL()
|
||||
}
|
||||
return runtime.runLeaseTTL
|
||||
}
|
||||
|
||||
func (runtime *Runtime) MetricsSnapshot() MetricsSnapshot {
|
||||
return runtime.metrics.Snapshot()
|
||||
}
|
||||
@ -150,6 +204,9 @@ func applyNodeExecutionSnapshot(execution *domain.NodeExecutionRecord, node doma
|
||||
execution.OperatorVersion = strings.TrimSpace(node.Data.OperatorVersion)
|
||||
execution.OperatorImage = firstNonEmptyString(resolvedImage, node.Data.Image)
|
||||
execution.OperatorImageID = firstNonEmptyString(node.Data.OperatorImageID, resolvedImage, node.Data.Image)
|
||||
if execution.Attempt <= 0 {
|
||||
execution.Attempt = 1
|
||||
}
|
||||
if inputArtifacts != nil {
|
||||
execution.InputArtifacts = cloneArtifacts(inputArtifacts)
|
||||
}
|
||||
@ -406,11 +463,41 @@ func (runtime *Runtime) processClaimedRun(ctx context.Context, claimed *domain.R
|
||||
return
|
||||
}
|
||||
defer runtime.unmarkRunActive(claimed.ID)
|
||||
defer func() {
|
||||
if err := runtime.store.ReleaseRunLease(context.Background(), claimed.ID, runtime.leaseOwner()); err != nil {
|
||||
fmt.Printf("[worker] release run lease %s failed: %v\n", claimed.ID, err)
|
||||
}
|
||||
}()
|
||||
if _, err := runtime.processRun(ctx, claimed); err != nil {
|
||||
fmt.Printf("[worker] process run %s failed: %v\n", claimed.ID, err)
|
||||
}
|
||||
}
|
||||
|
||||
func (runtime *Runtime) renewRunLeaseUntil(ctx context.Context, runID string) {
|
||||
ttl := runtime.leaseTTL()
|
||||
interval := ttl / 3
|
||||
if interval <= 0 || interval > time.Minute {
|
||||
interval = time.Minute
|
||||
}
|
||||
ticker := time.NewTicker(interval)
|
||||
defer ticker.Stop()
|
||||
for {
|
||||
select {
|
||||
case <-ctx.Done():
|
||||
return
|
||||
case <-ticker.C:
|
||||
ok, err := runtime.store.RenewRunLease(context.Background(), runID, runtime.leaseOwner(), ttl)
|
||||
if err != nil {
|
||||
fmt.Printf("[worker] renew run lease %s failed: %v\n", runID, err)
|
||||
continue
|
||||
}
|
||||
if !ok {
|
||||
fmt.Printf("[worker] renew run lease %s skipped: owner changed or run missing\n", runID)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func (runtime *Runtime) tryMarkRunActive(runID string) bool {
|
||||
if strings.TrimSpace(runID) == "" {
|
||||
return false
|
||||
@ -468,7 +555,7 @@ func (runtime *Runtime) ProcessAvailable(ctx context.Context) error {
|
||||
if !runtime.tryMarkRunActive(runID) {
|
||||
continue
|
||||
}
|
||||
claimed, err := runtime.store.ClaimQueuedRun(ctx, runID)
|
||||
claimed, err := runtime.store.ClaimQueuedRun(ctx, runID, runtime.leaseOwner(), runtime.leaseTTL())
|
||||
if err != nil {
|
||||
runtime.unmarkRunActive(runID)
|
||||
processErr = err
|
||||
@ -609,6 +696,7 @@ func (runtime *Runtime) reconcileActiveRuns(ctx context.Context) error {
|
||||
execution := domain.NodeExecutionRecord{
|
||||
NodeID: node.ID,
|
||||
NodeLabel: node.Data.Label,
|
||||
Attempt: runExecutionAttempt(run),
|
||||
Status: domain.NodeExecutionStatusRunning,
|
||||
StartedAt: firstNonEmptyString(run.StartedAt, run.CurrentRunAt, run.CreatedAt),
|
||||
Logs: []domain.LogEntryRecord{},
|
||||
@ -1191,6 +1279,13 @@ func nextRunAttempt(run *domain.RunRecord) int {
|
||||
return run.Attempt + 1
|
||||
}
|
||||
|
||||
func runExecutionAttempt(run *domain.RunRecord) int {
|
||||
if run == nil || run.Attempt <= 0 {
|
||||
return 1
|
||||
}
|
||||
return run.Attempt
|
||||
}
|
||||
|
||||
func nextRunAvailableAt(workflow *domain.WorkflowRecord) string {
|
||||
if workflow == nil || workflow.RetryBackoffSeconds <= 0 {
|
||||
return nowISO()
|
||||
@ -1449,6 +1544,14 @@ func enqueueReadyNodes(workflow domain.WorkflowRecord, executionMap map[string]d
|
||||
}
|
||||
|
||||
func (runtime *Runtime) processRun(ctx context.Context, claimed *domain.RunRecord) (*domain.RunRecord, error) {
|
||||
if _, ok, err := runtime.store.AcquireRunLease(ctx, claimed.ID, runtime.leaseOwner(), runtime.leaseTTL()); err != nil {
|
||||
return nil, err
|
||||
} else if !ok {
|
||||
return claimed, nil
|
||||
}
|
||||
leaseCtx, stopLeaseRenewal := context.WithCancel(context.Background())
|
||||
defer stopLeaseRenewal()
|
||||
go runtime.renewRunLeaseUntil(leaseCtx, claimed.ID)
|
||||
workflow, err := runtime.store.GetWorkflow(ctx, claimed.WorkflowID)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@ -1470,6 +1573,16 @@ func (runtime *Runtime) processRun(ctx context.Context, claimed *domain.RunRecor
|
||||
appendLog(currentRun, logEntry("ERROR", message, "system"))
|
||||
return currentRun, runtime.store.UpsertRun(ctx, *currentRun)
|
||||
}
|
||||
if graphIssues := domain.ValidateSingleConnectedWorkflowGraph(workflow.Nodes, workflow.Edges); len(graphIssues) > 0 {
|
||||
currentRun := claimed
|
||||
message := "工作流图非法:存在孤立算子或多条互不连接的独立链路。请将所有算子通过 artifact/lineage 连成一个单连通工作流。"
|
||||
currentRun.Status = domain.RunStatusFailed
|
||||
currentRun.EndedAt = nowISO()
|
||||
currentRun.Error = message
|
||||
currentRun.UpdatedAt = nowISO()
|
||||
appendLog(currentRun, logEntry("ERROR", message, "system"))
|
||||
return currentRun, runtime.store.UpsertRun(ctx, *currentRun)
|
||||
}
|
||||
|
||||
currentRun, err := runtime.store.GetRun(ctx, claimed.ID)
|
||||
if err != nil {
|
||||
@ -1651,6 +1764,7 @@ func (runtime *Runtime) processRun(ctx context.Context, claimed *domain.RunRecor
|
||||
execution := domain.NodeExecutionRecord{
|
||||
NodeID: node.ID,
|
||||
NodeLabel: node.Data.Label,
|
||||
Attempt: runExecutionAttempt(currentRun),
|
||||
Status: domain.NodeExecutionStatusRunning,
|
||||
StartedAt: nowISO(),
|
||||
Logs: []domain.LogEntryRecord{logEntry("INFO", "Starting node execution", node.Data.Label)},
|
||||
@ -1731,6 +1845,7 @@ func (runtime *Runtime) processRun(ctx context.Context, claimed *domain.RunRecor
|
||||
execution = domain.NodeExecutionRecord{
|
||||
NodeID: node.ID,
|
||||
NodeLabel: node.Data.Label,
|
||||
Attempt: runExecutionAttempt(currentRun),
|
||||
Status: domain.NodeExecutionStatusRunning,
|
||||
StartedAt: nowISO(),
|
||||
Logs: []domain.LogEntryRecord{logEntry("INFO", "Starting node execution", node.Data.Label)},
|
||||
@ -1869,7 +1984,7 @@ func (runtime *Runtime) processRun(ctx context.Context, claimed *domain.RunRecor
|
||||
executionMap[outcome.nodeID] = execution
|
||||
applyExecution(currentRun, execution)
|
||||
if outcome.reference != nil {
|
||||
currentRun.K8sRefs = append(currentRun.K8sRefs, domain.K8sRef{NodeID: outcome.nodeID, JobName: outcome.reference.JobName, Namespace: outcome.reference.Namespace})
|
||||
currentRun.K8sRefs = append(currentRun.K8sRefs, domain.K8sRef{NodeID: outcome.nodeID, Attempt: runExecutionAttempt(currentRun), JobName: outcome.reference.JobName, Namespace: outcome.reference.Namespace})
|
||||
}
|
||||
if !gracefulStopRequested && !forceStopRequested {
|
||||
enqueueDependents(*workflow, executionMap, &readyQueue, readySet, allowedNodes, outcome.nodeID)
|
||||
@ -1909,16 +2024,19 @@ func edgeTargets(edges []domain.WorkflowEdge) []string {
|
||||
return items
|
||||
}
|
||||
|
||||
func (runtime *Runtime) ProcessOnce(ctx context.Context) (*domain.RunRecord, error) {
|
||||
func (runtime *Runtime) ProcessOnce(ctx context.Context) (*ProcessOnceResult, error) {
|
||||
if err := runtime.reconcileActiveRuns(ctx); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if err := runtime.enqueueStreamingWorkflows(ctx); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
claimed, err := runtime.store.ClaimNextQueuedRun(ctx)
|
||||
claimed, err := runtime.store.ClaimNextQueuedRun(ctx, runtime.leaseOwner(), runtime.leaseTTL())
|
||||
if err != nil || claimed == nil {
|
||||
return claimed, err
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &ProcessOnceResult{Status: ProcessOnceStatusNoQueuedRun}, nil
|
||||
}
|
||||
if !runtime.tryMarkRunActive(claimed.ID) {
|
||||
claimed.Status = domain.RunStatusQueued
|
||||
@ -1927,8 +2045,17 @@ func (runtime *Runtime) ProcessOnce(ctx context.Context) (*domain.RunRecord, err
|
||||
if updateErr := runtime.store.UpsertRun(ctx, *claimed); updateErr != nil {
|
||||
return nil, updateErr
|
||||
}
|
||||
return nil, nil
|
||||
return &ProcessOnceResult{Status: ProcessOnceStatusSkippedLeaseActive, Run: claimed}, nil
|
||||
}
|
||||
defer runtime.unmarkRunActive(claimed.ID)
|
||||
return runtime.processRun(ctx, claimed)
|
||||
defer func() {
|
||||
if err := runtime.store.ReleaseRunLease(context.Background(), claimed.ID, runtime.leaseOwner()); err != nil {
|
||||
fmt.Printf("[worker] release run lease %s failed: %v\n", claimed.ID, err)
|
||||
}
|
||||
}()
|
||||
run, err := runtime.processRun(ctx, claimed)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &ProcessOnceResult{Status: ProcessOnceStatusClaimed, Run: run}, nil
|
||||
}
|
||||
|
||||
@ -160,6 +160,18 @@ func mustArtifactPayload(t *testing.T, artifact domain.ExecutionArtifact) map[st
|
||||
return nil
|
||||
}
|
||||
|
||||
func mustProcessOnceRun(t *testing.T, runtime *Runtime, ctx context.Context) *domain.RunRecord {
|
||||
t.Helper()
|
||||
result, err := runtime.ProcessOnce(ctx)
|
||||
if err != nil {
|
||||
t.Fatalf("process run: %v", err)
|
||||
}
|
||||
if result == nil || result.Run == nil {
|
||||
t.Fatalf("expected process-once to return a run, got %#v", result)
|
||||
}
|
||||
return result.Run
|
||||
}
|
||||
|
||||
func TestRuntimeProcessAvailableSkipsAlreadyActiveRun(t *testing.T) {
|
||||
ctx := context.Background()
|
||||
dataStore := store.NewMemoryStore()
|
||||
@ -421,10 +433,7 @@ func TestProcessRunFailsInvalidIncrementalDirectoryDepth(t *testing.T) {
|
||||
if err != nil {
|
||||
t.Fatalf("create runtime: %v", err)
|
||||
}
|
||||
processed, err := runtime.ProcessOnce(ctx)
|
||||
if err != nil {
|
||||
t.Fatalf("process run: %v", err)
|
||||
}
|
||||
processed := mustProcessOnceRun(t, runtime, ctx)
|
||||
if processed.Status != domain.RunStatusFailed {
|
||||
t.Fatalf("expected failed run, got %s", processed.Status)
|
||||
}
|
||||
@ -487,10 +496,7 @@ func TestProcessRunFailsInvalidIncrementalUnit(t *testing.T) {
|
||||
if err != nil {
|
||||
t.Fatalf("create runtime: %v", err)
|
||||
}
|
||||
processed, err := runtime.ProcessOnce(ctx)
|
||||
if err != nil {
|
||||
t.Fatalf("process run: %v", err)
|
||||
}
|
||||
processed := mustProcessOnceRun(t, runtime, ctx)
|
||||
if processed.Status != domain.RunStatusFailed {
|
||||
t.Fatalf("expected failed run, got %s", processed.Status)
|
||||
}
|
||||
@ -552,10 +558,7 @@ func TestProcessRunFailsInvalidScanMode(t *testing.T) {
|
||||
if err != nil {
|
||||
t.Fatalf("create runtime: %v", err)
|
||||
}
|
||||
processed, err := runtime.ProcessOnce(ctx)
|
||||
if err != nil {
|
||||
t.Fatalf("process run: %v", err)
|
||||
}
|
||||
processed := mustProcessOnceRun(t, runtime, ctx)
|
||||
if processed.Status != domain.RunStatusFailed {
|
||||
t.Fatalf("expected failed run, got %s", processed.Status)
|
||||
}
|
||||
@ -617,10 +620,7 @@ func TestProcessRunFailsInvalidDataSource(t *testing.T) {
|
||||
if err != nil {
|
||||
t.Fatalf("create runtime: %v", err)
|
||||
}
|
||||
processed, err := runtime.ProcessOnce(ctx)
|
||||
if err != nil {
|
||||
t.Fatalf("process run: %v", err)
|
||||
}
|
||||
processed := mustProcessOnceRun(t, runtime, ctx)
|
||||
if processed.Status != domain.RunStatusFailed {
|
||||
t.Fatalf("expected failed run, got %s", processed.Status)
|
||||
}
|
||||
@ -3271,11 +3271,11 @@ func TestRuntimeReconcileActiveRunsClearsQueuedRunWithMissingActiveJob(t *testin
|
||||
}
|
||||
}
|
||||
|
||||
func TestRuntimeProcessRunResumesUnconnectedPendingNodes(t *testing.T) {
|
||||
func TestRuntimeProcessRunResumesConnectedPendingNodes(t *testing.T) {
|
||||
ctx := context.Background()
|
||||
dataStore := store.NewMemoryStore()
|
||||
|
||||
project, err := dataStore.CreateProject(ctx, domain.CreateProjectInput{Name: "恢复项目", Description: "resume unconnected"})
|
||||
project, err := dataStore.CreateProject(ctx, domain.CreateProjectInput{Name: "恢复项目", Description: "resume connected"})
|
||||
if err != nil {
|
||||
t.Fatalf("create project: %v", err)
|
||||
}
|
||||
@ -3287,9 +3287,13 @@ func TestRuntimeProcessRunResumesUnconnectedPendingNodes(t *testing.T) {
|
||||
workflow, err := dataStore.CreateWorkflow(ctx, domain.CreateWorkflowInput{
|
||||
ProjectID: project.ID,
|
||||
Name: "无边批次恢复",
|
||||
Description: "resume unconnected",
|
||||
Description: "resume connected",
|
||||
Type: domain.WorkflowTypeBatch,
|
||||
Nodes: nodes,
|
||||
Edges: []domain.WorkflowEdge{
|
||||
{ID: "source-a-to-source-b", Source: "source-a", SourceHandle: "out-1", Target: "source-b", TargetHandle: "in-1"},
|
||||
{ID: "source-b-to-source-c", Source: "source-b", SourceHandle: "out-1", Target: "source-c", TargetHandle: "in-1"},
|
||||
},
|
||||
})
|
||||
if err != nil {
|
||||
t.Fatalf("create workflow: %v", err)
|
||||
@ -3719,7 +3723,7 @@ func TestRuntimeProcessRunExecutesIndependentNodesInParallel(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestRuntimeProcessRunContinuesDisconnectedNodesPastConcurrencyLimit(t *testing.T) {
|
||||
func TestRuntimeProcessRunContinuesConnectedBranchesPastConcurrencyLimit(t *testing.T) {
|
||||
ctx := context.Background()
|
||||
dataStore := store.NewMemoryStore()
|
||||
settings, err := dataStore.GetSettings(ctx)
|
||||
@ -3735,7 +3739,17 @@ func TestRuntimeProcessRunContinuesDisconnectedNodesPastConcurrencyLimit(t *test
|
||||
if err != nil {
|
||||
t.Fatalf("create project: %v", err)
|
||||
}
|
||||
nodes := make([]domain.WorkflowNode, 0, 5)
|
||||
nodes := []domain.WorkflowNode{{
|
||||
ID: "root",
|
||||
Type: "operator",
|
||||
Data: domain.WorkflowNodeData{
|
||||
Label: "Shell 命令执行",
|
||||
Category: "UTIL",
|
||||
Description: "root node",
|
||||
Hyperparams: []domain.HyperParam{{Key: "COMMAND", Value: `printf '{"node":"root"}' > root.json`}},
|
||||
},
|
||||
}}
|
||||
edges := make([]domain.WorkflowEdge, 0, 5)
|
||||
for index := 0; index < 5; index++ {
|
||||
nodeID := fmt.Sprintf("independent-%d", index)
|
||||
nodes = append(nodes, domain.WorkflowNode{
|
||||
@ -3748,15 +3762,16 @@ func TestRuntimeProcessRunContinuesDisconnectedNodesPastConcurrencyLimit(t *test
|
||||
Hyperparams: []domain.HyperParam{{Key: "COMMAND", Value: fmt.Sprintf(`printf '{"node":"%s"}' > %s.json`, nodeID, nodeID)}},
|
||||
},
|
||||
})
|
||||
edges = append(edges, domain.WorkflowEdge{ID: "root-to-" + nodeID, Source: "root", Target: nodeID})
|
||||
}
|
||||
workflow, err := dataStore.CreateWorkflow(ctx, domain.CreateWorkflowInput{
|
||||
ProjectID: project.ID,
|
||||
Name: "无边独立节点工作流",
|
||||
Description: "disconnected node batch",
|
||||
Name: "单连通分支工作流",
|
||||
Description: "connected branch batch",
|
||||
Type: domain.WorkflowTypeBatch,
|
||||
MaxConcurrentRuns: 2,
|
||||
Nodes: nodes,
|
||||
Edges: []domain.WorkflowEdge{},
|
||||
Edges: edges,
|
||||
})
|
||||
if err != nil {
|
||||
t.Fatalf("create workflow: %v", err)
|
||||
@ -3799,6 +3814,16 @@ func TestRuntimeRerunSubtreeOnlyExecutesSelectedSubgraph(t *testing.T) {
|
||||
Description: "rerun subtree",
|
||||
Type: domain.WorkflowTypeBatch,
|
||||
Nodes: []domain.WorkflowNode{
|
||||
{
|
||||
ID: "root",
|
||||
Type: "operator",
|
||||
Data: domain.WorkflowNodeData{
|
||||
Label: "Shell 命令执行",
|
||||
Category: "FLOW",
|
||||
Description: "root",
|
||||
Hyperparams: []domain.HyperParam{{Key: "COMMAND", Value: `printf '{"root":true}' > root.json`}},
|
||||
},
|
||||
},
|
||||
{
|
||||
ID: "start-a",
|
||||
Type: "operator",
|
||||
@ -3831,6 +3856,8 @@ func TestRuntimeRerunSubtreeOnlyExecutesSelectedSubgraph(t *testing.T) {
|
||||
},
|
||||
},
|
||||
Edges: []domain.WorkflowEdge{
|
||||
{ID: "root-to-start-a", Source: "root", Target: "start-a"},
|
||||
{ID: "root-to-start-b", Source: "root", Target: "start-b"},
|
||||
{ID: "a-to-downstream", Source: "start-a", Target: "downstream-a"},
|
||||
},
|
||||
})
|
||||
@ -3844,7 +3871,15 @@ func TestRuntimeRerunSubtreeOnlyExecutesSelectedSubgraph(t *testing.T) {
|
||||
}
|
||||
run.Trigger = domain.RunTriggerRerunSubtree
|
||||
run.RestartFromNodeID = "start-a"
|
||||
run.NodeExecutions = []domain.NodeExecutionRecord{}
|
||||
startedAt := nowISO()
|
||||
run.NodeExecutions = []domain.NodeExecutionRecord{{
|
||||
NodeID: "root",
|
||||
NodeLabel: "Shell 命令执行",
|
||||
Status: domain.NodeExecutionStatusCompleted,
|
||||
StartedAt: startedAt,
|
||||
EndedAt: startedAt,
|
||||
Artifacts: []domain.ExecutionArtifact{{ID: "artifact-root", RunID: run.ID, NodeID: "root", PortID: "out-1", Name: "root.json", Type: domain.PortTypeJSON, Data: map[string]any{"root": true}}},
|
||||
}}
|
||||
run.Status = domain.RunStatusQueued
|
||||
run.UpdatedAt = nowISO()
|
||||
if err := dataStore.UpsertRun(ctx, *run); err != nil {
|
||||
@ -3916,13 +3951,7 @@ func TestProcessRunKeepsClaimedRunRunningWhenExistingNodeExecutionIsActive(t *te
|
||||
t.Fatalf("upsert run: %v", err)
|
||||
}
|
||||
|
||||
processed, err := runtime.ProcessOnce(ctx)
|
||||
if err != nil {
|
||||
t.Fatalf("process once: %v", err)
|
||||
}
|
||||
if processed == nil {
|
||||
t.Fatalf("expected processed run")
|
||||
}
|
||||
processed := mustProcessOnceRun(t, runtime, ctx)
|
||||
if processed.Status != domain.RunStatusRunning {
|
||||
t.Fatalf("expected running status, got %s", processed.Status)
|
||||
}
|
||||
|
||||
@ -9,4 +9,7 @@ ENV PYTHONUNBUFFERED=1 \
|
||||
HOME=/tmp/droboticflow-home
|
||||
|
||||
RUN python -m pip install --no-cache-dir transformers accelerate safetensors nvidia-ml-py
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends git ffmpeg libgl1 libglib2.0-0 && rm -rf /var/lib/apt/lists/*
|
||||
RUN python -m pip install --no-cache-dir lerobot peft draccus wandb hydra-core omegaconf zarr numcodecs dill einops diffusers
|
||||
RUN git clone --depth=1 https://github.com/openvla/openvla.git /opt/openvla && git clone --depth=1 https://github.com/real-stanford/diffusion_policy.git /opt/diffusion_policy
|
||||
RUN mkdir -p /tmp/droboticflow-home /workspace /outputs
|
||||
|
||||
@ -8,8 +8,8 @@
|
||||
"/app/backend/operator-runner/main.py"
|
||||
],
|
||||
"dependencyProfile": [
|
||||
"real-act-training-command",
|
||||
"trajectory-demonstration-files",
|
||||
"huggingface-lerobot-act",
|
||||
"lerobot-dataset-or-local-root",
|
||||
"gpu-a800"
|
||||
],
|
||||
"dockerfile": "operator-repos/builtin/act_policy_train/Dockerfile",
|
||||
@ -18,7 +18,7 @@
|
||||
"operatorId": "operator-builtin-act-policy-train",
|
||||
"operatorSlug": "act_policy_train",
|
||||
"requiresGpu": true,
|
||||
"runtimeHandler": "act_policy_train",
|
||||
"runtimeHandler": "builtin_act_policy_train",
|
||||
"runtimeSource": "operator-repos/builtin/act_policy_train/src/operator.py",
|
||||
"sourceRoot": "operator-repos/builtin/act_policy_train"
|
||||
},
|
||||
@ -39,7 +39,7 @@
|
||||
"operatorId": "operator-builtin-action-state-quality-validate",
|
||||
"operatorSlug": "action_state_quality_validate",
|
||||
"requiresGpu": false,
|
||||
"runtimeHandler": "action_state_quality_validate",
|
||||
"runtimeHandler": "builtin_action_state_quality_validate",
|
||||
"runtimeSource": "operator-repos/builtin/action_state_quality_validate/src/operator.py",
|
||||
"sourceRoot": "operator-repos/builtin/action_state_quality_validate"
|
||||
},
|
||||
@ -61,7 +61,7 @@
|
||||
"operatorId": "operator-builtin-agibot-world2026-validate",
|
||||
"operatorSlug": "agibot_world2026_validate",
|
||||
"requiresGpu": false,
|
||||
"runtimeHandler": "agibot_world2026_validate",
|
||||
"runtimeHandler": "builtin_agibot_world2026_validate",
|
||||
"runtimeSource": "operator-repos/builtin/agibot_world2026_validate/src/operator.py",
|
||||
"sourceRoot": "operator-repos/builtin/agibot_world2026_validate"
|
||||
},
|
||||
@ -83,7 +83,7 @@
|
||||
"operatorId": "operator-builtin-aloha-hdf5-validate",
|
||||
"operatorSlug": "aloha_hdf5_validate",
|
||||
"requiresGpu": false,
|
||||
"runtimeHandler": "aloha_hdf5_validate",
|
||||
"runtimeHandler": "builtin_aloha_hdf5_validate",
|
||||
"runtimeSource": "operator-repos/builtin/aloha_hdf5_validate/src/operator.py",
|
||||
"sourceRoot": "operator-repos/builtin/aloha_hdf5_validate"
|
||||
},
|
||||
@ -103,7 +103,7 @@
|
||||
"operatorId": "operator-builtin-audit-sample",
|
||||
"operatorSlug": "audit_sample",
|
||||
"requiresGpu": false,
|
||||
"runtimeHandler": "audit_sampling",
|
||||
"runtimeHandler": "builtin_audit_sampling",
|
||||
"runtimeSource": "operator-repos/builtin/audit_sample/src/operator.py",
|
||||
"sourceRoot": "operator-repos/builtin/audit_sample"
|
||||
},
|
||||
@ -126,7 +126,7 @@
|
||||
"operatorId": "operator-builtin-bop-dataset-validate",
|
||||
"operatorSlug": "bop_dataset_validate",
|
||||
"requiresGpu": false,
|
||||
"runtimeHandler": "bop_dataset_validate",
|
||||
"runtimeHandler": "builtin_bop_dataset_validate",
|
||||
"runtimeSource": "operator-repos/builtin/bop_dataset_validate/src/operator.py",
|
||||
"sourceRoot": "operator-repos/builtin/bop_dataset_validate"
|
||||
},
|
||||
@ -146,7 +146,7 @@
|
||||
"operatorId": "operator-builtin-bos-incremental-scan",
|
||||
"operatorSlug": "bos_incremental_scan",
|
||||
"requiresGpu": false,
|
||||
"runtimeHandler": "source",
|
||||
"runtimeHandler": "builtin_source",
|
||||
"runtimeSource": "operator-repos/builtin/bos_incremental_scan/src/operator.py",
|
||||
"sourceRoot": "operator-repos/builtin/bos_incremental_scan"
|
||||
},
|
||||
@ -168,7 +168,7 @@
|
||||
"operatorId": "operator-builtin-bridgedata-tfds-manifest-validate",
|
||||
"operatorSlug": "bridgedata_tfds_manifest_validate",
|
||||
"requiresGpu": false,
|
||||
"runtimeHandler": "bridgedata_tfds_manifest_validate",
|
||||
"runtimeHandler": "builtin_bridgedata_tfds_manifest_validate",
|
||||
"runtimeSource": "operator-repos/builtin/bridgedata_tfds_manifest_validate/src/operator.py",
|
||||
"sourceRoot": "operator-repos/builtin/bridgedata_tfds_manifest_validate"
|
||||
},
|
||||
@ -190,7 +190,7 @@
|
||||
"operatorId": "operator-builtin-calvin-episode-validate",
|
||||
"operatorSlug": "calvin_episode_validate",
|
||||
"requiresGpu": false,
|
||||
"runtimeHandler": "calvin_episode_validate",
|
||||
"runtimeHandler": "builtin_calvin_episode_validate",
|
||||
"runtimeSource": "operator-repos/builtin/calvin_episode_validate/src/operator.py",
|
||||
"sourceRoot": "operator-repos/builtin/calvin_episode_validate"
|
||||
},
|
||||
@ -212,7 +212,7 @@
|
||||
"operatorId": "operator-builtin-camera-calibration-validate",
|
||||
"operatorSlug": "camera_calibration_validate",
|
||||
"requiresGpu": false,
|
||||
"runtimeHandler": "camera_calibration_validate",
|
||||
"runtimeHandler": "builtin_camera_calibration_validate",
|
||||
"runtimeSource": "operator-repos/builtin/camera_calibration_validate/src/operator.py",
|
||||
"sourceRoot": "operator-repos/builtin/camera_calibration_validate"
|
||||
},
|
||||
@ -233,7 +233,7 @@
|
||||
"operatorId": "operator-builtin-coco-annotation-validate",
|
||||
"operatorSlug": "coco_annotation_validate",
|
||||
"requiresGpu": false,
|
||||
"runtimeHandler": "coco_annotation_validate",
|
||||
"runtimeHandler": "builtin_coco_annotation_validate",
|
||||
"runtimeSource": "operator-repos/builtin/coco_annotation_validate/src/operator.py",
|
||||
"sourceRoot": "operator-repos/builtin/coco_annotation_validate"
|
||||
},
|
||||
@ -253,7 +253,7 @@
|
||||
"operatorId": "operator-builtin-conditional-route",
|
||||
"operatorSlug": "conditional_route",
|
||||
"requiresGpu": false,
|
||||
"runtimeHandler": "condition_router",
|
||||
"runtimeHandler": "builtin_condition_router",
|
||||
"runtimeSource": "operator-repos/builtin/conditional_route/src/operator.py",
|
||||
"sourceRoot": "operator-repos/builtin/conditional_route"
|
||||
},
|
||||
@ -273,7 +273,7 @@
|
||||
"operatorId": "operator-builtin-csv-to-json",
|
||||
"operatorSlug": "csv_to_json",
|
||||
"requiresGpu": false,
|
||||
"runtimeHandler": "csv_to_json",
|
||||
"runtimeHandler": "builtin_csv_to_json",
|
||||
"runtimeSource": "operator-repos/builtin/csv_to_json/src/operator.py",
|
||||
"sourceRoot": "operator-repos/builtin/csv_to_json"
|
||||
},
|
||||
@ -295,7 +295,7 @@
|
||||
"operatorId": "operator-builtin-dataset-provenance-audit",
|
||||
"operatorSlug": "dataset_provenance_audit",
|
||||
"requiresGpu": false,
|
||||
"runtimeHandler": "dataset_provenance_audit",
|
||||
"runtimeHandler": "builtin_dataset_provenance_audit",
|
||||
"runtimeSource": "operator-repos/builtin/dataset_provenance_audit/src/operator.py",
|
||||
"sourceRoot": "operator-repos/builtin/dataset_provenance_audit"
|
||||
},
|
||||
@ -318,7 +318,7 @@
|
||||
"operatorId": "operator-builtin-dataset-schema-contract-validate",
|
||||
"operatorSlug": "dataset_schema_contract_validate",
|
||||
"requiresGpu": false,
|
||||
"runtimeHandler": "dataset_schema_contract_validate",
|
||||
"runtimeHandler": "builtin_dataset_schema_contract_validate",
|
||||
"runtimeSource": "operator-repos/builtin/dataset_schema_contract_validate/src/operator.py",
|
||||
"sourceRoot": "operator-repos/builtin/dataset_schema_contract_validate"
|
||||
},
|
||||
@ -339,7 +339,7 @@
|
||||
"operatorId": "operator-builtin-dataset-split-leakage-validate",
|
||||
"operatorSlug": "dataset_split_leakage_validate",
|
||||
"requiresGpu": false,
|
||||
"runtimeHandler": "dataset_split_leakage_validate",
|
||||
"runtimeHandler": "builtin_dataset_split_leakage_validate",
|
||||
"runtimeSource": "operator-repos/builtin/dataset_split_leakage_validate/src/operator.py",
|
||||
"sourceRoot": "operator-repos/builtin/dataset_split_leakage_validate"
|
||||
},
|
||||
@ -360,7 +360,7 @@
|
||||
"operatorId": "operator-builtin-dataset-split-manifest",
|
||||
"operatorSlug": "dataset_split_manifest",
|
||||
"requiresGpu": false,
|
||||
"runtimeHandler": "dataset_split_manifest",
|
||||
"runtimeHandler": "builtin_dataset_split_manifest",
|
||||
"runtimeSource": "operator-repos/builtin/dataset_split_manifest/src/operator.py",
|
||||
"sourceRoot": "operator-repos/builtin/dataset_split_manifest"
|
||||
},
|
||||
@ -383,7 +383,7 @@
|
||||
"operatorId": "operator-builtin-dexycb-dataset-validate",
|
||||
"operatorSlug": "dexycb_dataset_validate",
|
||||
"requiresGpu": false,
|
||||
"runtimeHandler": "dexycb_dataset_validate",
|
||||
"runtimeHandler": "builtin_dexycb_dataset_validate",
|
||||
"runtimeSource": "operator-repos/builtin/dexycb_dataset_validate/src/operator.py",
|
||||
"sourceRoot": "operator-repos/builtin/dexycb_dataset_validate"
|
||||
},
|
||||
@ -395,7 +395,7 @@
|
||||
"/app/backend/operator-runner/main.py"
|
||||
],
|
||||
"dependencyProfile": [
|
||||
"diffusion-policy-training-command",
|
||||
"real-stanford-diffusion-policy",
|
||||
"zarr-or-lerobot-trajectory-files",
|
||||
"gpu-a800"
|
||||
],
|
||||
@ -405,7 +405,7 @@
|
||||
"operatorId": "operator-builtin-diffusion-policy-train",
|
||||
"operatorSlug": "diffusion_policy_train",
|
||||
"requiresGpu": true,
|
||||
"runtimeHandler": "diffusion_policy_train",
|
||||
"runtimeHandler": "builtin_diffusion_policy_train",
|
||||
"runtimeSource": "operator-repos/builtin/diffusion_policy_train/src/operator.py",
|
||||
"sourceRoot": "operator-repos/builtin/diffusion_policy_train"
|
||||
},
|
||||
@ -425,7 +425,7 @@
|
||||
"operatorId": "operator-builtin-directory-scan",
|
||||
"operatorSlug": "directory_scan",
|
||||
"requiresGpu": false,
|
||||
"runtimeHandler": "directory_scan",
|
||||
"runtimeHandler": "builtin_directory_scan",
|
||||
"runtimeSource": "operator-repos/builtin/directory_scan/src/operator.py",
|
||||
"sourceRoot": "operator-repos/builtin/directory_scan"
|
||||
},
|
||||
@ -447,7 +447,7 @@
|
||||
"operatorId": "operator-builtin-droid-raw-episode-validate",
|
||||
"operatorSlug": "droid_raw_episode_validate",
|
||||
"requiresGpu": false,
|
||||
"runtimeHandler": "droid_raw_episode_validate",
|
||||
"runtimeHandler": "builtin_droid_raw_episode_validate",
|
||||
"runtimeSource": "operator-repos/builtin/droid_raw_episode_validate/src/operator.py",
|
||||
"sourceRoot": "operator-repos/builtin/droid_raw_episode_validate"
|
||||
},
|
||||
@ -468,7 +468,7 @@
|
||||
"operatorId": "operator-builtin-embodiment-metadata-validate",
|
||||
"operatorSlug": "embodiment_metadata_validate",
|
||||
"requiresGpu": false,
|
||||
"runtimeHandler": "embodiment_metadata_validate",
|
||||
"runtimeHandler": "builtin_embodiment_metadata_validate",
|
||||
"runtimeSource": "operator-repos/builtin/embodiment_metadata_validate/src/operator.py",
|
||||
"sourceRoot": "operator-repos/builtin/embodiment_metadata_validate"
|
||||
},
|
||||
@ -489,7 +489,7 @@
|
||||
"operatorId": "operator-builtin-episode-boundary-validate",
|
||||
"operatorSlug": "episode_boundary_validate",
|
||||
"requiresGpu": false,
|
||||
"runtimeHandler": "episode_boundary_validate",
|
||||
"runtimeHandler": "builtin_episode_boundary_validate",
|
||||
"runtimeSource": "operator-repos/builtin/episode_boundary_validate/src/operator.py",
|
||||
"sourceRoot": "operator-repos/builtin/episode_boundary_validate"
|
||||
},
|
||||
@ -512,7 +512,7 @@
|
||||
"operatorId": "operator-builtin-force-torque-sensor-validate",
|
||||
"operatorSlug": "force_torque_sensor_validate",
|
||||
"requiresGpu": false,
|
||||
"runtimeHandler": "force_torque_sensor_validate",
|
||||
"runtimeHandler": "builtin_force_torque_sensor_validate",
|
||||
"runtimeSource": "operator-repos/builtin/force_torque_sensor_validate/src/operator.py",
|
||||
"sourceRoot": "operator-repos/builtin/force_torque_sensor_validate"
|
||||
},
|
||||
@ -534,7 +534,7 @@
|
||||
"operatorId": "operator-builtin-furniturebench-pkl-demonstration-validate",
|
||||
"operatorSlug": "furniturebench_pkl_demonstration_validate",
|
||||
"requiresGpu": false,
|
||||
"runtimeHandler": "furniturebench_pkl_demonstration_validate",
|
||||
"runtimeHandler": "builtin_furniturebench_pkl_demonstration_validate",
|
||||
"runtimeSource": "operator-repos/builtin/furniturebench_pkl_demonstration_validate/src/operator.py",
|
||||
"sourceRoot": "operator-repos/builtin/furniturebench_pkl_demonstration_validate"
|
||||
},
|
||||
@ -558,7 +558,7 @@
|
||||
"operatorId": "operator-builtin-graspnet-dataset-validate",
|
||||
"operatorSlug": "graspnet_dataset_validate",
|
||||
"requiresGpu": false,
|
||||
"runtimeHandler": "graspnet_dataset_validate",
|
||||
"runtimeHandler": "builtin_graspnet_dataset_validate",
|
||||
"runtimeSource": "operator-repos/builtin/graspnet_dataset_validate/src/operator.py",
|
||||
"sourceRoot": "operator-repos/builtin/graspnet_dataset_validate"
|
||||
},
|
||||
@ -581,7 +581,7 @@
|
||||
"operatorId": "operator-builtin-hand-object-pose-validate",
|
||||
"operatorSlug": "hand_object_pose_validate",
|
||||
"requiresGpu": false,
|
||||
"runtimeHandler": "hand_object_pose_validate",
|
||||
"runtimeHandler": "builtin_hand_object_pose_validate",
|
||||
"runtimeSource": "operator-repos/builtin/hand_object_pose_validate/src/operator.py",
|
||||
"sourceRoot": "operator-repos/builtin/hand_object_pose_validate"
|
||||
},
|
||||
@ -602,7 +602,7 @@
|
||||
"operatorId": "operator-builtin-hdf5-demonstration-summary",
|
||||
"operatorSlug": "hdf5_demonstration_summary",
|
||||
"requiresGpu": false,
|
||||
"runtimeHandler": "hdf5_demonstration_summary",
|
||||
"runtimeHandler": "builtin_hdf5_demonstration_summary",
|
||||
"runtimeSource": "operator-repos/builtin/hdf5_demonstration_summary/src/operator.py",
|
||||
"sourceRoot": "operator-repos/builtin/hdf5_demonstration_summary"
|
||||
},
|
||||
@ -622,7 +622,7 @@
|
||||
"operatorId": "operator-builtin-hf-dataset-probe",
|
||||
"operatorSlug": "hf_dataset_probe",
|
||||
"requiresGpu": false,
|
||||
"runtimeHandler": "hf_dataset_probe",
|
||||
"runtimeHandler": "builtin_hf_dataset_probe",
|
||||
"runtimeSource": "operator-repos/builtin/hf_dataset_probe/src/operator.py",
|
||||
"sourceRoot": "operator-repos/builtin/hf_dataset_probe"
|
||||
},
|
||||
@ -645,7 +645,7 @@
|
||||
"operatorId": "operator-builtin-ho3d-dataset-validate",
|
||||
"operatorSlug": "ho3d_dataset_validate",
|
||||
"requiresGpu": false,
|
||||
"runtimeHandler": "ho3d_dataset_validate",
|
||||
"runtimeHandler": "builtin_ho3d_dataset_validate",
|
||||
"runtimeSource": "operator-repos/builtin/ho3d_dataset_validate/src/operator.py",
|
||||
"sourceRoot": "operator-repos/builtin/ho3d_dataset_validate"
|
||||
},
|
||||
@ -665,7 +665,7 @@
|
||||
"operatorId": "operator-builtin-human-review",
|
||||
"operatorSlug": "human_review",
|
||||
"requiresGpu": false,
|
||||
"runtimeHandler": "human_review",
|
||||
"runtimeHandler": "builtin_human_review",
|
||||
"runtimeSource": "operator-repos/builtin/human_review/src/operator.py",
|
||||
"sourceRoot": "operator-repos/builtin/human_review"
|
||||
},
|
||||
@ -687,7 +687,7 @@
|
||||
"operatorId": "operator-builtin-joint-limit-validate",
|
||||
"operatorSlug": "joint_limit_validate",
|
||||
"requiresGpu": false,
|
||||
"runtimeHandler": "joint_limit_validate",
|
||||
"runtimeHandler": "builtin_joint_limit_validate",
|
||||
"runtimeSource": "operator-repos/builtin/joint_limit_validate/src/operator.py",
|
||||
"sourceRoot": "operator-repos/builtin/joint_limit_validate"
|
||||
},
|
||||
@ -707,7 +707,7 @@
|
||||
"operatorId": "operator-builtin-json-field-extract",
|
||||
"operatorSlug": "json_field_extract",
|
||||
"requiresGpu": false,
|
||||
"runtimeHandler": "json_extract",
|
||||
"runtimeHandler": "builtin_json_extract",
|
||||
"runtimeSource": "operator-repos/builtin/json_field_extract/src/operator.py",
|
||||
"sourceRoot": "operator-repos/builtin/json_field_extract"
|
||||
},
|
||||
@ -727,7 +727,7 @@
|
||||
"operatorId": "operator-builtin-json-filter",
|
||||
"operatorSlug": "json_filter",
|
||||
"requiresGpu": false,
|
||||
"runtimeHandler": "json_filter",
|
||||
"runtimeHandler": "builtin_json_filter",
|
||||
"runtimeSource": "operator-repos/builtin/json_filter/src/operator.py",
|
||||
"sourceRoot": "operator-repos/builtin/json_filter"
|
||||
},
|
||||
@ -747,7 +747,7 @@
|
||||
"operatorId": "operator-builtin-json-map-rename",
|
||||
"operatorSlug": "json_map_rename",
|
||||
"requiresGpu": false,
|
||||
"runtimeHandler": "json_map",
|
||||
"runtimeHandler": "builtin_json_map",
|
||||
"runtimeSource": "operator-repos/builtin/json_map_rename/src/operator.py",
|
||||
"sourceRoot": "operator-repos/builtin/json_map_rename"
|
||||
},
|
||||
@ -767,7 +767,7 @@
|
||||
"operatorId": "operator-builtin-json-to-csv",
|
||||
"operatorSlug": "json_to_csv",
|
||||
"requiresGpu": false,
|
||||
"runtimeHandler": "json_to_csv",
|
||||
"runtimeHandler": "builtin_json_to_csv",
|
||||
"runtimeSource": "operator-repos/builtin/json_to_csv/src/operator.py",
|
||||
"sourceRoot": "operator-repos/builtin/json_to_csv"
|
||||
},
|
||||
@ -788,7 +788,7 @@
|
||||
"operatorId": "operator-builtin-language-instruction-validate",
|
||||
"operatorSlug": "language_instruction_validate",
|
||||
"requiresGpu": false,
|
||||
"runtimeHandler": "language_instruction_validate",
|
||||
"runtimeHandler": "builtin_language_instruction_validate",
|
||||
"runtimeSource": "operator-repos/builtin/language_instruction_validate/src/operator.py",
|
||||
"sourceRoot": "operator-repos/builtin/language_instruction_validate"
|
||||
},
|
||||
@ -810,7 +810,7 @@
|
||||
"operatorId": "operator-builtin-lerobot-dataset-validate",
|
||||
"operatorSlug": "lerobot_dataset_validate",
|
||||
"requiresGpu": false,
|
||||
"runtimeHandler": "lerobot_dataset_validate",
|
||||
"runtimeHandler": "builtin_lerobot_dataset_validate",
|
||||
"runtimeSource": "operator-repos/builtin/lerobot_dataset_validate/src/operator.py",
|
||||
"sourceRoot": "operator-repos/builtin/lerobot_dataset_validate"
|
||||
},
|
||||
@ -832,7 +832,7 @@
|
||||
"operatorId": "operator-builtin-lerobot-metadata-consistency-validate",
|
||||
"operatorSlug": "lerobot_metadata_consistency_validate",
|
||||
"requiresGpu": false,
|
||||
"runtimeHandler": "lerobot_metadata_consistency_validate",
|
||||
"runtimeHandler": "builtin_lerobot_metadata_consistency_validate",
|
||||
"runtimeSource": "operator-repos/builtin/lerobot_metadata_consistency_validate/src/operator.py",
|
||||
"sourceRoot": "operator-repos/builtin/lerobot_metadata_consistency_validate"
|
||||
},
|
||||
@ -874,7 +874,7 @@
|
||||
"operatorId": "operator-builtin-lerobot-v3-episode-index-validate",
|
||||
"operatorSlug": "lerobot_v3_episode_index_validate",
|
||||
"requiresGpu": false,
|
||||
"runtimeHandler": "lerobot_v3_episode_index_validate",
|
||||
"runtimeHandler": "builtin_lerobot_v3_episode_index_validate",
|
||||
"runtimeSource": "operator-repos/builtin/lerobot_v3_episode_index_validate/src/operator.py",
|
||||
"sourceRoot": "operator-repos/builtin/lerobot_v3_episode_index_validate"
|
||||
},
|
||||
@ -898,7 +898,7 @@
|
||||
"operatorId": "operator-builtin-lerobot-video-alignment-validate",
|
||||
"operatorSlug": "lerobot_video_alignment_validate",
|
||||
"requiresGpu": false,
|
||||
"runtimeHandler": "lerobot_video_alignment_validate",
|
||||
"runtimeHandler": "builtin_lerobot_video_alignment_validate",
|
||||
"runtimeSource": "operator-repos/builtin/lerobot_video_alignment_validate/src/operator.py",
|
||||
"sourceRoot": "operator-repos/builtin/lerobot_video_alignment_validate"
|
||||
},
|
||||
@ -921,7 +921,7 @@
|
||||
"operatorId": "operator-builtin-libero-hdf5-task-validate",
|
||||
"operatorSlug": "libero_hdf5_task_validate",
|
||||
"requiresGpu": false,
|
||||
"runtimeHandler": "libero_hdf5_task_validate",
|
||||
"runtimeHandler": "builtin_libero_hdf5_task_validate",
|
||||
"runtimeSource": "operator-repos/builtin/libero_hdf5_task_validate/src/operator.py",
|
||||
"sourceRoot": "operator-repos/builtin/libero_hdf5_task_validate"
|
||||
},
|
||||
@ -943,7 +943,7 @@
|
||||
"operatorId": "operator-builtin-maniskill-trajectory-validate",
|
||||
"operatorSlug": "maniskill_trajectory_validate",
|
||||
"requiresGpu": false,
|
||||
"runtimeHandler": "maniskill_trajectory_validate",
|
||||
"runtimeHandler": "builtin_maniskill_trajectory_validate",
|
||||
"runtimeSource": "operator-repos/builtin/maniskill_trajectory_validate/src/operator.py",
|
||||
"sourceRoot": "operator-repos/builtin/maniskill_trajectory_validate"
|
||||
},
|
||||
@ -964,7 +964,7 @@
|
||||
"operatorId": "operator-builtin-mcap-topic-summary",
|
||||
"operatorSlug": "mcap_topic_summary",
|
||||
"requiresGpu": false,
|
||||
"runtimeHandler": "mcap_topic_summary",
|
||||
"runtimeHandler": "builtin_mcap_topic_summary",
|
||||
"runtimeSource": "operator-repos/builtin/mcap_topic_summary/src/operator.py",
|
||||
"sourceRoot": "operator-repos/builtin/mcap_topic_summary"
|
||||
},
|
||||
@ -989,7 +989,7 @@
|
||||
"operatorId": "operator-builtin-media-reference-validate",
|
||||
"operatorSlug": "media_reference_validate",
|
||||
"requiresGpu": false,
|
||||
"runtimeHandler": "media_reference_validate",
|
||||
"runtimeHandler": "builtin_media_reference_validate",
|
||||
"runtimeSource": "operator-repos/builtin/media_reference_validate/src/operator.py",
|
||||
"sourceRoot": "operator-repos/builtin/media_reference_validate"
|
||||
},
|
||||
@ -1009,7 +1009,7 @@
|
||||
"operatorId": "operator-builtin-merge",
|
||||
"operatorSlug": "merge",
|
||||
"requiresGpu": false,
|
||||
"runtimeHandler": "merge",
|
||||
"runtimeHandler": "builtin_merge",
|
||||
"runtimeSource": "operator-repos/builtin/merge/src/operator.py",
|
||||
"sourceRoot": "operator-repos/builtin/merge"
|
||||
},
|
||||
@ -1030,7 +1030,7 @@
|
||||
"operatorId": "operator-builtin-mjcf-actuator-validate",
|
||||
"operatorSlug": "mjcf_actuator_validate",
|
||||
"requiresGpu": false,
|
||||
"runtimeHandler": "mjcf_actuator_validate",
|
||||
"runtimeHandler": "builtin_mjcf_actuator_validate",
|
||||
"runtimeSource": "operator-repos/builtin/mjcf_actuator_validate/src/operator.py",
|
||||
"sourceRoot": "operator-repos/builtin/mjcf_actuator_validate"
|
||||
},
|
||||
@ -1050,7 +1050,7 @@
|
||||
"operatorId": "operator-builtin-model-inference",
|
||||
"operatorSlug": "model_inference",
|
||||
"requiresGpu": false,
|
||||
"runtimeHandler": "model_inference",
|
||||
"runtimeHandler": "builtin_model_inference",
|
||||
"runtimeSource": "operator-repos/builtin/model_inference/src/operator.py",
|
||||
"sourceRoot": "operator-repos/builtin/model_inference"
|
||||
},
|
||||
@ -1070,7 +1070,7 @@
|
||||
"operatorId": "operator-builtin-mongodb-write",
|
||||
"operatorSlug": "mongodb_write",
|
||||
"requiresGpu": false,
|
||||
"runtimeHandler": "mongodb_write",
|
||||
"runtimeHandler": "builtin_mongodb_write",
|
||||
"runtimeSource": "operator-repos/builtin/mongodb_write/src/operator.py",
|
||||
"sourceRoot": "operator-repos/builtin/mongodb_write"
|
||||
},
|
||||
@ -1082,8 +1082,9 @@
|
||||
"/app/backend/operator-runner/main.py"
|
||||
],
|
||||
"dependencyProfile": [
|
||||
"openvla-training-command",
|
||||
"vla-sample-action-manifest",
|
||||
"openvla-lora-finetune",
|
||||
"rlds-vla-dataset",
|
||||
"peft",
|
||||
"gpu-a800"
|
||||
],
|
||||
"dockerfile": "operator-repos/builtin/openvla_finetune/Dockerfile",
|
||||
@ -1092,7 +1093,7 @@
|
||||
"operatorId": "operator-builtin-openvla-finetune",
|
||||
"operatorSlug": "openvla_finetune",
|
||||
"requiresGpu": true,
|
||||
"runtimeHandler": "openvla_finetune",
|
||||
"runtimeHandler": "builtin_openvla_finetune",
|
||||
"runtimeSource": "operator-repos/builtin/openvla_finetune/src/operator.py",
|
||||
"sourceRoot": "operator-repos/builtin/openvla_finetune"
|
||||
},
|
||||
@ -1104,8 +1105,8 @@
|
||||
"/app/backend/operator-runner/main.py"
|
||||
],
|
||||
"dependencyProfile": [
|
||||
"openvla-inference-command",
|
||||
"openvla-model-weights",
|
||||
"openvla-transformers-inference",
|
||||
"openvla-model-or-upstream-adapter",
|
||||
"gpu-a800"
|
||||
],
|
||||
"dockerfile": "operator-repos/builtin/openvla_inference/Dockerfile",
|
||||
@ -1114,7 +1115,7 @@
|
||||
"operatorId": "operator-builtin-openvla-inference",
|
||||
"operatorSlug": "openvla_inference",
|
||||
"requiresGpu": true,
|
||||
"runtimeHandler": "openvla_inference",
|
||||
"runtimeHandler": "builtin_openvla_inference",
|
||||
"runtimeSource": "operator-repos/builtin/openvla_inference/src/operator.py",
|
||||
"sourceRoot": "operator-repos/builtin/openvla_inference"
|
||||
},
|
||||
@ -1134,7 +1135,7 @@
|
||||
"operatorId": "operator-builtin-package",
|
||||
"operatorSlug": "package",
|
||||
"requiresGpu": false,
|
||||
"runtimeHandler": "result_package",
|
||||
"runtimeHandler": "builtin_result_package",
|
||||
"runtimeSource": "operator-repos/builtin/package/src/operator.py",
|
||||
"sourceRoot": "operator-repos/builtin/package"
|
||||
},
|
||||
@ -1155,7 +1156,7 @@
|
||||
"operatorId": "operator-builtin-parquet-table-summary",
|
||||
"operatorSlug": "parquet_table_summary",
|
||||
"requiresGpu": false,
|
||||
"runtimeHandler": "parquet_table_summary",
|
||||
"runtimeHandler": "builtin_parquet_table_summary",
|
||||
"runtimeSource": "operator-repos/builtin/parquet_table_summary/src/operator.py",
|
||||
"sourceRoot": "operator-repos/builtin/parquet_table_summary"
|
||||
},
|
||||
@ -1179,7 +1180,7 @@
|
||||
"operatorId": "operator-builtin-partnet-mobility-asset-validate",
|
||||
"operatorSlug": "partnet_mobility_asset_validate",
|
||||
"requiresGpu": false,
|
||||
"runtimeHandler": "partnet_mobility_asset_validate",
|
||||
"runtimeHandler": "builtin_partnet_mobility_asset_validate",
|
||||
"runtimeSource": "operator-repos/builtin/partnet_mobility_asset_validate/src/operator.py",
|
||||
"sourceRoot": "operator-repos/builtin/partnet_mobility_asset_validate"
|
||||
},
|
||||
@ -1200,7 +1201,7 @@
|
||||
"operatorId": "operator-builtin-pointcloud-summary",
|
||||
"operatorSlug": "pointcloud_summary",
|
||||
"requiresGpu": false,
|
||||
"runtimeHandler": "pointcloud_summary",
|
||||
"runtimeHandler": "builtin_pointcloud_summary",
|
||||
"runtimeSource": "operator-repos/builtin/pointcloud_summary/src/operator.py",
|
||||
"sourceRoot": "operator-repos/builtin/pointcloud_summary"
|
||||
},
|
||||
@ -1244,7 +1245,7 @@
|
||||
"operatorId": "operator-builtin-rgbd-frame-pair-validate",
|
||||
"operatorSlug": "rgbd_frame_pair_validate",
|
||||
"requiresGpu": false,
|
||||
"runtimeHandler": "rgbd_frame_pair_validate",
|
||||
"runtimeHandler": "builtin_rgbd_frame_pair_validate",
|
||||
"runtimeSource": "operator-repos/builtin/rgbd_frame_pair_validate/src/operator.py",
|
||||
"sourceRoot": "operator-repos/builtin/rgbd_frame_pair_validate"
|
||||
},
|
||||
@ -1267,7 +1268,7 @@
|
||||
"operatorId": "operator-builtin-rh20t-scene-validate",
|
||||
"operatorSlug": "rh20t_scene_validate",
|
||||
"requiresGpu": false,
|
||||
"runtimeHandler": "rh20t_scene_validate",
|
||||
"runtimeHandler": "builtin_rh20t_scene_validate",
|
||||
"runtimeSource": "operator-repos/builtin/rh20t_scene_validate/src/operator.py",
|
||||
"sourceRoot": "operator-repos/builtin/rh20t_scene_validate"
|
||||
},
|
||||
@ -1289,7 +1290,7 @@
|
||||
"operatorId": "operator-builtin-rlbench-dataset-validate",
|
||||
"operatorSlug": "rlbench_dataset_validate",
|
||||
"requiresGpu": false,
|
||||
"runtimeHandler": "rlbench_dataset_validate",
|
||||
"runtimeHandler": "builtin_rlbench_dataset_validate",
|
||||
"runtimeSource": "operator-repos/builtin/rlbench_dataset_validate/src/operator.py",
|
||||
"sourceRoot": "operator-repos/builtin/rlbench_dataset_validate"
|
||||
},
|
||||
@ -1309,7 +1310,7 @@
|
||||
"operatorId": "operator-builtin-rlds-episode-summary",
|
||||
"operatorSlug": "rlds_episode_summary",
|
||||
"requiresGpu": false,
|
||||
"runtimeHandler": "rlds_episode_summary",
|
||||
"runtimeHandler": "builtin_rlds_episode_summary",
|
||||
"runtimeSource": "operator-repos/builtin/rlds_episode_summary/src/operator.py",
|
||||
"sourceRoot": "operator-repos/builtin/rlds_episode_summary"
|
||||
},
|
||||
@ -1331,7 +1332,7 @@
|
||||
"operatorId": "operator-builtin-robocasa-hdf5-demonstration-validate",
|
||||
"operatorSlug": "robocasa_hdf5_demonstration_validate",
|
||||
"requiresGpu": false,
|
||||
"runtimeHandler": "robocasa_hdf5_demonstration_validate",
|
||||
"runtimeHandler": "builtin_robocasa_hdf5_demonstration_validate",
|
||||
"runtimeSource": "operator-repos/builtin/robocasa_hdf5_demonstration_validate/src/operator.py",
|
||||
"sourceRoot": "operator-repos/builtin/robocasa_hdf5_demonstration_validate"
|
||||
},
|
||||
@ -1353,7 +1354,7 @@
|
||||
"operatorId": "operator-builtin-robomimic-hdf5-validate",
|
||||
"operatorSlug": "robomimic_hdf5_validate",
|
||||
"requiresGpu": false,
|
||||
"runtimeHandler": "robomimic_hdf5_validate",
|
||||
"runtimeHandler": "builtin_robomimic_hdf5_validate",
|
||||
"runtimeSource": "operator-repos/builtin/robomimic_hdf5_validate/src/operator.py",
|
||||
"sourceRoot": "operator-repos/builtin/robomimic_hdf5_validate"
|
||||
},
|
||||
@ -1375,7 +1376,7 @@
|
||||
"operatorId": "operator-builtin-robomind-hdf5-quality-validate",
|
||||
"operatorSlug": "robomind_hdf5_quality_validate",
|
||||
"requiresGpu": false,
|
||||
"runtimeHandler": "robomind_hdf5_quality_validate",
|
||||
"runtimeHandler": "builtin_robomind_hdf5_quality_validate",
|
||||
"runtimeSource": "operator-repos/builtin/robomind_hdf5_quality_validate/src/operator.py",
|
||||
"sourceRoot": "operator-repos/builtin/robomind_hdf5_quality_validate"
|
||||
},
|
||||
@ -1397,7 +1398,7 @@
|
||||
"operatorId": "operator-builtin-roboset-hdf5-validate",
|
||||
"operatorSlug": "roboset_hdf5_validate",
|
||||
"requiresGpu": false,
|
||||
"runtimeHandler": "roboset_hdf5_validate",
|
||||
"runtimeHandler": "builtin_roboset_hdf5_validate",
|
||||
"runtimeSource": "operator-repos/builtin/roboset_hdf5_validate/src/operator.py",
|
||||
"sourceRoot": "operator-repos/builtin/roboset_hdf5_validate"
|
||||
},
|
||||
@ -1419,7 +1420,7 @@
|
||||
"operatorId": "operator-builtin-robot-model-asset-validate",
|
||||
"operatorSlug": "robot_model_asset_validate",
|
||||
"requiresGpu": false,
|
||||
"runtimeHandler": "robot_model_asset_validate",
|
||||
"runtimeHandler": "builtin_robot_model_asset_validate",
|
||||
"runtimeSource": "operator-repos/builtin/robot_model_asset_validate/src/operator.py",
|
||||
"sourceRoot": "operator-repos/builtin/robot_model_asset_validate"
|
||||
},
|
||||
@ -1441,7 +1442,7 @@
|
||||
"operatorId": "operator-builtin-roboturk-real-hdf5-validate",
|
||||
"operatorSlug": "roboturk_real_hdf5_validate",
|
||||
"requiresGpu": false,
|
||||
"runtimeHandler": "roboturk_real_hdf5_validate",
|
||||
"runtimeHandler": "builtin_roboturk_real_hdf5_validate",
|
||||
"runtimeSource": "operator-repos/builtin/roboturk_real_hdf5_validate/src/operator.py",
|
||||
"sourceRoot": "operator-repos/builtin/roboturk_real_hdf5_validate"
|
||||
},
|
||||
@ -1463,7 +1464,7 @@
|
||||
"operatorId": "operator-builtin-ros-joint-state-validate",
|
||||
"operatorSlug": "ros_joint_state_validate",
|
||||
"requiresGpu": false,
|
||||
"runtimeHandler": "ros_joint_state_validate",
|
||||
"runtimeHandler": "builtin_ros_joint_state_validate",
|
||||
"runtimeSource": "operator-repos/builtin/ros_joint_state_validate/src/operator.py",
|
||||
"sourceRoot": "operator-repos/builtin/ros_joint_state_validate"
|
||||
},
|
||||
@ -1507,7 +1508,7 @@
|
||||
"operatorId": "operator-builtin-rtx-action-schema-validate",
|
||||
"operatorSlug": "rtx_action_schema_validate",
|
||||
"requiresGpu": false,
|
||||
"runtimeHandler": "rtx_action_schema_validate",
|
||||
"runtimeHandler": "builtin_rtx_action_schema_validate",
|
||||
"runtimeSource": "operator-repos/builtin/rtx_action_schema_validate/src/operator.py",
|
||||
"sourceRoot": "operator-repos/builtin/rtx_action_schema_validate"
|
||||
},
|
||||
@ -1529,7 +1530,7 @@
|
||||
"operatorId": "operator-builtin-segmentation-mask-validate",
|
||||
"operatorSlug": "segmentation_mask_validate",
|
||||
"requiresGpu": false,
|
||||
"runtimeHandler": "segmentation_mask_validate",
|
||||
"runtimeHandler": "builtin_segmentation_mask_validate",
|
||||
"runtimeSource": "operator-repos/builtin/segmentation_mask_validate/src/operator.py",
|
||||
"sourceRoot": "operator-repos/builtin/segmentation_mask_validate"
|
||||
},
|
||||
@ -1549,7 +1550,7 @@
|
||||
"operatorId": "operator-builtin-sensor-timestamp-sync-validate",
|
||||
"operatorSlug": "sensor_timestamp_sync_validate",
|
||||
"requiresGpu": false,
|
||||
"runtimeHandler": "sensor_timestamp_sync_validate",
|
||||
"runtimeHandler": "builtin_sensor_timestamp_sync_validate",
|
||||
"runtimeSource": "operator-repos/builtin/sensor_timestamp_sync_validate/src/operator.py",
|
||||
"sourceRoot": "operator-repos/builtin/sensor_timestamp_sync_validate"
|
||||
},
|
||||
@ -1569,7 +1570,7 @@
|
||||
"operatorId": "operator-builtin-shell-command",
|
||||
"operatorSlug": "shell_command",
|
||||
"requiresGpu": false,
|
||||
"runtimeHandler": "shell_command",
|
||||
"runtimeHandler": "builtin_shell_command",
|
||||
"runtimeSource": "operator-repos/builtin/shell_command/src/operator.py",
|
||||
"sourceRoot": "operator-repos/builtin/shell_command"
|
||||
},
|
||||
@ -1610,7 +1611,7 @@
|
||||
"operatorId": "operator-builtin-template-render",
|
||||
"operatorSlug": "template_render",
|
||||
"requiresGpu": false,
|
||||
"runtimeHandler": "text_template",
|
||||
"runtimeHandler": "builtin_text_template",
|
||||
"runtimeSource": "operator-repos/builtin/template_render/src/operator.py",
|
||||
"sourceRoot": "operator-repos/builtin/template_render"
|
||||
},
|
||||
@ -1631,7 +1632,7 @@
|
||||
"operatorId": "operator-builtin-tf-transform-tree-validate",
|
||||
"operatorSlug": "tf_transform_tree_validate",
|
||||
"requiresGpu": false,
|
||||
"runtimeHandler": "tf_transform_tree_validate",
|
||||
"runtimeHandler": "builtin_tf_transform_tree_validate",
|
||||
"runtimeSource": "operator-repos/builtin/tf_transform_tree_validate/src/operator.py",
|
||||
"sourceRoot": "operator-repos/builtin/tf_transform_tree_validate"
|
||||
},
|
||||
@ -1652,7 +1653,7 @@
|
||||
"operatorId": "operator-builtin-tfrecord-structural-validate",
|
||||
"operatorSlug": "tfrecord_structural_validate",
|
||||
"requiresGpu": false,
|
||||
"runtimeHandler": "tfrecord_structural_validate",
|
||||
"runtimeHandler": "builtin_tfrecord_structural_validate",
|
||||
"runtimeSource": "operator-repos/builtin/tfrecord_structural_validate/src/operator.py",
|
||||
"sourceRoot": "operator-repos/builtin/tfrecord_structural_validate"
|
||||
},
|
||||
@ -1673,7 +1674,7 @@
|
||||
"operatorId": "operator-builtin-trajectory-integrity-validate",
|
||||
"operatorSlug": "trajectory_integrity_validate",
|
||||
"requiresGpu": false,
|
||||
"runtimeHandler": "trajectory_integrity_validate",
|
||||
"runtimeHandler": "builtin_trajectory_integrity_validate",
|
||||
"runtimeSource": "operator-repos/builtin/trajectory_integrity_validate/src/operator.py",
|
||||
"sourceRoot": "operator-repos/builtin/trajectory_integrity_validate"
|
||||
},
|
||||
@ -1695,7 +1696,7 @@
|
||||
"operatorId": "operator-builtin-umi-zarr-dataset-validate",
|
||||
"operatorSlug": "umi_zarr_dataset_validate",
|
||||
"requiresGpu": false,
|
||||
"runtimeHandler": "umi_zarr_dataset_validate",
|
||||
"runtimeHandler": "builtin_umi_zarr_dataset_validate",
|
||||
"runtimeSource": "operator-repos/builtin/umi_zarr_dataset_validate/src/operator.py",
|
||||
"sourceRoot": "operator-repos/builtin/umi_zarr_dataset_validate"
|
||||
},
|
||||
@ -1716,7 +1717,7 @@
|
||||
"operatorId": "operator-builtin-upload",
|
||||
"operatorSlug": "upload",
|
||||
"requiresGpu": false,
|
||||
"runtimeHandler": "upload",
|
||||
"runtimeHandler": "builtin_upload",
|
||||
"runtimeSource": "operator-repos/builtin/upload/src/operator.py",
|
||||
"sourceRoot": "operator-repos/builtin/upload"
|
||||
},
|
||||
@ -1737,7 +1738,7 @@
|
||||
"operatorId": "operator-builtin-video-annotate",
|
||||
"operatorSlug": "video_annotate",
|
||||
"requiresGpu": false,
|
||||
"runtimeHandler": "video_annotation",
|
||||
"runtimeHandler": "builtin_video_annotation",
|
||||
"runtimeSource": "operator-repos/builtin/video_annotate/src/operator.py",
|
||||
"sourceRoot": "operator-repos/builtin/video_annotate"
|
||||
},
|
||||
@ -1757,7 +1758,7 @@
|
||||
"operatorId": "operator-builtin-video-filter",
|
||||
"operatorSlug": "video_filter",
|
||||
"requiresGpu": false,
|
||||
"runtimeHandler": "dataset_filter",
|
||||
"runtimeHandler": "builtin_dataset_filter",
|
||||
"runtimeSource": "operator-repos/builtin/video_filter/src/operator.py",
|
||||
"sourceRoot": "operator-repos/builtin/video_filter"
|
||||
},
|
||||
@ -1778,7 +1779,7 @@
|
||||
"operatorId": "operator-builtin-video-quality",
|
||||
"operatorSlug": "video_quality",
|
||||
"requiresGpu": false,
|
||||
"runtimeHandler": "video_quality",
|
||||
"runtimeHandler": "builtin_video_quality",
|
||||
"runtimeSource": "operator-repos/builtin/video_quality/src/operator.py",
|
||||
"sourceRoot": "operator-repos/builtin/video_quality"
|
||||
},
|
||||
@ -1799,7 +1800,7 @@
|
||||
"operatorId": "operator-builtin-video-slice",
|
||||
"operatorSlug": "video_slice",
|
||||
"requiresGpu": false,
|
||||
"runtimeHandler": "video_slicing",
|
||||
"runtimeHandler": "builtin_video_slicing",
|
||||
"runtimeSource": "operator-repos/builtin/video_slice/src/operator.py",
|
||||
"sourceRoot": "operator-repos/builtin/video_slice"
|
||||
},
|
||||
@ -1823,7 +1824,7 @@
|
||||
"operatorId": "operator-builtin-video-target-clip",
|
||||
"operatorSlug": "video_target_clip",
|
||||
"requiresGpu": false,
|
||||
"runtimeHandler": "video_target_clip",
|
||||
"runtimeHandler": "builtin_video_target_clip",
|
||||
"runtimeSource": "operator-repos/builtin/video_target_clip/src/operator.py",
|
||||
"sourceRoot": "operator-repos/builtin/video_target_clip"
|
||||
},
|
||||
@ -1929,7 +1930,7 @@
|
||||
"operatorId": "operator-builtin-webdataset-shard-summary",
|
||||
"operatorSlug": "webdataset_shard_summary",
|
||||
"requiresGpu": false,
|
||||
"runtimeHandler": "webdataset_shard_summary",
|
||||
"runtimeHandler": "builtin_webdataset_shard_summary",
|
||||
"runtimeSource": "operator-repos/builtin/webdataset_shard_summary/src/operator.py",
|
||||
"sourceRoot": "operator-repos/builtin/webdataset_shard_summary"
|
||||
},
|
||||
@ -1949,7 +1950,7 @@
|
||||
"operatorId": "operator-builtin-xplatform-dataset-index",
|
||||
"operatorSlug": "xplatform_dataset_index",
|
||||
"requiresGpu": false,
|
||||
"runtimeHandler": "xplatform_index",
|
||||
"runtimeHandler": "builtin_xplatform_index",
|
||||
"runtimeSource": "operator-repos/builtin/xplatform_dataset_index/src/operator.py",
|
||||
"sourceRoot": "operator-repos/builtin/xplatform_dataset_index"
|
||||
},
|
||||
@ -1969,7 +1970,7 @@
|
||||
"operatorId": "operator-builtin-xplatform-dataset-validate",
|
||||
"operatorSlug": "xplatform_dataset_validate",
|
||||
"requiresGpu": false,
|
||||
"runtimeHandler": "collection_validate",
|
||||
"runtimeHandler": "builtin_collection_validate",
|
||||
"runtimeSource": "operator-repos/builtin/xplatform_dataset_validate/src/operator.py",
|
||||
"sourceRoot": "operator-repos/builtin/xplatform_dataset_validate"
|
||||
},
|
||||
@ -1991,7 +1992,7 @@
|
||||
"operatorId": "operator-builtin-yolo-detection-validate",
|
||||
"operatorSlug": "yolo_detection_validate",
|
||||
"requiresGpu": false,
|
||||
"runtimeHandler": "yolo_detection_validate",
|
||||
"runtimeHandler": "builtin_yolo_detection_validate",
|
||||
"runtimeSource": "operator-repos/builtin/yolo_detection_validate/src/operator.py",
|
||||
"sourceRoot": "operator-repos/builtin/yolo_detection_validate"
|
||||
},
|
||||
@ -2013,7 +2014,7 @@
|
||||
"operatorId": "operator-builtin-yolo-embodied-detection-train",
|
||||
"operatorSlug": "yolo_embodied_detection_train",
|
||||
"requiresGpu": true,
|
||||
"runtimeHandler": "yolo_embodied_detection_train",
|
||||
"runtimeHandler": "builtin_yolo_embodied_detection_train",
|
||||
"runtimeSource": "operator-repos/builtin/yolo_embodied_detection_train/src/operator.py",
|
||||
"sourceRoot": "operator-repos/builtin/yolo_embodied_detection_train"
|
||||
},
|
||||
@ -2038,7 +2039,7 @@
|
||||
"operatorId": "operator-builtin-yolo-video-target-clip",
|
||||
"operatorSlug": "yolo_video_target_clip",
|
||||
"requiresGpu": true,
|
||||
"runtimeHandler": "yolo_video_target_clip",
|
||||
"runtimeHandler": "builtin_yolo_video_target_clip",
|
||||
"runtimeSource": "operator-repos/builtin/yolo_video_target_clip/src/operator.py",
|
||||
"sourceRoot": "operator-repos/builtin/yolo_video_target_clip"
|
||||
},
|
||||
@ -2059,7 +2060,7 @@
|
||||
"operatorId": "operator-builtin-zarr-trajectory-summary",
|
||||
"operatorSlug": "zarr_trajectory_summary",
|
||||
"requiresGpu": false,
|
||||
"runtimeHandler": "zarr_trajectory_summary",
|
||||
"runtimeHandler": "builtin_zarr_trajectory_summary",
|
||||
"runtimeSource": "operator-repos/builtin/zarr_trajectory_summary/src/operator.py",
|
||||
"sourceRoot": "operator-repos/builtin/zarr_trajectory_summary"
|
||||
}
|
||||
|
||||
@ -9,7 +9,7 @@ ENV PYTHONUNBUFFERED=1 \
|
||||
DROBOTICFLOW_OPERATOR_SLUG=act_policy_train \
|
||||
DROBOTICFLOW_OPERATOR_SOURCE=/app/operator-repos/builtin/act_policy_train/src/operator.py \
|
||||
DROBOTICFLOW_OPERATOR_REPOSITORY=/app/operator-repos/builtin/act_policy_train \
|
||||
DROBOTICFLOW_OPERATOR_HANDLER=act_policy_train \
|
||||
DROBOTICFLOW_OPERATOR_HANDLER=builtin_act_policy_train \
|
||||
USER=droboticflow \
|
||||
LOGNAME=droboticflow \
|
||||
HOME=/tmp/droboticflow-home
|
||||
|
||||
@ -42,7 +42,7 @@
|
||||
"requiresManifest": true
|
||||
},
|
||||
"entrypoint": "/app/backend/operator-runner/main.py",
|
||||
"handler": "act_policy_train",
|
||||
"handler": "builtin_act_policy_train",
|
||||
"imagePolicy": {
|
||||
"allowsSharedBaseLayer": true,
|
||||
"forbidsSharedOperatorRunnerFinalImage": true,
|
||||
@ -62,15 +62,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",
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
"requiresManifest": true
|
||||
},
|
||||
"entrypoint": "/app/backend/operator-runner/main.py",
|
||||
"handler": "act_policy_train",
|
||||
"handler": "builtin_act_policy_train",
|
||||
"imagePolicy": {
|
||||
"allowsSharedBaseLayer": true,
|
||||
"forbidsSharedOperatorRunnerFinalImage": true,
|
||||
@ -32,8 +32,8 @@
|
||||
"requiresGpu": true
|
||||
},
|
||||
"runtimeDependencies": [
|
||||
"real-act-training-command",
|
||||
"trajectory-demonstration-files",
|
||||
"huggingface-lerobot-act",
|
||||
"lerobot-dataset-or-local-root",
|
||||
"gpu-a800"
|
||||
],
|
||||
"runtimeSource": "src/operator.py",
|
||||
|
||||
@ -2,7 +2,7 @@ from __future__ import annotations
|
||||
|
||||
from typing import Any
|
||||
|
||||
from backend.operators.builtin.structured_model_operator import HelperMap, run_policy_training
|
||||
from backend.operators.builtin.structured_model_operator import HelperMap, run_lerobot_act_training
|
||||
|
||||
|
||||
def run(
|
||||
@ -13,13 +13,4 @@ def run(
|
||||
inputs: list[dict[str, Any]],
|
||||
helpers: HelperMap,
|
||||
) -> list[dict[str, Any]]:
|
||||
return run_policy_training(
|
||||
run_id,
|
||||
node_id,
|
||||
output_dir,
|
||||
node_data,
|
||||
inputs,
|
||||
helpers,
|
||||
operator_name="ACT 策略训练",
|
||||
model_family="ACT",
|
||||
)
|
||||
return run_lerobot_act_training(run_id, node_id, output_dir, node_data, inputs, helpers)
|
||||
|
||||
@ -6,7 +6,7 @@ ENV DROBOTICFLOW_OPERATOR_ID=operator-builtin-action-state-quality-validate \
|
||||
DROBOTICFLOW_OPERATOR_SLUG=action_state_quality_validate \
|
||||
DROBOTICFLOW_OPERATOR_SOURCE=/app/operator-repos/builtin/action_state_quality_validate/src/operator.py \
|
||||
DROBOTICFLOW_OPERATOR_REPOSITORY=/app/operator-repos/builtin/action_state_quality_validate \
|
||||
DROBOTICFLOW_OPERATOR_HANDLER=action_state_quality_validate
|
||||
DROBOTICFLOW_OPERATOR_HANDLER=builtin_action_state_quality_validate
|
||||
|
||||
COPY operator-repos/builtin/action_state_quality_validate ./operator-repos/builtin/action_state_quality_validate
|
||||
ENTRYPOINT ["python", "/app/backend/operator-runner/main.py"]
|
||||
|
||||
@ -42,7 +42,7 @@
|
||||
"requiresManifest": true
|
||||
},
|
||||
"entrypoint": "/app/backend/operator-runner/main.py",
|
||||
"handler": "action_state_quality_validate",
|
||||
"handler": "builtin_action_state_quality_validate",
|
||||
"imagePolicy": {
|
||||
"allowsSharedBaseLayer": true,
|
||||
"forbidsSharedOperatorRunnerFinalImage": true,
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
"requiresManifest": true
|
||||
},
|
||||
"entrypoint": "/app/backend/operator-runner/main.py",
|
||||
"handler": "action_state_quality_validate",
|
||||
"handler": "builtin_action_state_quality_validate",
|
||||
"imagePolicy": {
|
||||
"allowsSharedBaseLayer": true,
|
||||
"forbidsSharedOperatorRunnerFinalImage": true,
|
||||
|
||||
@ -6,7 +6,7 @@ ENV DROBOTICFLOW_OPERATOR_ID=operator-builtin-agibot-world2026-validate \
|
||||
DROBOTICFLOW_OPERATOR_SLUG=agibot_world2026_validate \
|
||||
DROBOTICFLOW_OPERATOR_SOURCE=/app/operator-repos/builtin/agibot_world2026_validate/src/operator.py \
|
||||
DROBOTICFLOW_OPERATOR_REPOSITORY=/app/operator-repos/builtin/agibot_world2026_validate \
|
||||
DROBOTICFLOW_OPERATOR_HANDLER=agibot_world2026_validate
|
||||
DROBOTICFLOW_OPERATOR_HANDLER=builtin_agibot_world2026_validate
|
||||
|
||||
COPY operator-repos/builtin/agibot_world2026_validate ./operator-repos/builtin/agibot_world2026_validate
|
||||
ENTRYPOINT ["python", "/app/backend/operator-runner/main.py"]
|
||||
|
||||
@ -42,7 +42,7 @@
|
||||
"requiresManifest": true
|
||||
},
|
||||
"entrypoint": "/app/backend/operator-runner/main.py",
|
||||
"handler": "agibot_world2026_validate",
|
||||
"handler": "builtin_agibot_world2026_validate",
|
||||
"imagePolicy": {
|
||||
"allowsSharedBaseLayer": true,
|
||||
"forbidsSharedOperatorRunnerFinalImage": true,
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
"requiresManifest": true
|
||||
},
|
||||
"entrypoint": "/app/backend/operator-runner/main.py",
|
||||
"handler": "agibot_world2026_validate",
|
||||
"handler": "builtin_agibot_world2026_validate",
|
||||
"imagePolicy": {
|
||||
"allowsSharedBaseLayer": true,
|
||||
"forbidsSharedOperatorRunnerFinalImage": true,
|
||||
|
||||
@ -6,7 +6,7 @@ ENV DROBOTICFLOW_OPERATOR_ID=operator-builtin-aloha-hdf5-validate \
|
||||
DROBOTICFLOW_OPERATOR_SLUG=aloha_hdf5_validate \
|
||||
DROBOTICFLOW_OPERATOR_SOURCE=/app/operator-repos/builtin/aloha_hdf5_validate/src/operator.py \
|
||||
DROBOTICFLOW_OPERATOR_REPOSITORY=/app/operator-repos/builtin/aloha_hdf5_validate \
|
||||
DROBOTICFLOW_OPERATOR_HANDLER=aloha_hdf5_validate
|
||||
DROBOTICFLOW_OPERATOR_HANDLER=builtin_aloha_hdf5_validate
|
||||
|
||||
COPY operator-repos/builtin/aloha_hdf5_validate ./operator-repos/builtin/aloha_hdf5_validate
|
||||
ENTRYPOINT ["python", "/app/backend/operator-runner/main.py"]
|
||||
|
||||
@ -42,7 +42,7 @@
|
||||
"requiresManifest": true
|
||||
},
|
||||
"entrypoint": "/app/backend/operator-runner/main.py",
|
||||
"handler": "aloha_hdf5_validate",
|
||||
"handler": "builtin_aloha_hdf5_validate",
|
||||
"imagePolicy": {
|
||||
"allowsSharedBaseLayer": true,
|
||||
"forbidsSharedOperatorRunnerFinalImage": true,
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
"requiresManifest": true
|
||||
},
|
||||
"entrypoint": "/app/backend/operator-runner/main.py",
|
||||
"handler": "aloha_hdf5_validate",
|
||||
"handler": "builtin_aloha_hdf5_validate",
|
||||
"imagePolicy": {
|
||||
"allowsSharedBaseLayer": true,
|
||||
"forbidsSharedOperatorRunnerFinalImage": true,
|
||||
|
||||
@ -6,7 +6,7 @@ ENV DROBOTICFLOW_OPERATOR_ID=operator-builtin-audit-sample \
|
||||
DROBOTICFLOW_OPERATOR_SLUG=audit_sample \
|
||||
DROBOTICFLOW_OPERATOR_SOURCE=/app/operator-repos/builtin/audit_sample/src/operator.py \
|
||||
DROBOTICFLOW_OPERATOR_REPOSITORY=/app/operator-repos/builtin/audit_sample \
|
||||
DROBOTICFLOW_OPERATOR_HANDLER=audit_sampling
|
||||
DROBOTICFLOW_OPERATOR_HANDLER=builtin_audit_sampling
|
||||
|
||||
COPY operator-repos/builtin/audit_sample ./operator-repos/builtin/audit_sample
|
||||
ENTRYPOINT ["python", "/app/backend/operator-runner/main.py"]
|
||||
|
||||
@ -42,7 +42,7 @@
|
||||
"requiresManifest": true
|
||||
},
|
||||
"entrypoint": "/app/backend/operator-runner/main.py",
|
||||
"handler": "audit_sampling",
|
||||
"handler": "builtin_audit_sampling",
|
||||
"imagePolicy": {
|
||||
"allowsSharedBaseLayer": true,
|
||||
"forbidsSharedOperatorRunnerFinalImage": true,
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
"requiresManifest": true
|
||||
},
|
||||
"entrypoint": "/app/backend/operator-runner/main.py",
|
||||
"handler": "audit_sampling",
|
||||
"handler": "builtin_audit_sampling",
|
||||
"imagePolicy": {
|
||||
"allowsSharedBaseLayer": true,
|
||||
"forbidsSharedOperatorRunnerFinalImage": true,
|
||||
|
||||
@ -6,7 +6,7 @@ ENV DROBOTICFLOW_OPERATOR_ID=operator-builtin-bop-dataset-validate \
|
||||
DROBOTICFLOW_OPERATOR_SLUG=bop_dataset_validate \
|
||||
DROBOTICFLOW_OPERATOR_SOURCE=/app/operator-repos/builtin/bop_dataset_validate/src/operator.py \
|
||||
DROBOTICFLOW_OPERATOR_REPOSITORY=/app/operator-repos/builtin/bop_dataset_validate \
|
||||
DROBOTICFLOW_OPERATOR_HANDLER=bop_dataset_validate
|
||||
DROBOTICFLOW_OPERATOR_HANDLER=builtin_bop_dataset_validate
|
||||
|
||||
COPY operator-repos/builtin/bop_dataset_validate ./operator-repos/builtin/bop_dataset_validate
|
||||
ENTRYPOINT ["python", "/app/backend/operator-runner/main.py"]
|
||||
|
||||
@ -42,7 +42,7 @@
|
||||
"requiresManifest": true
|
||||
},
|
||||
"entrypoint": "/app/backend/operator-runner/main.py",
|
||||
"handler": "bop_dataset_validate",
|
||||
"handler": "builtin_bop_dataset_validate",
|
||||
"imagePolicy": {
|
||||
"allowsSharedBaseLayer": true,
|
||||
"forbidsSharedOperatorRunnerFinalImage": true,
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
"requiresManifest": true
|
||||
},
|
||||
"entrypoint": "/app/backend/operator-runner/main.py",
|
||||
"handler": "bop_dataset_validate",
|
||||
"handler": "builtin_bop_dataset_validate",
|
||||
"imagePolicy": {
|
||||
"allowsSharedBaseLayer": true,
|
||||
"forbidsSharedOperatorRunnerFinalImage": true,
|
||||
|
||||
@ -6,7 +6,7 @@ ENV DROBOTICFLOW_OPERATOR_ID=operator-builtin-bos-incremental-scan \
|
||||
DROBOTICFLOW_OPERATOR_SLUG=bos_incremental_scan \
|
||||
DROBOTICFLOW_OPERATOR_SOURCE=/app/operator-repos/builtin/bos_incremental_scan/src/operator.py \
|
||||
DROBOTICFLOW_OPERATOR_REPOSITORY=/app/operator-repos/builtin/bos_incremental_scan \
|
||||
DROBOTICFLOW_OPERATOR_HANDLER=source
|
||||
DROBOTICFLOW_OPERATOR_HANDLER=builtin_source
|
||||
|
||||
COPY operator-repos/builtin/bos_incremental_scan ./operator-repos/builtin/bos_incremental_scan
|
||||
ENTRYPOINT ["python", "/app/backend/operator-runner/main.py"]
|
||||
|
||||
@ -42,7 +42,7 @@
|
||||
"requiresManifest": true
|
||||
},
|
||||
"entrypoint": "/app/backend/operator-runner/main.py",
|
||||
"handler": "source",
|
||||
"handler": "builtin_source",
|
||||
"imagePolicy": {
|
||||
"allowsSharedBaseLayer": true,
|
||||
"forbidsSharedOperatorRunnerFinalImage": true,
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
"requiresManifest": true
|
||||
},
|
||||
"entrypoint": "/app/backend/operator-runner/main.py",
|
||||
"handler": "source",
|
||||
"handler": "builtin_source",
|
||||
"imagePolicy": {
|
||||
"allowsSharedBaseLayer": true,
|
||||
"forbidsSharedOperatorRunnerFinalImage": true,
|
||||
|
||||
@ -6,7 +6,7 @@ ENV DROBOTICFLOW_OPERATOR_ID=operator-builtin-bridgedata-tfds-manifest-validate
|
||||
DROBOTICFLOW_OPERATOR_SLUG=bridgedata_tfds_manifest_validate \
|
||||
DROBOTICFLOW_OPERATOR_SOURCE=/app/operator-repos/builtin/bridgedata_tfds_manifest_validate/src/operator.py \
|
||||
DROBOTICFLOW_OPERATOR_REPOSITORY=/app/operator-repos/builtin/bridgedata_tfds_manifest_validate \
|
||||
DROBOTICFLOW_OPERATOR_HANDLER=bridgedata_tfds_manifest_validate
|
||||
DROBOTICFLOW_OPERATOR_HANDLER=builtin_bridgedata_tfds_manifest_validate
|
||||
|
||||
COPY operator-repos/builtin/bridgedata_tfds_manifest_validate ./operator-repos/builtin/bridgedata_tfds_manifest_validate
|
||||
ENTRYPOINT ["python", "/app/backend/operator-runner/main.py"]
|
||||
|
||||
@ -42,7 +42,7 @@
|
||||
"requiresManifest": true
|
||||
},
|
||||
"entrypoint": "/app/backend/operator-runner/main.py",
|
||||
"handler": "bridgedata_tfds_manifest_validate",
|
||||
"handler": "builtin_bridgedata_tfds_manifest_validate",
|
||||
"imagePolicy": {
|
||||
"allowsSharedBaseLayer": true,
|
||||
"forbidsSharedOperatorRunnerFinalImage": true,
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
"requiresManifest": true
|
||||
},
|
||||
"entrypoint": "/app/backend/operator-runner/main.py",
|
||||
"handler": "bridgedata_tfds_manifest_validate",
|
||||
"handler": "builtin_bridgedata_tfds_manifest_validate",
|
||||
"imagePolicy": {
|
||||
"allowsSharedBaseLayer": true,
|
||||
"forbidsSharedOperatorRunnerFinalImage": true,
|
||||
|
||||
@ -6,7 +6,7 @@ ENV DROBOTICFLOW_OPERATOR_ID=operator-builtin-calvin-episode-validate \
|
||||
DROBOTICFLOW_OPERATOR_SLUG=calvin_episode_validate \
|
||||
DROBOTICFLOW_OPERATOR_SOURCE=/app/operator-repos/builtin/calvin_episode_validate/src/operator.py \
|
||||
DROBOTICFLOW_OPERATOR_REPOSITORY=/app/operator-repos/builtin/calvin_episode_validate \
|
||||
DROBOTICFLOW_OPERATOR_HANDLER=calvin_episode_validate
|
||||
DROBOTICFLOW_OPERATOR_HANDLER=builtin_calvin_episode_validate
|
||||
|
||||
COPY operator-repos/builtin/calvin_episode_validate ./operator-repos/builtin/calvin_episode_validate
|
||||
ENTRYPOINT ["python", "/app/backend/operator-runner/main.py"]
|
||||
|
||||
@ -42,7 +42,7 @@
|
||||
"requiresManifest": true
|
||||
},
|
||||
"entrypoint": "/app/backend/operator-runner/main.py",
|
||||
"handler": "calvin_episode_validate",
|
||||
"handler": "builtin_calvin_episode_validate",
|
||||
"imagePolicy": {
|
||||
"allowsSharedBaseLayer": true,
|
||||
"forbidsSharedOperatorRunnerFinalImage": true,
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
"requiresManifest": true
|
||||
},
|
||||
"entrypoint": "/app/backend/operator-runner/main.py",
|
||||
"handler": "calvin_episode_validate",
|
||||
"handler": "builtin_calvin_episode_validate",
|
||||
"imagePolicy": {
|
||||
"allowsSharedBaseLayer": true,
|
||||
"forbidsSharedOperatorRunnerFinalImage": true,
|
||||
|
||||
@ -6,7 +6,7 @@ ENV DROBOTICFLOW_OPERATOR_ID=operator-builtin-camera-calibration-validate \
|
||||
DROBOTICFLOW_OPERATOR_SLUG=camera_calibration_validate \
|
||||
DROBOTICFLOW_OPERATOR_SOURCE=/app/operator-repos/builtin/camera_calibration_validate/src/operator.py \
|
||||
DROBOTICFLOW_OPERATOR_REPOSITORY=/app/operator-repos/builtin/camera_calibration_validate \
|
||||
DROBOTICFLOW_OPERATOR_HANDLER=camera_calibration_validate
|
||||
DROBOTICFLOW_OPERATOR_HANDLER=builtin_camera_calibration_validate
|
||||
|
||||
COPY operator-repos/builtin/camera_calibration_validate ./operator-repos/builtin/camera_calibration_validate
|
||||
ENTRYPOINT ["python", "/app/backend/operator-runner/main.py"]
|
||||
|
||||
@ -42,7 +42,7 @@
|
||||
"requiresManifest": true
|
||||
},
|
||||
"entrypoint": "/app/backend/operator-runner/main.py",
|
||||
"handler": "camera_calibration_validate",
|
||||
"handler": "builtin_camera_calibration_validate",
|
||||
"imagePolicy": {
|
||||
"allowsSharedBaseLayer": true,
|
||||
"forbidsSharedOperatorRunnerFinalImage": true,
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
"requiresManifest": true
|
||||
},
|
||||
"entrypoint": "/app/backend/operator-runner/main.py",
|
||||
"handler": "camera_calibration_validate",
|
||||
"handler": "builtin_camera_calibration_validate",
|
||||
"imagePolicy": {
|
||||
"allowsSharedBaseLayer": true,
|
||||
"forbidsSharedOperatorRunnerFinalImage": true,
|
||||
|
||||
@ -6,7 +6,7 @@ ENV DROBOTICFLOW_OPERATOR_ID=operator-builtin-coco-annotation-validate \
|
||||
DROBOTICFLOW_OPERATOR_SLUG=coco_annotation_validate \
|
||||
DROBOTICFLOW_OPERATOR_SOURCE=/app/operator-repos/builtin/coco_annotation_validate/src/operator.py \
|
||||
DROBOTICFLOW_OPERATOR_REPOSITORY=/app/operator-repos/builtin/coco_annotation_validate \
|
||||
DROBOTICFLOW_OPERATOR_HANDLER=coco_annotation_validate
|
||||
DROBOTICFLOW_OPERATOR_HANDLER=builtin_coco_annotation_validate
|
||||
|
||||
COPY operator-repos/builtin/coco_annotation_validate ./operator-repos/builtin/coco_annotation_validate
|
||||
ENTRYPOINT ["python", "/app/backend/operator-runner/main.py"]
|
||||
|
||||
@ -42,7 +42,7 @@
|
||||
"requiresManifest": true
|
||||
},
|
||||
"entrypoint": "/app/backend/operator-runner/main.py",
|
||||
"handler": "coco_annotation_validate",
|
||||
"handler": "builtin_coco_annotation_validate",
|
||||
"imagePolicy": {
|
||||
"allowsSharedBaseLayer": true,
|
||||
"forbidsSharedOperatorRunnerFinalImage": true,
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
"requiresManifest": true
|
||||
},
|
||||
"entrypoint": "/app/backend/operator-runner/main.py",
|
||||
"handler": "coco_annotation_validate",
|
||||
"handler": "builtin_coco_annotation_validate",
|
||||
"imagePolicy": {
|
||||
"allowsSharedBaseLayer": true,
|
||||
"forbidsSharedOperatorRunnerFinalImage": true,
|
||||
|
||||
@ -6,7 +6,7 @@ ENV DROBOTICFLOW_OPERATOR_ID=operator-builtin-conditional-route \
|
||||
DROBOTICFLOW_OPERATOR_SLUG=conditional_route \
|
||||
DROBOTICFLOW_OPERATOR_SOURCE=/app/operator-repos/builtin/conditional_route/src/operator.py \
|
||||
DROBOTICFLOW_OPERATOR_REPOSITORY=/app/operator-repos/builtin/conditional_route \
|
||||
DROBOTICFLOW_OPERATOR_HANDLER=condition_router
|
||||
DROBOTICFLOW_OPERATOR_HANDLER=builtin_condition_router
|
||||
|
||||
COPY operator-repos/builtin/conditional_route ./operator-repos/builtin/conditional_route
|
||||
ENTRYPOINT ["python", "/app/backend/operator-runner/main.py"]
|
||||
|
||||
@ -42,7 +42,7 @@
|
||||
"requiresManifest": true
|
||||
},
|
||||
"entrypoint": "/app/backend/operator-runner/main.py",
|
||||
"handler": "condition_router",
|
||||
"handler": "builtin_condition_router",
|
||||
"imagePolicy": {
|
||||
"allowsSharedBaseLayer": true,
|
||||
"forbidsSharedOperatorRunnerFinalImage": true,
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
"requiresManifest": true
|
||||
},
|
||||
"entrypoint": "/app/backend/operator-runner/main.py",
|
||||
"handler": "condition_router",
|
||||
"handler": "builtin_condition_router",
|
||||
"imagePolicy": {
|
||||
"allowsSharedBaseLayer": true,
|
||||
"forbidsSharedOperatorRunnerFinalImage": true,
|
||||
|
||||
@ -6,7 +6,7 @@ ENV DROBOTICFLOW_OPERATOR_ID=operator-builtin-csv-to-json \
|
||||
DROBOTICFLOW_OPERATOR_SLUG=csv_to_json \
|
||||
DROBOTICFLOW_OPERATOR_SOURCE=/app/operator-repos/builtin/csv_to_json/src/operator.py \
|
||||
DROBOTICFLOW_OPERATOR_REPOSITORY=/app/operator-repos/builtin/csv_to_json \
|
||||
DROBOTICFLOW_OPERATOR_HANDLER=csv_to_json
|
||||
DROBOTICFLOW_OPERATOR_HANDLER=builtin_csv_to_json
|
||||
|
||||
COPY operator-repos/builtin/csv_to_json ./operator-repos/builtin/csv_to_json
|
||||
ENTRYPOINT ["python", "/app/backend/operator-runner/main.py"]
|
||||
|
||||
@ -42,7 +42,7 @@
|
||||
"requiresManifest": true
|
||||
},
|
||||
"entrypoint": "/app/backend/operator-runner/main.py",
|
||||
"handler": "csv_to_json",
|
||||
"handler": "builtin_csv_to_json",
|
||||
"imagePolicy": {
|
||||
"allowsSharedBaseLayer": true,
|
||||
"forbidsSharedOperatorRunnerFinalImage": true,
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
"requiresManifest": true
|
||||
},
|
||||
"entrypoint": "/app/backend/operator-runner/main.py",
|
||||
"handler": "csv_to_json",
|
||||
"handler": "builtin_csv_to_json",
|
||||
"imagePolicy": {
|
||||
"allowsSharedBaseLayer": true,
|
||||
"forbidsSharedOperatorRunnerFinalImage": true,
|
||||
|
||||
@ -6,7 +6,7 @@ ENV DROBOTICFLOW_OPERATOR_ID=operator-builtin-dataset-provenance-audit \
|
||||
DROBOTICFLOW_OPERATOR_SLUG=dataset_provenance_audit \
|
||||
DROBOTICFLOW_OPERATOR_SOURCE=/app/operator-repos/builtin/dataset_provenance_audit/src/operator.py \
|
||||
DROBOTICFLOW_OPERATOR_REPOSITORY=/app/operator-repos/builtin/dataset_provenance_audit \
|
||||
DROBOTICFLOW_OPERATOR_HANDLER=dataset_provenance_audit
|
||||
DROBOTICFLOW_OPERATOR_HANDLER=builtin_dataset_provenance_audit
|
||||
|
||||
COPY operator-repos/builtin/dataset_provenance_audit ./operator-repos/builtin/dataset_provenance_audit
|
||||
ENTRYPOINT ["python", "/app/backend/operator-runner/main.py"]
|
||||
|
||||
@ -42,7 +42,7 @@
|
||||
"requiresManifest": true
|
||||
},
|
||||
"entrypoint": "/app/backend/operator-runner/main.py",
|
||||
"handler": "dataset_provenance_audit",
|
||||
"handler": "builtin_dataset_provenance_audit",
|
||||
"imagePolicy": {
|
||||
"allowsSharedBaseLayer": true,
|
||||
"forbidsSharedOperatorRunnerFinalImage": true,
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
"requiresManifest": true
|
||||
},
|
||||
"entrypoint": "/app/backend/operator-runner/main.py",
|
||||
"handler": "dataset_provenance_audit",
|
||||
"handler": "builtin_dataset_provenance_audit",
|
||||
"imagePolicy": {
|
||||
"allowsSharedBaseLayer": true,
|
||||
"forbidsSharedOperatorRunnerFinalImage": true,
|
||||
|
||||
@ -6,7 +6,7 @@ ENV DROBOTICFLOW_OPERATOR_ID=operator-builtin-dataset-schema-contract-validate \
|
||||
DROBOTICFLOW_OPERATOR_SLUG=dataset_schema_contract_validate \
|
||||
DROBOTICFLOW_OPERATOR_SOURCE=/app/operator-repos/builtin/dataset_schema_contract_validate/src/operator.py \
|
||||
DROBOTICFLOW_OPERATOR_REPOSITORY=/app/operator-repos/builtin/dataset_schema_contract_validate \
|
||||
DROBOTICFLOW_OPERATOR_HANDLER=dataset_schema_contract_validate
|
||||
DROBOTICFLOW_OPERATOR_HANDLER=builtin_dataset_schema_contract_validate
|
||||
|
||||
COPY operator-repos/builtin/dataset_schema_contract_validate ./operator-repos/builtin/dataset_schema_contract_validate
|
||||
ENTRYPOINT ["python", "/app/backend/operator-runner/main.py"]
|
||||
|
||||
@ -42,7 +42,7 @@
|
||||
"requiresManifest": true
|
||||
},
|
||||
"entrypoint": "/app/backend/operator-runner/main.py",
|
||||
"handler": "dataset_schema_contract_validate",
|
||||
"handler": "builtin_dataset_schema_contract_validate",
|
||||
"imagePolicy": {
|
||||
"allowsSharedBaseLayer": true,
|
||||
"forbidsSharedOperatorRunnerFinalImage": true,
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
"requiresManifest": true
|
||||
},
|
||||
"entrypoint": "/app/backend/operator-runner/main.py",
|
||||
"handler": "dataset_schema_contract_validate",
|
||||
"handler": "builtin_dataset_schema_contract_validate",
|
||||
"imagePolicy": {
|
||||
"allowsSharedBaseLayer": true,
|
||||
"forbidsSharedOperatorRunnerFinalImage": true,
|
||||
|
||||
@ -6,7 +6,7 @@ ENV DROBOTICFLOW_OPERATOR_ID=operator-builtin-dataset-split-leakage-validate \
|
||||
DROBOTICFLOW_OPERATOR_SLUG=dataset_split_leakage_validate \
|
||||
DROBOTICFLOW_OPERATOR_SOURCE=/app/operator-repos/builtin/dataset_split_leakage_validate/src/operator.py \
|
||||
DROBOTICFLOW_OPERATOR_REPOSITORY=/app/operator-repos/builtin/dataset_split_leakage_validate \
|
||||
DROBOTICFLOW_OPERATOR_HANDLER=dataset_split_leakage_validate
|
||||
DROBOTICFLOW_OPERATOR_HANDLER=builtin_dataset_split_leakage_validate
|
||||
|
||||
COPY operator-repos/builtin/dataset_split_leakage_validate ./operator-repos/builtin/dataset_split_leakage_validate
|
||||
ENTRYPOINT ["python", "/app/backend/operator-runner/main.py"]
|
||||
|
||||
@ -42,7 +42,7 @@
|
||||
"requiresManifest": true
|
||||
},
|
||||
"entrypoint": "/app/backend/operator-runner/main.py",
|
||||
"handler": "dataset_split_leakage_validate",
|
||||
"handler": "builtin_dataset_split_leakage_validate",
|
||||
"imagePolicy": {
|
||||
"allowsSharedBaseLayer": true,
|
||||
"forbidsSharedOperatorRunnerFinalImage": true,
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
"requiresManifest": true
|
||||
},
|
||||
"entrypoint": "/app/backend/operator-runner/main.py",
|
||||
"handler": "dataset_split_leakage_validate",
|
||||
"handler": "builtin_dataset_split_leakage_validate",
|
||||
"imagePolicy": {
|
||||
"allowsSharedBaseLayer": true,
|
||||
"forbidsSharedOperatorRunnerFinalImage": true,
|
||||
|
||||
@ -6,7 +6,7 @@ ENV DROBOTICFLOW_OPERATOR_ID=operator-builtin-dataset-split-manifest \
|
||||
DROBOTICFLOW_OPERATOR_SLUG=dataset_split_manifest \
|
||||
DROBOTICFLOW_OPERATOR_SOURCE=/app/operator-repos/builtin/dataset_split_manifest/src/operator.py \
|
||||
DROBOTICFLOW_OPERATOR_REPOSITORY=/app/operator-repos/builtin/dataset_split_manifest \
|
||||
DROBOTICFLOW_OPERATOR_HANDLER=dataset_split_manifest
|
||||
DROBOTICFLOW_OPERATOR_HANDLER=builtin_dataset_split_manifest
|
||||
|
||||
COPY operator-repos/builtin/dataset_split_manifest ./operator-repos/builtin/dataset_split_manifest
|
||||
ENTRYPOINT ["python", "/app/backend/operator-runner/main.py"]
|
||||
|
||||
@ -42,7 +42,7 @@
|
||||
"requiresManifest": true
|
||||
},
|
||||
"entrypoint": "/app/backend/operator-runner/main.py",
|
||||
"handler": "dataset_split_manifest",
|
||||
"handler": "builtin_dataset_split_manifest",
|
||||
"imagePolicy": {
|
||||
"allowsSharedBaseLayer": true,
|
||||
"forbidsSharedOperatorRunnerFinalImage": true,
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
"requiresManifest": true
|
||||
},
|
||||
"entrypoint": "/app/backend/operator-runner/main.py",
|
||||
"handler": "dataset_split_manifest",
|
||||
"handler": "builtin_dataset_split_manifest",
|
||||
"imagePolicy": {
|
||||
"allowsSharedBaseLayer": true,
|
||||
"forbidsSharedOperatorRunnerFinalImage": true,
|
||||
|
||||
@ -6,7 +6,7 @@ ENV DROBOTICFLOW_OPERATOR_ID=operator-builtin-dexycb-dataset-validate \
|
||||
DROBOTICFLOW_OPERATOR_SLUG=dexycb_dataset_validate \
|
||||
DROBOTICFLOW_OPERATOR_SOURCE=/app/operator-repos/builtin/dexycb_dataset_validate/src/operator.py \
|
||||
DROBOTICFLOW_OPERATOR_REPOSITORY=/app/operator-repos/builtin/dexycb_dataset_validate \
|
||||
DROBOTICFLOW_OPERATOR_HANDLER=dexycb_dataset_validate
|
||||
DROBOTICFLOW_OPERATOR_HANDLER=builtin_dexycb_dataset_validate
|
||||
|
||||
COPY operator-repos/builtin/dexycb_dataset_validate ./operator-repos/builtin/dexycb_dataset_validate
|
||||
ENTRYPOINT ["python", "/app/backend/operator-runner/main.py"]
|
||||
|
||||
@ -42,7 +42,7 @@
|
||||
"requiresManifest": true
|
||||
},
|
||||
"entrypoint": "/app/backend/operator-runner/main.py",
|
||||
"handler": "dexycb_dataset_validate",
|
||||
"handler": "builtin_dexycb_dataset_validate",
|
||||
"imagePolicy": {
|
||||
"allowsSharedBaseLayer": true,
|
||||
"forbidsSharedOperatorRunnerFinalImage": true,
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
"requiresManifest": true
|
||||
},
|
||||
"entrypoint": "/app/backend/operator-runner/main.py",
|
||||
"handler": "dexycb_dataset_validate",
|
||||
"handler": "builtin_dexycb_dataset_validate",
|
||||
"imagePolicy": {
|
||||
"allowsSharedBaseLayer": true,
|
||||
"forbidsSharedOperatorRunnerFinalImage": true,
|
||||
|
||||
@ -9,7 +9,7 @@ ENV PYTHONUNBUFFERED=1 \
|
||||
DROBOTICFLOW_OPERATOR_SLUG=diffusion_policy_train \
|
||||
DROBOTICFLOW_OPERATOR_SOURCE=/app/operator-repos/builtin/diffusion_policy_train/src/operator.py \
|
||||
DROBOTICFLOW_OPERATOR_REPOSITORY=/app/operator-repos/builtin/diffusion_policy_train \
|
||||
DROBOTICFLOW_OPERATOR_HANDLER=diffusion_policy_train \
|
||||
DROBOTICFLOW_OPERATOR_HANDLER=builtin_diffusion_policy_train \
|
||||
USER=droboticflow \
|
||||
LOGNAME=droboticflow \
|
||||
HOME=/tmp/droboticflow-home
|
||||
|
||||
@ -42,7 +42,7 @@
|
||||
"requiresManifest": true
|
||||
},
|
||||
"entrypoint": "/app/backend/operator-runner/main.py",
|
||||
"handler": "diffusion_policy_train",
|
||||
"handler": "builtin_diffusion_policy_train",
|
||||
"imagePolicy": {
|
||||
"allowsSharedBaseLayer": true,
|
||||
"forbidsSharedOperatorRunnerFinalImage": true,
|
||||
@ -62,14 +62,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"
|
||||
],
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
"requiresManifest": true
|
||||
},
|
||||
"entrypoint": "/app/backend/operator-runner/main.py",
|
||||
"handler": "diffusion_policy_train",
|
||||
"handler": "builtin_diffusion_policy_train",
|
||||
"imagePolicy": {
|
||||
"allowsSharedBaseLayer": true,
|
||||
"forbidsSharedOperatorRunnerFinalImage": true,
|
||||
@ -32,7 +32,7 @@
|
||||
"requiresGpu": true
|
||||
},
|
||||
"runtimeDependencies": [
|
||||
"diffusion-policy-training-command",
|
||||
"real-stanford-diffusion-policy",
|
||||
"zarr-or-lerobot-trajectory-files",
|
||||
"gpu-a800"
|
||||
],
|
||||
|
||||
@ -2,7 +2,7 @@ from __future__ import annotations
|
||||
|
||||
from typing import Any
|
||||
|
||||
from backend.operators.builtin.structured_model_operator import HelperMap, run_policy_training
|
||||
from backend.operators.builtin.structured_model_operator import HelperMap, run_diffusion_policy_training
|
||||
|
||||
|
||||
def run(
|
||||
@ -13,13 +13,4 @@ def run(
|
||||
inputs: list[dict[str, Any]],
|
||||
helpers: HelperMap,
|
||||
) -> list[dict[str, Any]]:
|
||||
return run_policy_training(
|
||||
run_id,
|
||||
node_id,
|
||||
output_dir,
|
||||
node_data,
|
||||
inputs,
|
||||
helpers,
|
||||
operator_name="Diffusion Policy 训练",
|
||||
model_family="Diffusion Policy",
|
||||
)
|
||||
return run_diffusion_policy_training(run_id, node_id, output_dir, node_data, inputs, helpers)
|
||||
|
||||
@ -6,7 +6,7 @@ ENV DROBOTICFLOW_OPERATOR_ID=operator-builtin-directory-scan \
|
||||
DROBOTICFLOW_OPERATOR_SLUG=directory_scan \
|
||||
DROBOTICFLOW_OPERATOR_SOURCE=/app/operator-repos/builtin/directory_scan/src/operator.py \
|
||||
DROBOTICFLOW_OPERATOR_REPOSITORY=/app/operator-repos/builtin/directory_scan \
|
||||
DROBOTICFLOW_OPERATOR_HANDLER=directory_scan
|
||||
DROBOTICFLOW_OPERATOR_HANDLER=builtin_directory_scan
|
||||
|
||||
COPY operator-repos/builtin/directory_scan ./operator-repos/builtin/directory_scan
|
||||
ENTRYPOINT ["python", "/app/backend/operator-runner/main.py"]
|
||||
|
||||
@ -42,7 +42,7 @@
|
||||
"requiresManifest": true
|
||||
},
|
||||
"entrypoint": "/app/backend/operator-runner/main.py",
|
||||
"handler": "directory_scan",
|
||||
"handler": "builtin_directory_scan",
|
||||
"imagePolicy": {
|
||||
"allowsSharedBaseLayer": true,
|
||||
"forbidsSharedOperatorRunnerFinalImage": true,
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
"requiresManifest": true
|
||||
},
|
||||
"entrypoint": "/app/backend/operator-runner/main.py",
|
||||
"handler": "directory_scan",
|
||||
"handler": "builtin_directory_scan",
|
||||
"imagePolicy": {
|
||||
"allowsSharedBaseLayer": true,
|
||||
"forbidsSharedOperatorRunnerFinalImage": true,
|
||||
|
||||
@ -6,7 +6,7 @@ ENV DROBOTICFLOW_OPERATOR_ID=operator-builtin-droid-raw-episode-validate \
|
||||
DROBOTICFLOW_OPERATOR_SLUG=droid_raw_episode_validate \
|
||||
DROBOTICFLOW_OPERATOR_SOURCE=/app/operator-repos/builtin/droid_raw_episode_validate/src/operator.py \
|
||||
DROBOTICFLOW_OPERATOR_REPOSITORY=/app/operator-repos/builtin/droid_raw_episode_validate \
|
||||
DROBOTICFLOW_OPERATOR_HANDLER=droid_raw_episode_validate
|
||||
DROBOTICFLOW_OPERATOR_HANDLER=builtin_droid_raw_episode_validate
|
||||
|
||||
COPY operator-repos/builtin/droid_raw_episode_validate ./operator-repos/builtin/droid_raw_episode_validate
|
||||
ENTRYPOINT ["python", "/app/backend/operator-runner/main.py"]
|
||||
|
||||
@ -42,7 +42,7 @@
|
||||
"requiresManifest": true
|
||||
},
|
||||
"entrypoint": "/app/backend/operator-runner/main.py",
|
||||
"handler": "droid_raw_episode_validate",
|
||||
"handler": "builtin_droid_raw_episode_validate",
|
||||
"imagePolicy": {
|
||||
"allowsSharedBaseLayer": true,
|
||||
"forbidsSharedOperatorRunnerFinalImage": 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