Loading...
Loading...
Compare original and translation side by side
openvla-oftopenvla-oftgit clone https://github.com/moojink/openvla-oft.git
cd openvla-oft
python experiments/robot/libero/run_libero_eval.py \
--pretrained_checkpoint moojink/openvla-7b-oft-finetuned-libero-spatial \
--task_suite_name libero_spatial \
--center_crop True \
--num_trials_per_task 50 \
--seed 7git clone https://github.com/moojink/openvla-oft.git
cd openvla-oft
python experiments/robot/libero/run_libero_eval.py \
--pretrained_checkpoint moojink/openvla-7b-oft-finetuned-libero-spatial \
--task_suite_name libero_spatial \
--center_crop True \
--num_trials_per_task 50 \
--seed 7| Variant | FiLM | Images | Typical use |
|---|---|---|---|
| OFT | Off | 2 (front + wrist) | LIBERO simulation |
| OFT+ | On | 3 (high + left + right wrist) | ALOHA real-world |
num_images_in_input| 版本 | FiLM | 输入图像数 | 典型场景 |
|---|---|---|---|
| OFT | 关闭 | 2(前置摄像头 + 腕部摄像头) | LIBERO仿真环境 |
| OFT+ | 开启 | 3(高位摄像头 + 左/右腕部摄像头) | ALOHA真实机器人场景 |
num_images_in_input| Task | GPU | VRAM | Notes |
|---|---|---|---|
| LIBERO evaluation | 1x A100/A40 | ~16 GB | Single GPU |
| ALOHA evaluation | 1x A100/A40 | ~18 GB | Single GPU |
| LIBERO fine-tuning | 8x A100 | ~27 GB/GPU | Paper default |
| ALOHA fine-tuning (OFT+) | 8x A100 | ~35 GB/GPU | FiLM + 3 images |
| LoRA merge | 1x any GPU | ~16 GB | One-time step |
| 任务 | GPU配置 | 显存需求 | 说明 |
|---|---|---|---|
| LIBERO评估 | 1x A100/A40 | ~16 GB | 单GPU即可运行 |
| ALOHA评估 | 1x A100/A40 | ~18 GB | 单GPU即可运行 |
| LIBERO微调 | 8x A100 | ~27 GB/卡 | 论文默认配置 |
| ALOHA微调 (OFT+) | 8x A100 | ~35 GB/卡 | FiLM模块+3路图像输入 |
| LoRA合并 | 任意单GPU | ~16 GB | 一次性操作 |
| Task Suite | Task-Specific | Combined Policy | Notes |
|---|---|---|---|
| LIBERO-Spatial | 97.2% | 96.8% | Easiest suite |
| LIBERO-Object | 97.4% | 97.0% | Object manipulation |
| LIBERO-Goal | 95.8% | 95.4% | May peak at 50k-100k steps |
| LIBERO-10 | 98.0% | 98.0% | Long-horizon tasks |
| Average | 97.1% | 96.8% | Near-equivalent |
| 任务套件 | 单任务专用策略 | 通用组合策略 | 说明 |
|---|---|---|---|
| LIBERO-Spatial | 97.2% | 96.8% | 最简单的套件 |
| LIBERO-Object | 97.4% | 97.0% | 物体操纵类任务 |
| LIBERO-Goal | 95.8% | 95.4% | 可能在5万-10万步达到性能峰值 |
| LIBERO-10 | 98.0% | 98.0% | 长时序任务 |
| 平均 | 97.1% | 96.8% | 两类策略性能接近 |
openvla/openvla-7bfine-tuning-serving-openpievaluating-cosmos-policyopenvla/openvla-7bfine-tuning-serving-openpievaluating-cosmos-policySetup Progress:
- [ ] Step 1: Create conda env and install PyTorch
- [ ] Step 2: Install openvla-oft package in editable mode
- [ ] Step 3: Install FlashAttention2
- [ ] Step 4: Verify critical versionsconda create -n openvla-oft python=3.10 -y
conda activate openvla-oft
git clone https://github.com/moojink/openvla-oft.git
cd openvla-oft
pip3 install torch==2.2.0 torchvision==0.17.0 torchaudio==2.2.0
pip3 install robosuite==1.4.0pip install -e .pip install packaging ninja
pip install "flash-attn==2.5.5" --no-build-isolationimport torch, transformers, peft
print(f"PyTorch: {torch.__version__}") # Expected: 2.2.0
print(f"Transformers: {transformers.__version__}")
print(f"PEFT: {peft.__version__}") # Expected: 0.11.1搭建进度:
- [ ] 步骤1:创建conda环境并安装PyTorch
- [ ] 步骤2:以可编辑模式安装openvla-oft包
- [ ] 步骤3:安装FlashAttention2
- [ ] 步骤4:验证核心依赖版本conda create -n openvla-oft python=3.10 -y
conda activate openvla-oft
git clone https://github.com/moojink/openvla-oft.git
cd openvla-oft
pip3 install torch==2.2.0 torchvision==0.17.0 torchaudio==2.2.0
pip3 install robosuite==1.4.0pip install -e .pip install packaging ninja
pip install "flash-attn==2.5.5" --no-build-isolationimport torch, transformers, peft
print(f"PyTorch: {torch.__version__}") # 预期版本: 2.2.0
print(f"Transformers: {transformers.__version__}")
print(f"PEFT: {peft.__version__}") # 预期版本: 0.11.1LIBERO Eval Progress:
- [ ] Step 1: Install LIBERO dependencies
- [ ] Step 2: Choose checkpoint and task suite
- [ ] Step 3: Run evaluation
- [ ] Step 4: Parse and validate resultsgit clone https://github.com/Lifelong-Robot-Learning/LIBERO.git
pip install -e LIBERO
pip install -r experiments/robot/libero/libero_requirements.txt| Checkpoint | Task suite |
|---|---|
| |
| |
| |
| |
| Combined |
python experiments/robot/libero/run_libero_eval.py \
--pretrained_checkpoint moojink/openvla-7b-oft-finetuned-libero-spatial \
--task_suite_name libero_spatial \
--center_crop True \
--num_trials_per_task 50 \
--seed 7import re
def parse_libero_log(log_path):
"""Extract per-task success rates from LIBERO eval log."""
with open(log_path) as f:
content = f.read()
matches = re.findall(r"Task (.+?): (\d+)/(\d+) successes", content)
for task, successes, trials in matches:
rate = int(successes) / int(trials)
print(f" {task}: {rate:.0%} ({successes}/{trials})")
parse_libero_log("experiments/logs/latest.log")LIBERO评估进度:
- [ ] 步骤1:安装LIBERO依赖
- [ ] 步骤2:选择检查点和任务套件
- [ ] 步骤3:运行评估
- [ ] 步骤4:解析并验证结果git clone https://github.com/Lifelong-Robot-Learning/LIBERO.git
pip install -e LIBERO
pip install -r experiments/robot/libero/libero_requirements.txt| 检查点 | 对应任务套件 |
|---|---|
| |
| |
| |
| |
| 通用组合套件 |
python experiments/robot/libero/run_libero_eval.py \
--pretrained_checkpoint moojink/openvla-7b-oft-finetuned-libero-spatial \
--task_suite_name libero_spatial \
--center_crop True \
--num_trials_per_task 50 \
--seed 7import re
def parse_libero_log(log_path):
"""从LIBERO评估日志中提取每个任务的成功率。"""
with open(log_path) as f:
content = f.read()
matches = re.findall(r"Task (.+?): (\d+)/(\d+) successes", content)
for task, successes, trials in matches:
rate = int(successes) / int(trials)
print(f" {task}: {rate:.0%} ({successes}/{trials})")
parse_libero_log("experiments/logs/latest.log")Detailed reference: See references/libero-workflow.md for the full LIBERO setup, checkpoint selection strategy, and LoRA merge instructions.
LIBERO Fine-Tune Progress:
- [ ] Step 1: Prepare RLDS dataset
- [ ] Step 2: Launch torchrun with OFT defaults
- [ ] Step 3: Evaluate intermediate and final checkpoints
- [ ] Step 4: Merge LoRA for deployment if neededlibero_spatial_no_noopslibero_object_no_noopslibero_goal_no_noopslibero_10_no_noopstorchrun --standalone --nnodes 1 --nproc-per-node 8 vla-scripts/finetune.py \
--vla_path openvla/openvla-7b \
--data_root_dir /PATH/TO/RLDS/DATASETS/ \
--dataset_name libero_spatial_no_noops \
--run_root_dir /YOUR/CHECKPOINTS/ \
--use_l1_regression True \
--use_diffusion False \
--use_film False \
--num_images_in_input 2 \
--use_proprio True \
--batch_size 8 \
--learning_rate 5e-4 \
--num_steps_before_decay 100000 \
--max_steps 150005 \
--save_freq 10000 \
--save_latest_checkpoint_only False \
--image_aug True \
--lora_rank 32 \
--wandb_entity YOUR_WANDB_ENTITY \
--wandb_project YOUR_WANDB_PROJECTpython vla-scripts/merge_lora_weights_and_save.py \
--base_checkpoint openvla/openvla-7b \
--lora_finetuned_checkpoint_dir /PATH/TO/CHECKPOINT_DIR详细参考:完整的LIBERO搭建、检查点选择策略和LoRA合并指引见 references/libero-workflow.md
LIBERO微调进度:
- [ ] 步骤1:准备RLDS数据集
- [ ] 步骤2:使用OFT默认配置启动torchrun训练
- [ ] 步骤3:评估中间和最终检查点
- [ ] 步骤4:按需合并LoRA权重用于部署libero_spatial_no_noopslibero_object_no_noopslibero_goal_no_noopslibero_10_no_noopstorchrun --standalone --nnodes 1 --nproc-per-node 8 vla-scripts/finetune.py \
--vla_path openvla/openvla-7b \
--data_root_dir /PATH/TO/RLDS/DATASETS/ \
--dataset_name libero_spatial_no_noops \
--run_root_dir /YOUR/CHECKPOINTS/ \
--use_l1_regression True \
--use_diffusion False \
--use_film False \
--num_images_in_input 2 \
--use_proprio True \
--batch_size 8 \
--learning_rate 5e-4 \
--num_steps_before_decay 100000 \
--max_steps 150005 \
--save_freq 10000 \
--save_latest_checkpoint_only False \
--image_aug True \
--lora_rank 32 \
--wandb_entity YOUR_WANDB_ENTITY \
--wandb_project YOUR_WANDB_PROJECTpython vla-scripts/merge_lora_weights_and_save.py \
--base_checkpoint openvla/openvla-7b \
--lora_finetuned_checkpoint_dir /PATH/TO/CHECKPOINT_DIRDetailed reference: See references/aloha-workflow.md for the full ALOHA server-client setup, data preprocessing, dataset registration, and troubleshooting.
ALOHA Progress:
- [ ] Step 1: Preprocess raw ALOHA demonstrations
- [ ] Step 2: Convert to RLDS and register dataset configs
- [ ] Step 3: Fine-tune OFT+ with FiLM and 3 images
- [ ] Step 4: Start VLA server on GPU machine
- [ ] Step 5: Run client-side robot evaluationpython experiments/robot/aloha/preprocess_split_aloha_data.py \
--dataset_path /path/to/aloha_raw/task_name/ \
--out_base_dir /path/to/aloha_preprocessed/ \
--percent_val 0.05prismatic/vla/datasets/rlds/oxe/configs.pyprismatic/vla/datasets/rlds/oxe/transforms.pyprismatic/vla/datasets/rlds/oxe/mixtures.pyprismatic/vla/constants.pyundefined详细参考:完整的ALOHA服务端-客户端搭建、数据预处理、数据集注册和故障排查指引见 references/aloha-workflow.md
ALOHA进度:
- [ ] 步骤1:预处理原始ALOHA演示数据
- [ ] 步骤2:转换为RLDS格式并注册数据集配置
- [ ] 步骤3:使用FiLM和3路图像输入微调OFT+
- [ ] 步骤4:在GPU机器上启动VLA服务
- [ ] 步骤5:运行客户端侧机器人评估python experiments/robot/aloha/preprocess_split_aloha_data.py \
--dataset_path /path/to/aloha_raw/task_name/ \
--out_base_dir /path/to/aloha_preprocessed/ \
--percent_val 0.05prismatic/vla/datasets/rlds/oxe/configs.pyprismatic/vla/datasets/rlds/oxe/transforms.pyprismatic/vla/datasets/rlds/oxe/mixtures.pyprismatic/vla/constants.pyundefined
**Step 3: Fine-tune OFT+**
```bash
torchrun --standalone --nnodes 1 --nproc-per-node 8 vla-scripts/finetune.py \
--vla_path openvla/openvla-7b \
--data_root_dir /PATH/TO/RLDS/DATASETS/ \
--dataset_name aloha_task_name \
--run_root_dir /YOUR/CHECKPOINTS/ \
--use_l1_regression True \
--use_diffusion False \
--use_film True \
--num_images_in_input 3 \
--use_proprio True \
--batch_size 4 \
--learning_rate 5e-4 \
--num_steps_before_decay 50000 \
--max_steps 100005 \
--use_val_set True \
--val_freq 10000 \
--save_freq 10000 \
--lora_rank 32python vla-scripts/deploy.py \
--pretrained_checkpoint /PATH/TO/FINETUNED/CHECKPOINT/ \
--use_l1_regression True \
--use_film True \
--num_images_in_input 3 \
--use_proprio True \
--center_crop True \
--unnorm_key aloha_task_namehttp://<server-ip>:8777/actpython experiments/robot/aloha/run_aloha_eval.py \
--center_crop True \
--num_open_loop_steps 25 \
--use_vla_server True \
--vla_server_url http://<SERVER_IP>:8777 \
--num_rollouts_planned 50 \
--max_steps 1500
**步骤3:微调OFT+**
```bash
torchrun --standalone --nnodes 1 --nproc-per-node 8 vla-scripts/finetune.py \
--vla_path openvla/openvla-7b \
--data_root_dir /PATH/TO/RLDS/DATASETS/ \
--dataset_name aloha_task_name \
--run_root_dir /YOUR/CHECKPOINTS/ \
--use_l1_regression True \
--use_diffusion False \
--use_film True \
--num_images_in_input 3 \
--use_proprio True \
--batch_size 4 \
--learning_rate 5e-4 \
--num_steps_before_decay 50000 \
--max_steps 100005 \
--use_val_set True \
--val_freq 10000 \
--save_freq 10000 \
--lora_rank 32python vla-scripts/deploy.py \
--pretrained_checkpoint /PATH/TO/FINETUNED/CHECKPOINT/ \
--use_l1_regression True \
--use_film True \
--num_images_in_input 3 \
--use_proprio True \
--center_crop True \
--unnorm_key aloha_task_namehttp://<server-ip>:8777/actpython experiments/robot/aloha/run_aloha_eval.py \
--center_crop True \
--num_open_loop_steps 25 \
--use_vla_server True \
--vla_server_url http://<SERVER_IP>:8777 \
--num_rollouts_planned 50 \
--max_steps 1500| Area | Required consistency | Failure if mismatched |
|---|---|---|
| Action head | | Wrong head loading, invalid actions |
| FiLM | | Reduced language grounding |
| Image streams | | Shape mismatch or performance drop |
| Proprio | | State conditioning mismatch |
| LoRA rank | | Adapter loading errors |
| Crop | | Significant success-rate drop |
| Action chunk | | Latency/success tradeoff shifts |
| Unnorm key | | Bad action scale |
undefined| 领域 | 必须一致的配置 | 不匹配的故障表现 |
|---|---|---|
| 动作头 | | 动作头加载错误、输出无效动作 |
| FiLM | 训练/评估/部署全阶段 | 语言 grounding 效果下降 |
| 图像流 | | 张量形状不匹配或性能下降 |
| 本体感知 | | 状态条件不匹配 |
| LoRA秩 | | 适配器加载错误 |
| 裁剪 | 训练时 | 成功率大幅下降 |
| 动作块 | | 延迟/成功率权衡偏移 |
| 反归一化键 | | 动作输出缩放异常 |
undefined
---
---python vla-scripts/merge_lora_weights_and_save.py \
--base_checkpoint openvla/openvla-7b \
--lora_finetuned_checkpoint_dir /PATH/TO/CHECKPOINT_DIR--unnorm_keyimport torch
ckpt = torch.load("checkpoint/model.pt", map_location="cpu")
print("Available norm keys:", list(ckpt.get("norm_stats", {}).keys()))center_crop=Trueimage_aug=TrueEOFErrorLIBERO_CONFIG_PATHlibfficonda install -c conda-forge libffiflash-attnTMPDIRPIP_CACHE_DIR--no-cache-dirEGL_NOT_INITIALIZEDexport MUJOCO_GL=egl PYOPENGL_PLATFORM=egl
export CUDA_VISIBLE_DEVICES=0 MUJOCO_EGL_DEVICE_ID=0python vla-scripts/merge_lora_weights_and_save.py \
--base_checkpoint openvla/openvla-7b \
--lora_finetuned_checkpoint_dir /PATH/TO/CHECKPOINT_DIR--unnorm_keyimport torch
ckpt = torch.load("checkpoint/model.pt", map_location="cpu")
print("可用的归一化键:", list(ckpt.get("norm_stats", {}).keys()))image_aug=Truecenter_crop=TrueEOFErrorLIBERO_CONFIG_PATHlibfficonda install -c conda-forge libffiflash-attnTMPDIRPIP_CACHE_DIR--no-cache-dirEGL_NOT_INITIALIZEDexport MUJOCO_GL=egl PYOPENGL_PLATFORM=egl
export CUDA_VISIBLE_DEVICES=0 MUJOCO_EGL_DEVICE_ID=0/homeexport HF_HOME=/scratch/$USER/.cache/huggingface
export XDG_CACHE_HOME=/scratch/$USER/.cache
export PIP_CACHE_DIR=/scratch/$USER/.cache/pip
export TMPDIR=/scratch/$USER/tmpmodule load cuda/homeexport HF_HOME=/scratch/$USER/.cache/huggingface
export XDG_CACHE_HOME=/scratch/$USER/.cache
export PIP_CACHE_DIR=/scratch/$USER/.cache/pip
export TMPDIR=/scratch/$USER/tmpmodule load cuda