bimanual-vla

仿真 Dashboard 使用手册(AI 提交训练 / 评测流程)

本文档给 AI agent / 操作者使用,目标是:以后提交仿真数据上传、4×4090 训练、H100/H200 Slurm 训练、4×4090 评测、H100/H200 Slurm 评测、评估视频查看时,优先走 Dashboard API / 页面,不再临时重复写 sbatch、norm、train、eval 脚本。

1. 服务与隔离关系

用途 地址 systemd user service 配置 workspace 数据集可见范围
实机 Dashboard http://192.168.101.9:8090 bimanual-vla-dashboard.service server_4090/config.json ~/.local/share/bimanual-vla-server real / unknown
仿真 Dashboard http://192.168.101.9:8091 bimanual-vla-sim-dashboard.service server_4090/config.simulation.json ~/.local/share/bimanual-vla-sim-dashboard simulation

仿真 Dashboard 与实机 Dashboard 共用底层 LeRobot 兼容数据根目录、OpenPI 代码、checkpoint 根目录,但页面/API 会按数据集来源过滤:

2. Token 获取

仿真 Dashboard token 在 4x4090:

ssh 4x4090 'source ~/.config/bimanual-vla-sim-dashboard/server.env && printf "%s\n" "$BIMANUAL_VLA_SERVER_TOKEN"'

登录账号密码也在同一文件:

ssh 4x4090 'source ~/.config/bimanual-vla-sim-dashboard/server.env && printf "user=%s\npassword=%s\n" "$BIMANUAL_VLA_LOGIN_USER" "$BIMANUAL_VLA_LOGIN_PASSWORD"'

命令行示例中统一使用:

export SIM_DASHBOARD=http://192.168.101.9:8091
export SIM_TOKEN='替换为上面查到的 token'

不要把 token 写进 Git、文档提交或公开日志。

3. 服务管理

在 4x4090 上检查状态:

ssh 4x4090 'systemctl --user status bimanual-vla-sim-dashboard.service --no-pager'
ssh 4x4090 'journalctl --user -u bimanual-vla-sim-dashboard.service -n 100 --no-pager'
ssh 4x4090 'tail -n 100 ~/.local/share/bimanual-vla-sim-dashboard/dashboard.log'

重启仿真 Dashboard:

ssh 4x4090 'systemctl --user restart bimanual-vla-sim-dashboard.service'

重新部署:

./deploy_4090_sim_dashboard.sh

部署脚本会:

  1. 同步 Dashboard 运行需要的文件到远端用户主目录下的 bimanual-vla(默认 $HOME/bimanual-vla,可通过 REMOTE_ROOT 覆盖)。
  2. 如果不存在 server_4090/config.simulation.json,从 config.simulation.example.json 复制。
  3. 安装并启用 bimanual-vla-sim-dashboard.service。
  4. 重启 8091 服务。

4. 推荐 AI 工作流总览

AI agent 处理仿真训练 / 评测任务时,按下面顺序执行:

  1. 确认用户需求:数据集 ID、模型系列 pi05/pi0、实验名、训练目标机器、GPU 数量、训练步数、batch、评测设置。
  2. 刷新 Dashboard 状态:
    curl -sS -H "Authorization: Bearer $SIM_TOKEN" "$SIM_DASHBOARD/api/status" | jq .
    
  3. 确认数据集在 8091 可见,且 dataset_origin=simulation。
  4. 如果数据集不存在,先用上传脚本上传,必须带:
    --dataset-origin simulation
    
  5. 从 /api/status 选择可用 foundation/base model 或仿真 checkpoint。
  6. 提交训练:
    • 本地 4×4090:execution_target=local_4090,gpu_ids 填物理 GPU ID 列表,例如 0,1。
    • H100/H200:execution_target=h100/h200-ali-01/h200-ali-02,cluster_gpus 填 Slurm 申请卡数;Dashboard 会提交 sbatch。
  7. 通过 /api/tasks/<task_id>/log 和 /api/tasks/<task_id>/metrics 监控。
  8. 训练间隔 checkpoint 的自动 held-out eval 会在本地 4×4090 上按空闲卡触发;没有空闲卡会记录 skipped,不阻塞训练。
  9. 需要额外评测时,走 POST /api/tasks/eval 手动提交。
  10. 有视频评测输出时,把视频保存或软链到 eval_video_roots 中,再在页面“评估视频”模块直接看。

5. 数据上传

5.1 上传仿真 LeRobot / GUI NPZ 数据集

在能访问 4x4090:8091 的机器执行:

bin/bimanual-vla data-upload /path/to/LEROBOT_OR_GUI_NPZ_DIR \
  --name DATASET_ID \
  --dataset-origin simulation \
  --server http://192.168.101.9:8091 \
  --token "$SIM_TOKEN" \
  --workers 4 \
  --merge

说明:

5.2 检查数据集是否可见

curl -sS -H "Authorization: Bearer $SIM_TOKEN" \
  "$SIM_DASHBOARD/api/status" \
  | jq '.datasets[] | {id, dataset_origin, episodes, frames, schema_label, arm_mode, training_supported}'

仿真 Dashboard 正常情况下所有返回项都应是:

{"dataset_origin":"simulation"}

如果数据集不显示,常见原因:

6. 训练提交

训练 API:

POST /api/tasks/train
Authorization: Bearer <SIM_TOKEN>
Content-Type: application/json

6.1 本地 4×4090 训练示例

curl -sS -X POST "$SIM_DASHBOARD/api/tasks/train" \
  -H "Authorization: Bearer $SIM_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "dataset_id": "pick_cube_piper_v1",
    "exp_name": "pick_cube_piper_v1_pi05_sim_001",
    "model_variant": "pi05",
    "base_checkpoint": "${HOME}/.cache/openpi/openpi-assets/checkpoints/pi05_base",
    "execution_target": "local_4090",
    "gpu_ids": ["0", "1"],
    "fsdp_devices": 2,
    "batch_size": 2,
    "num_workers": 2,
    "num_train_steps": 30000,
    "save_interval": 1000,
    "mode": "auto",
    "eval_enabled": true,
    "eval_interval_steps": 5000,
    "eval_batch_size": 1,
    "eval_num_workers": 2,
    "eval_max_batches": 50,
    "eval_xla_memory_fraction": 0.85,
    "xla_memory_fraction": 0.90
  }' | jq .

返回 task.id 后,记录它,例如:

export TRAIN_TASK_ID=train-YYYYMMDD-HHMMSS-xxxxxxxx

6.2 H100 Slurm 训练示例

重要:H100/H200 训练必须走 Slurm。Dashboard 只在 4×4090 上做轻量 SSH/sbatch 提交和轮询,真实训练在 Slurm 节点执行。

curl -sS -X POST "$SIM_DASHBOARD/api/tasks/train" \
  -H "Authorization: Bearer $SIM_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "dataset_id": "pick_cube_piper_v1",
    "exp_name": "pick_cube_piper_v1_pi05_h100_001",
    "model_variant": "pi05",
    "base_checkpoint": "${HOME}/.cache/openpi/openpi-assets/checkpoints/pi05_base",
    "execution_target": "h100",
    "cluster_gpus": 1,
    "fsdp_devices": 1,
    "batch_size": 4,
    "num_workers": 4,
    "num_train_steps": 30000,
    "save_interval": 1000,
    "mode": "auto",
    "eval_enabled": true,
    "eval_interval_steps": 5000,
    "eval_batch_size": 1,
    "eval_num_workers": 2,
    "eval_max_batches": 50,
    "xla_memory_fraction": 0.90
  }' | jq .

Dashboard 会生成一个本地 train 任务,但它的 command 实际是:

server_4090/slurm_job_runner.py --target-json ... --commands-json ...

slurm_job_runner.py 会:

  1. SSH 到 login-server。
  2. 在 H100 共享文件系统中的远端工作目录写入 sbatch 文件。
  3. 执行 sbatch。
  4. 用 squeue / sacct 轮询 job 状态。
  5. 把 Slurm job id、状态和最终 exit code 写入 Dashboard 任务日志。

6.3 H200 Slurm 训练示例

curl -sS -X POST "$SIM_DASHBOARD/api/tasks/train" \
  -H "Authorization: Bearer $SIM_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "dataset_id": "pick_cube_piper_v1",
    "exp_name": "pick_cube_piper_v1_pi05_h200_001",
    "model_variant": "pi05",
    "base_checkpoint": "${HOME}/.cache/openpi/openpi-assets/checkpoints/pi05_base",
    "execution_target": "h200-ali-01",
    "cluster_gpus": 1,
    "fsdp_devices": 1,
    "batch_size": 4,
    "num_workers": 4,
    "num_train_steps": 30000,
    "save_interval": 1000,
    "mode": "auto"
  }' | jq .

注意:H200 不作为 Dashboard 可直连登录节点使用。8091 自动提交 H200 任务时只 SSH 到 login-server,再由 login-server 调用 Slurm 申请 h200 分区和指定 node=h200-ali-01/02。因此 H200 配置应满足:

否则任务会失败并在日志里显示 SSH 认证错误。

6.4 训练参数解释

字段 含义 本地 4×4090 H100/H200
execution_target 执行位置 local_4090 h100 / h200-ali-01 / h200-ali-02
gpu_ids GPU 选择 物理 GPU ID 列表,如 ["0","1"] 可忽略,建议用 cluster_gpus
cluster_gpus Slurm 申请卡数 不用 1/2/4...
fsdp_devices FSDP 分片数 必须整除 GPU 数 必须整除 cluster_gpus
batch_size 全局 batch 必须整除 GPU 数 必须整除 cluster_gpus
base_checkpoint 初始化权重 foundation 或仿真 checkpoint 同左,路径会按配置映射到远端
mode 启动方式 auto/new/resume/overwrite 同左
eval_enabled 自动 held-out eval 本地训练会自动找空闲卡 Slurm 训练内仍写入配置;推荐另行手动提交评测

6.5 norm / split 规则

训练提交时会自动处理 norm:

7. 监控训练

7.1 列出任务

curl -sS -H "Authorization: Bearer $SIM_TOKEN" \
  "$SIM_DASHBOARD/api/status" \
  | jq '.tasks[] | {id,type,state,pid,metadata,waiting_reason,skip_reason,returncode}'

7.2 看日志

curl -sS -H "Authorization: Bearer $SIM_TOKEN" \
  "$SIM_DASHBOARD/api/tasks/$TRAIN_TASK_ID/log?max_bytes=65536" \
  | jq -r .log

Slurm 任务日志里应能看到:

[dashboard] submitting Slurm job on login-server: ...
Submitted batch job <JOB_ID>
[dashboard] squeue <JOB_ID>: RUNNING|...
[dashboard] final_state=COMPLETED exit_code=0:0

7.3 看训练曲线

curl -sS -H "Authorization: Bearer $SIM_TOKEN" \
  "$SIM_DASHBOARD/api/tasks/$TRAIN_TASK_ID/metrics?max_points=1200" \
  | jq '.summary, .eval_summary'

页面“训练指标曲线”会把训练 loss 和自动 eval loss 合并到同一张曲线里。

7.4 停止任务

curl -sS -X POST \
  -H "Authorization: Bearer $SIM_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{"force": false}' \
  "$SIM_DASHBOARD/api/tasks/$TRAIN_TASK_ID/stop" | jq .

强杀:

curl -sS -X POST \
  -H "Authorization: Bearer $SIM_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{"force": true}' \
  "$SIM_DASHBOARD/api/tasks/$TRAIN_TASK_ID/stop" | jq .

删除终态任务记录和日志,不删除 checkpoint:

curl -sS -X DELETE \
  -H "Authorization: Bearer $SIM_TOKEN" \
  "$SIM_DASHBOARD/api/tasks/$TRAIN_TASK_ID" | jq .

8. 手动评测

评测 API:

POST /api/tasks/eval
Authorization: Bearer <SIM_TOKEN>
Content-Type: application/json

8.1 选择 checkpoint

curl -sS -H "Authorization: Bearer $SIM_TOKEN" \
  "$SIM_DASHBOARD/api/status" \
  | jq '.checkpoints[] | {path, experiment, step, dataset_ids, dataset_origins, model_variant, arm_mode}'

仿真 Dashboard 已过滤实机 checkpoint;这里列出的训练 checkpoint 都应来自仿真数据集,foundation/base model 不在 checkpoints 列表而在 base_models 中。

8.2 4×4090 本地评测

curl -sS -X POST "$SIM_DASHBOARD/api/tasks/eval" \
  -H "Authorization: Bearer $SIM_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "execution_target": "local_4090",
    "dataset_id": "pick_cube_piper_v1",
    "checkpoint": "${HOME}/robotwin_ws/RoboTwin/policy/pi05/checkpoints/pi05_piper_single_arm_lora/pick_cube_piper_v1_pi05_sim_001/5000",
    "model_variant": "pi05",
    "base_checkpoint": "${HOME}/.cache/openpi/openpi-assets/checkpoints/pi05_base",
    "gpu_ids": ["2"],
    "batch_size": 1,
    "num_workers": 2,
    "max_batches": 50,
    "xla_memory_fraction": 0.85
  }' | jq .

8.3 H100 Slurm 评测

curl -sS -X POST "$SIM_DASHBOARD/api/tasks/eval" \
  -H "Authorization: Bearer $SIM_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "execution_target": "h100",
    "cluster_gpus": 1,
    "dataset_id": "pick_cube_piper_v1",
    "checkpoint": "${HOME}/robotwin_ws/RoboTwin/policy/pi05/checkpoints/pi05_piper_single_arm_lora/pick_cube_piper_v1_pi05_sim_001/5000",
    "model_variant": "pi05",
    "base_checkpoint": "${HOME}/.cache/openpi/openpi-assets/checkpoints/pi05_base",
    "batch_size": 1,
    "num_workers": 2,
    "max_batches": 50,
    "xla_memory_fraction": 0.85
  }' | jq .

H100 评测同样通过 slurm_job_runner.py 提交 sbatch。路径会按 config.simulation.json 中的 target 配置从 4×4090 路径映射到远端路径,例如:

${HOME}/robotwin_ws/RoboTwin/policy/pi05/checkpoints
→ /DATA/sync/${USER}/robotwin_ws/RoboTwin/policy/pi05/checkpoints

因此提交前要确保远端节点对应路径已经同步了代码、数据集、base checkpoint 和目标 checkpoint。

9. 评估视频可视化

页面“评估视频”模块扫描:

~/.local/share/bimanual-vla-sim-dashboard/eval_videos
${HOME}/robotwin_ws/RoboTwin/policy/pi05/outputs

支持:

.mp4 .webm .mov .mkv .avi .gif

如果仿真评测脚本产生视频,推荐保存到:

${HOME}/.local/share/bimanual-vla-sim-dashboard/eval_videos/<experiment>/<run>.mp4

或软链进去:

ssh 4x4090 'mkdir -p ~/.local/share/bimanual-vla-sim-dashboard/eval_videos/my_eval && ln -sf /path/to/video.mp4 ~/.local/share/bimanual-vla-sim-dashboard/eval_videos/my_eval/video.mp4'

刷新页面模块即可播放,不需要把视频同步到本地。

命令行列出视频:

curl -sS -H "Authorization: Bearer $SIM_TOKEN" \
  "$SIM_DASHBOARD/api/eval-videos" | jq '.videos[] | {name, relative_path, size_mib, updated_at, url}'

10. H100/H200 远端准备要求

Dashboard 可以封装提交,但不会自动同步大数据和环境。提交 H100/H200 前检查:

10.1 H100

H100 通过 login-server 提交,login-server 和 h100-ksy-01 共享 /DATA/sync/$USER。建议远端路径:

/DATA/sync/${USER}/bimanual-vla
/DATA/sync/${USER}/robotwin_ws/RoboTwin/policy/pi05
/DATA/sync/${USER}/.cache/huggingface/lerobot
/DATA/sync/${USER}/.cache/openpi/openpi-assets/checkpoints
/DATA/sync/${USER}/miniconda3/envs/openpi

提交前:

ssh login-server 'hostname; pwd; resources; myquota; ls /DATA/sync/${USER}/bimanual-vla/server_4090/openpi_single_arm.py'

10.2 H200

H200 节点存储互相独立,也不和 H100/login-server 共享。每个 H200 节点都要单独准备:

/DATA/sync/${USER}/bimanual-vla
/DATA/sync/${USER}/robotwin_ws/RoboTwin/policy/pi05
/DATA/sync/${USER}/.cache/huggingface/lerobot
/DATA/sync/${USER}/.cache/openpi/openpi-assets/checkpoints
/DATA/sync/${USER}/miniconda3/envs/openpi

并且需要解决非交互 SSH 认证;否则 Dashboard 后台无法提交 sbatch。

10.3 配置目标

目标配置在 4x4090:

$REMOTE_ROOT/server_4090/config.simulation.json

关键字段:

{
  "cluster_targets": {
    "h100": {
      "submit_host": "login-server",
      "partition": "h100",
      "node": "h100-ksy-01",
      "gpu_type": "h100",
      "workdir": "/DATA/sync/${USER}/bimanual-vla",
      "openpi_python": "/DATA/sync/${USER}/miniconda3/envs/openpi/bin/python",
      "dataset_root": "/DATA/sync/${USER}/.cache/huggingface/lerobot",
      "assets_base_dir": "/DATA/sync/${USER}/robotwin_ws/RoboTwin/policy/pi05/assets",
      "checkpoint_base_dir": "/DATA/sync/${USER}/robotwin_ws/RoboTwin/policy/pi05/checkpoints"
    }
  }
}

修改配置后重启:

ssh 4x4090 'systemctl --user restart bimanual-vla-sim-dashboard.service'

11. 常见故障

11.1 仿真 Dashboard 里看不到某个 checkpoint

原因通常是 checkpoint provenance 不属于当前 Dashboard 可见来源。检查:

curl -sS -H "Authorization: Bearer $SIM_TOKEN" "$SIM_DASHBOARD/api/status" \
  | jq '.checkpoints[] | {path,dataset_ids,dataset_origins}'

仿真 Dashboard 只允许:

foundation/base model
或 dataset_origins 中至少一个是 simulation 的训练 checkpoint

实机 checkpoint 会被隐藏;手动传入也会被服务端拒绝。

11.2 H100/H200 任务提交失败

看 Dashboard 任务日志:

curl -sS -H "Authorization: Bearer $SIM_TOKEN" \
  "$SIM_DASHBOARD/api/tasks/$TASK_ID/log?max_bytes=131072" | jq -r .log

常见问题:

11.3 本地 4×4090 训练 OOM

4090 训练优先从保守参数开始:

2 张 4090
batch_size=2
fsdp_devices=2
xla_memory_fraction=0.90

Dashboard 默认要求训练 GPU 每张至少 23000 MiB 空闲显存。若卡上有其他进程,任务会拒绝或进入等待。

11.4 视频页面能列出但不能播放

确认:

12. 给 AI agent 的最小操作模板

# 1. 取 token
SIM_TOKEN=$(ssh 4x4090 'source ~/.config/bimanual-vla-sim-dashboard/server.env && printf "%s" "$BIMANUAL_VLA_SERVER_TOKEN"')
SIM_DASHBOARD=http://192.168.101.9:8091

# 2. 查数据、权重、GPU/target
curl -sS -H "Authorization: Bearer $SIM_TOKEN" "$SIM_DASHBOARD/api/status" > /tmp/sim_status.json
jq '.datasets[] | {id,dataset_origin,episodes,training_supported}' /tmp/sim_status.json
jq '.base_models[] | {path,foundation,experiment,checkpoint_step,dataset_origins}' /tmp/sim_status.json
jq '.checkpoints[] | {path,experiment,step,dataset_ids,dataset_origins}' /tmp/sim_status.json
jq '.config.cluster_targets | keys' /tmp/sim_status.json

# 3. 提交本地训练或 Slurm 训练
curl -sS -X POST "$SIM_DASHBOARD/api/tasks/train" \
  -H "Authorization: Bearer $SIM_TOKEN" \
  -H 'Content-Type: application/json' \
  -d @train_payload.json | tee /tmp/train_task.json

TASK_ID=$(jq -r .id /tmp/train_task.json)

# 4. 监控
curl -sS -H "Authorization: Bearer $SIM_TOKEN" "$SIM_DASHBOARD/api/tasks/$TASK_ID/log?max_bytes=65536" | jq -r .log
curl -sS -H "Authorization: Bearer $SIM_TOKEN" "$SIM_DASHBOARD/api/tasks/$TASK_ID/metrics?max_points=1200" | jq '.summary, .eval_summary'

# 5. 提交手动评测
curl -sS -X POST "$SIM_DASHBOARD/api/tasks/eval" \
  -H "Authorization: Bearer $SIM_TOKEN" \
  -H 'Content-Type: application/json' \
  -d @eval_payload.json | jq .

# 6. 看视频
curl -sS -H "Authorization: Bearer $SIM_TOKEN" "$SIM_DASHBOARD/api/eval-videos" | jq '.videos[] | {relative_path,url}'

13. AI 专用任务状态接口

除完整 /api/status 外,8091 提供更轻量的任务查询接口,适合 AI agent 轮询:

13.1 列出任务摘要

curl -sS -H "Authorization: Bearer $SIM_TOKEN" \
  "$SIM_DASHBOARD/api/tasks?limit=50" | jq .

常用过滤:

# 只看活动任务:running / starting / stopping / waiting_norm / waiting_gpu
curl -sS -H "Authorization: Bearer $SIM_TOKEN" \
  "$SIM_DASHBOARD/api/tasks?active=true" | jq .

# 只看某个数据集的训练任务
curl -sS -H "Authorization: Bearer $SIM_TOKEN" \
  "$SIM_DASHBOARD/api/tasks?type=train&dataset_id=pick_cube_piper_v1" | jq .

# 只看某个实验
curl -sS -H "Authorization: Bearer $SIM_TOKEN" \
  "$SIM_DASHBOARD/api/tasks?exp_name=pick_cube_piper_v1_pi05_sim_001" | jq .

# train 任务附带简要 metrics/progress
curl -sS -H "Authorization: Bearer $SIM_TOKEN" \
  "$SIM_DASHBOARD/api/tasks?type=train&include_metrics=true" | jq .

返回字段包括:

id, type, state, active, terminal, pid,
created_at, queued_at, started_at, finished_at,
returncode, waiting_reason, skip_reason,
dependency, dependency_state,
metadata.dataset_id / exp_name / execution_target / runtime / gpu_ids / checkpoint_dir,
result(eval), metrics(train 可选)

13.2 查询单个任务状态

curl -sS -H "Authorization: Bearer $SIM_TOKEN" \
  "$SIM_DASHBOARD/api/tasks/$TASK_ID/status?include_metrics=true" | jq .

这个接口比 /api/tasks/<task_id> 更适合 AI 使用,因为它去掉了冗长 command,只保留状态判断所需字段。

14. 数据集多服务器位置、去重、同步

仿真数据集可能同时存在于:

local_4090
h100
h200-ali-01
h200-ali-02

这些位置来自 config.simulation.json 的 dataset_root 和 cluster_targets.*.dataset_root。H200 若配置为 access_mode=slurm_only,Dashboard 不会直接 SSH 扫描/传输该节点;需要先通过 login-server 提交 staging/setup Slurm 作业,或经 NAS 中转到 H200 本地 /DATA/sync/$USER。

14.1 查询所有位置并去重

curl -sS -H "Authorization: Bearer $SIM_TOKEN" \
  "$SIM_DASHBOARD/api/dataset-locations?origin=simulation" | jq .

返回结构按 dataset_id 去重:

{
  "datasets": [
    {
      "id": "pick_cube_piper_v1",
      "duplicate_count": 2,
      "origins": ["simulation"],
      "targets": ["local_4090", "h100"],
      "locations": [
        {
          "target": "local_4090",
          "path": "${HOME}/.cache/huggingface/lerobot/pick_cube_piper_v1",
          "origin": "simulation",
          "episodes": 100,
          "frames": 20000
        }
      ]
    }
  ],
  "errors": {}
}

说明:

14.2 跨服务器同步数据集

同步 API:

POST /api/datasets/<dataset_id>/sync

例:从 4×4090 同步到 H100:

curl -sS -X POST "$SIM_DASHBOARD/api/datasets/pick_cube_piper_v1/sync" \
  -H "Authorization: Bearer $SIM_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "source": "local_4090",
    "target": "h100",
    "overwrite": false
  }' | jq .

例:从 H100 拉回 4×4090:

curl -sS -X POST "$SIM_DASHBOARD/api/datasets/pick_cube_piper_v1/sync" \
  -H "Authorization: Bearer $SIM_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "source": "h100",
    "target": "local_4090",
    "overwrite": false
  }' | jq .

同步任务类型是:

transfer

查看日志:

curl -sS -H "Authorization: Bearer $SIM_TOKEN" \
  "$SIM_DASHBOARD/api/tasks/$TRANSFER_TASK_ID/log?max_bytes=131072" | jq -r .log

实现方式:

source tar -cf - DATASET_ID | target tar -xf -

跨机器时使用 SSH 管道,不需要在目标服务器开启端口。

注意:

15. 数据采集接口

仿真 Dashboard 提供轻量采集会话接口,用来让 AI 统一登记“将要采什么数据、采到哪里、上传命令是什么”。它不在 H100/H200 开服务,不直接控制仿真器;真正采集脚本仍由对应机器运行,采集结束后用 upload 或 sync 接口进入 Dashboard 管理。

15.1 创建采集会话

curl -sS -X POST "$SIM_DASHBOARD/api/collection-sessions" \
  -H "Authorization: Bearer $SIM_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "dataset_id": "pick_cube_piper_v1_new",
    "dataset_origin": "simulation",
    "target": "local_4090",
    "metadata": {
      "task": "pick_cube",
      "episodes": 100,
      "simulator": "RoboTwin"
    }
  }' | jq .

返回中会包含推荐上传命令:

upload_command

15.2 列出采集会话

curl -sS -H "Authorization: Bearer $SIM_TOKEN" \
  "$SIM_DASHBOARD/api/collection-sessions" | jq .

15.3 更新采集状态

curl -sS -X PATCH "$SIM_DASHBOARD/api/collection-sessions/$SESSION_ID" \
  -H "Authorization: Bearer $SIM_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "status": "uploaded",
    "notes": "100 episodes collected and uploaded",
    "metadata": {"upload_task_id": "simulation-..."}
  }' | jq .

建议状态:

created -> collecting -> collected -> uploading -> uploaded -> validated
failed

16. H100/H200 资源查询接口

8091 总览会显示 H100/H200 Slurm 资源,后端调用:

scripts/query_h100_h200_resources.sh --compact

API:

curl -sS -H "Authorization: Bearer $SIM_TOKEN" \
  "$SIM_DASHBOARD/api/cluster-resources" | jq -r .output

可选显示全队列:

curl -sS -H "Authorization: Bearer $SIM_TOKEN" \
  "$SIM_DASHBOARD/api/cluster-resources?all_jobs=true" | jq -r .output

注意:

17. H100/H200 评估视频同步到 4×4090 播放

评估视频可能生成在:

4×4090 本地 eval_video_roots
H100/H200 的远端 eval_video_roots

Dashboard 不能也不应该在 H100/H200 上开端口提供视频服务。H100 可通过 login-server 共享文件系统扫描/同步;H200 为 Slurm-only 时需先由 staging/setup Slurm 作业或 NAS 把视频同步回 4×4090,然后由 8091 播放。

17.1 扫描本地 + 远端视频

curl -sS -H "Authorization: Bearer $SIM_TOKEN" \
  "$SIM_DASHBOARD/api/eval-videos?include_remote=true" | jq .

返回中:

页面“评估视频”里:

17.2 同步远端视频到本地

curl -sS -X POST "$SIM_DASHBOARD/api/eval-videos/sync" \
  -H "Authorization: Bearer $SIM_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "source": "h100",
    "root": "/DATA/sync/${USER}/robotwin_ws/RoboTwin/policy/pi05/outputs",
    "relative_path": "my_eval/video.mp4",
    "overwrite": false
  }' | jq .

该接口会创建一个 transfer 任务,执行:

ssh <source> 'tar -C <remote_root> -cf - <relative_path>' | tar -C <local_eval_video_root>/<source> -xf -

同步完成后视频位置类似:

~/.local/share/bimanual-vla-sim-dashboard/eval_videos/h100/my_eval/video.mp4

然后刷新“评估视频”即可播放。

注意:

14. 传输性能与并行策略

所有 Dashboard 托管的跨服务器传输默认采用并行流式传输:

curl -X POST "$SIM_DASHBOARD/api/datasets/my_sim_dataset/sync" \
  -H "Authorization: Bearer $TOKEN" -H 'Content-Type: application/json' \
  -d '{"source":"local_4090","target":"h100","parallelism":8}'

curl -X POST "$SIM_DASHBOARD/api/eval-videos/sync" \
  -H "Authorization: Bearer $TOKEN" -H 'Content-Type: application/json' \
  -d '{"source":"h100","root":"/DATA/sync/${USER}/robotwin_ws/RoboTwin/policy/pi05/outputs","relative_path":"eval/run.mp4","parallelism":8}'

并行度上限为 16。若源/目标是 H200 Slurm-only,接口不会直连 H200 计算节点,而是通过 login-server 提交 Slurm staging/copy 作业;不会在 H200 上启动任何监听服务。

15. 仿真 joint 数据集训练兼容

旧实机 Dashboard 对没有 contract_version/gripper_semantics 的 7D/14D joint 数据集默认 fail-closed,避免把实机 legacy v2 的夹爪米制开度误当作 v3 opening fraction。仿真 Dashboard 现在做了 profile/source 级兼容:

这保证仿真数据可直接走训练/评测链路,同时不放松实机数据的安全约束。

18. 当前已探测的数据集位置(2026-08-05)

按 SERVER_PATHS_ENV_TRAIN_EVAL.md 重新核验后,仿真 Dashboard 的远端路径应使用 /DATA/disk0/${USER},不是旧模板里的 /DATA/sync/${USER}。

18.1 H100 / login-server 共享路径

Dashboard 可在 login-server 轻量扫描:

/DATA/disk0/${USER}/.cache/huggingface/lerobot

当前探测到:

dataset_id episodes frames fps root
lift_pot_piper 150 12385 50 /DATA/disk0/${USER}/.cache/huggingface/lerobot

文档中的 Put Bottles v3 norm_stats 已在 H100 assets 下存在,但 H100 的 LeRobot dataset root 当前未探测到该 dataset 目录;训练前需按准备脚本重新 staging 数据。

18.2 H200-ali-01 Slurm 探测结果

H200 不由 Dashboard 直接 SSH 扫描;通过 login-server 提交 CPU-only Slurm probe,并把 inventory 写入:

/DATA/NAS/GPUServer/${USER}/dashboard_probe/h200-ali-01_inventory.json

当前探测到:

dataset_id episodes frames fps root
lift_pot_piper 150 12385 50 /DATA/disk0/${USER}/.cache/huggingface/lerobot
put_bottles_dustbin_piper_100_25hz_realqpos_v2 100 59798 25 /DATA/disk0/${USER}/.cache/huggingface/lerobot
put_bottles_dustbin_piper_100_25hz_realqpos_v3_order_aligned 100 59798 25 /DATA/disk0/${USER}/.cache/huggingface/lerobot
put_single_bottle_dustbin_piper_200 200 42489 50 /DATA/disk0/${USER}/.cache/huggingface/lerobot

18.3 H200-ali-02 Slurm 探测结果

Inventory cache:

/DATA/NAS/GPUServer/${USER}/dashboard_probe/h200-ali-02_inventory.json

当前探测结果:/DATA/disk0/${USER}/.cache/huggingface/lerobot 不存在或无 LeRobot 数据集。若要在 h200-ali-02 训练,需要先单独 staging 数据、项目、环境和 checkpoint。

19. 数据集位置显示、同步与视频懒加载(2026-08-05 更新)

19.1 数据集位置

仿真 Dashboard 的数据集表现在会合并 /api/status 本地清单和 /api/dataset-locations?origin=simulation 跨服务器清单,并在“位置 / 同步”列显示:

刷新位置:

curl -H "Authorization: Bearer $TOKEN" \
  "$SIM_DASHBOARD/api/dataset-locations?origin=simulation" | jq .

19.2 数据集同步接口

上传客户端无需指定服务器,默认安装到 4×4090:

bin/bimanual-vla data-upload LEROBOT_OR_GUI_NPZ_DIR \
  --name my_sim_dataset --dataset-origin simulation \
  --server "$SIM_DASHBOARD" --token "$TOKEN" --workers 4 --merge

同步到其他服务器:

curl -X POST "$SIM_DASHBOARD/api/datasets/my_sim_dataset/sync" \
  -H "Authorization: Bearer $TOKEN" -H 'Content-Type: application/json' \
  -d '{"source":"local_4090","target":"h100","parallelism":8,"overwrite":false}'

curl -X POST "$SIM_DASHBOARD/api/datasets/my_sim_dataset/sync" \
  -H "Authorization: Bearer $TOKEN" -H 'Content-Type: application/json' \
  -d '{"source":"local_4090","target":"h200-ali-01","parallelism":8,"overwrite":false}'

H100 走 4×4090 ↔ login-server 的并行 tar 流。H200 仍遵守 Slurm-only 规则:Dashboard 先把数据并行 staging 到 NAS /DATA/NAS/GPUServer/${USER}/dashboard_dataset_sync,然后通过 login-server 提交 CPU-only Slurm copy job 到目标 H200 节点,复制到 /DATA/disk0/${USER}/.cache/huggingface/lerobot,不会在 H200 上开端口或绕过 Slurm。

19.3 评估视频

评估视频页面现在只渲染列表,不会一次性创建所有 <video> 播放器;点击“加载 / 播放”后才请求具体视频流。列表支持按:

进行筛选。成功状态从同目录或父目录 _result.txt 中尽量推断;无法推断时显示“未知”。

统一实验产物、训练历史与视频(2026-10-23)

π0.5 SFT 与 RLinf 的训练历史使用同一运行清单;训练/评测视频在评估视频页统一查询。页面支持环境来源(RoboTwin、LIBERO-Safety)、具体任务、实验、训练/评测阶段、任务成功、安全成功和事件筛选,支持分页。

新实验须遵守 实验产物约束:根目录可因机器/磁盘不同而变化,来源/任务/实验/运行 四级保持固定,内部统一划分 metadata、logs、metrics、checkpoints、train、eval 和 artifacts。新后端通过清单声明原生格式、指标轴和恢复能力;逐回合结果须有证据,缺失时使用 unknown。

API 见 统一训练历史与 rollout 产物。两类训练提交支持 artifact_identity;后台每五分钟更新历史索引和视频目录。训练提交登记清单,后端 writer 的输出路径仍需按约束配置。

历史迁移保留旧路径兼容链接、事件标注和 checkpoint 动作约定。运行中任务延后迁移,旧输出已缺失的记录显式标为 missing;H200 指标镜像仅代表 mirror_only,不代表实际节点上的完整训练产物已迁移。当前迁移范围与回执见 迁移记录。

RLinf curves and launch profiles

The simulation dashboard now exposes /api/rlinf/runs and /api/rlinf/runs/<id>/metrics. It reads training_curve.json and evaluation_curve.json, and also reads TensorBoard scalar event files (including the RLinf env/*, rollout/*, eval/*, and time/* tags). Training and evaluation series stay separate, and new numeric metrics appear without front-end changes. The UI can overlay several runs and refresh them while training continues.

Configure rlinf_dashboard in the protected config.simulation.json:

The configured H100 profile launches the LIBERO-Safety PI0.5 GRPO smoke configuration from the shared Safe-RL-with-WM checkout. H200 targets use Slurm-only submission and assume the project, safe-rl-wm-train environment, LIBERO-Safety assets, and PI0.5 weights have been staged on that selected H200 node. The dashboard does not copy these large assets during launch; the selected target’s requirements are shown beside the launch form. H200 curve sources remain disabled until the configured NAS output directory exists and has been verified, so unavailable NAS paths cannot stall dashboard refreshes.

The training history is searchable by experiment/run name, task ID, algorithm, or state. It is paged (10 by default; 10/25/50/100 selectable), and terminal task records plus their local dashboard logs can be deleted in bulk. This does not delete model outputs, checkpoints, or remote Slurm output files.

Native RLInf profile command template:

{
  "command_template": [
    "{python}", "{project_root}/third_party/wovr/examples/embodiment/train_embodied_agent.py",
    "--config-path", "{project_root}/configs/rlinf",
    "--config-name", "libero_safety_grpo_pi05_smoke",
    "runner.logger.log_path={run_dir}"
  ],
  "backend": "rlinf",
  "evaluation": {"backend": "rlinf", "config_name": "libero_safety_grpo_pi05_smoke"},
  "algorithms": ["grpo", "grpo-lag"]
}

New algorithms and resource targets are added by adding a server-side profile; the metric reader accepts new numeric fields without front-end code changes. Do not point an H200 source at node-local storage: H200 jobs need to copy metric snapshots to the configured shared/NAS export while they run.

Native profiles expose actor learning rate, save/evaluation intervals, group size and count, update epochs, micro batch size, seed, rollout horizon, safety budget, and dual learning rate. The server maps these into Hydra overrides, validates ranges and batch divisibility, and sets native RLInf component placement to the selected physical GPU IDs for local jobs.

Use configure_rlinf_native.py --config ... --project ... --python ... --model ... --libero-config ... --libero-source ... --transformer-root ... --run-root ... to explicitly replace the 4090 launch profile with native RLInf. The helper backs up the protected configuration, configures a separate native run root, and handles LIBERO-Safety snapshots whose namespace package would otherwise be shadowed by stock LIBERO. Paths and dependencies must be prepared before enabling the profile; existing GPU jobs are not stopped.

The RLInf run list supports search, paging (10/25/50/100), cross-page curve comparisons, and single/bulk record deletion. Deletion persists across restarts, removes associated terminal dashboard task logs, and preserves raw metric files/checkpoints. Active training or rollout tasks block deletion. The chart uses a fixed CSS size, shared scales, sorted steps, plot clipping, responsive ticks, and wrapped legends. Its axis selector keeps rounds and actor updates separate.

GET /api/rlinf/runs/<id>/checkpoints lists nonempty global_step_N/actor/model_state_dict/full_weights.pt files. POST /api/rlinf/evaluate accepts run_id, checkpoint_id, episodes, max_steps, seed, gpu_ids, and a boolean record_video. It starts the native RLInf eval runner with those exact weights; clients cannot specify arbitrary paths or commands. GET /api/rlinf/evaluations returns rollout task status/results. Local results/videos go under the first eval_video_roots directory. Slurm evaluations save to the profile’s shared output root, then collect JSON and video artifacts back to the dashboard; H200 profiles therefore need a NAS output root visible on the compute node and login node.

The rollout form controls video generation and provides a filtered link to the existing 评估视频 module. Turning recording off disables native video writing; turning it on produces videos in the same indexed artifact tree. Evaluation task logs and results also appear directly in the RLInf module. Slurm commands embed the current evaluation helper, so a separate copy of that helper on H100/H200 is unnecessary. Eval-only rollout models inherit the trained actor architecture before loading its exported weights.

GET /api/rlinf/runs/<id>/log reads dashboard task output or the run’s native .log/.out/.err files, including metrics.log for observed runs. Log reads are bounded, confined to the configured run, and reject symlink log paths. The checkpoint picker also verifies the completed PyTorch ZIP container, excluding weights still being written.

Dataset inventory and deleting a storage copy

The primary dataset list (GET /api/datasets, also returned by /api/status) scans the active storage root, configured read roots, and available local archive roots. It preserves active storage precedence for duplicate IDs and includes local metadata in the location response so the browser can restore full local rows independently of an older status snapshot. Local NVMe/archive entries are classified by their actual location kind; inventory-derived rows are rebuilt to discard stale deleted entries. Dataset IDs without meta/info.json and origins hidden by the dashboard profile remain outside this LeRobot dataset list.

Each dataset’s location column has 删除此位置副本 with an explicit target selector. POST /api/datasets/<id>/delete-copy accepts {target, confirm_dataset_id}; the confirmation must exactly match the ID. Deleting active NVMe storage also removes its current norm assets through the existing dataset editor. Deleting an archive/H100/H200 copy removes only that copy, preserving other locations, model checkpoints, and historical tasks.

Archive/cluster deletions are tracked as transfer tasks (transfer_kind: dataset_delete). Both H100 and H200 use sbatch/srun with zero GPUs. The runner resolves and validates the configured root, rejects traversal and symlink dataset roots, requires dataset metadata, checks file ownership, and checks this user’s other active Slurm batch scripts before deletion. Active dashboard tasks block deletion, and an active delete blocks new tasks for that dataset. Successful H200 deletion refreshes the node inventory and removes the ID from its local inventory cache. Deletion requires the target’s configured Conda Python, partition, and node to be available.

The transfer/delete table independently polls GET /api/transfers, preserving its last successful list on request errors and allowing manual refresh. It does not wait for full-dashboard inventory scans. Deletion tasks display deletion status instead of byte progress; completed legacy transfers and Slurm-only destinations are not recursively rescanned merely to render task progress.