Add Wall-X serving and Turtle2 TCP WebSocket bridge
Pre-commit / pre-commit (push) Canceled after 0s

This commit is contained in:
2026-09-23 21:04:17 +08:00
parent 6764e8f12f
commit d1cc7d96ad
40 changed files with 8591 additions and 40 deletions
+36
View File
@@ -226,6 +226,42 @@ if [[ -z "${CHECKPOINT_PATH}" ]]; then
exit 2
fi
# The CLI action horizon overrides the checkpoint config. Reject mismatches
# before loading a large model or handing an incompatible packet to Turtle2.
if [[ -z "${TRAIN_CONFIG_PATH}" && -f "${CHECKPOINT_PATH%/}/config.yml" ]]; then
TRAIN_CONFIG_PATH="${CHECKPOINT_PATH%/}/config.yml"
fi
if [[ -n "${TRAIN_CONFIG_PATH}" ]]; then
if ! "${PYTHON_BIN}" - "${TRAIN_CONFIG_PATH}" "${ACTION_HORIZON}" <<'PY'
import sys
import yaml
path, requested = sys.argv[1], int(sys.argv[2])
try:
with open(path, encoding="utf-8") as stream:
config = yaml.load(stream, Loader=yaml.FullLoader) or {}
except (OSError, yaml.YAMLError) as exc:
raise SystemExit(f"error: cannot read training config {path}: {exc}")
task = config.get("task") or {}
data = config.get("data") or {}
configured = (
task.get("action_horizon_flow")
or task.get("action_horizon")
or data.get("action_horizon_flow")
or data.get("action_horizon")
)
if configured is not None and requested != int(configured):
raise SystemExit(
f"error: action horizon {requested} disagrees with training config "
f"{path}: {configured}; use --action-horizon {configured}"
)
PY
then
exit 2
fi
fi
export CUDA_VISIBLE_DEVICES="${CUDA_ID}"
export ENABLE_FAST_PREPROCESS="${ENABLE_FAST_PREPROCESS:-true}"