mujoco_lerobot_train
Minimal MuJoCo + LeRobot pipeline for:
- collecting a standard LeRobot dataset
- visualizing the dataset with
lerobot-dataset-viz - training an ACT policy with
lerobot-train - running closed-loop MuJoCo evaluation with the trained policy
This directory is intentionally small. All parameters are read from one file:
config.json
这是一个最小化的 MuJoCo + LeRobot 工程,包含 4 步:
- 用 MuJoCo 采集标准 LeRobot 数据集
- 用
lerobot-dataset-viz可视化数据 - 用
lerobot-train训练 ACT 策略 - 在 MuJoCo 中闭环评估训练好的策略
整个目录尽量保持小而清晰,所有参数都只从一个文件读取:
config.json
Dependencies
mujocolerobot
See:
requirements.txt
依赖
mujocolerobot
依赖文件见:
requirements.txt
Files
collect_dataset.py: collect a MuJoCo pick-place dataset in LeRobot formatviz_dataset.py: openlerobot-dataset-vizfor the configured datasettrain_policy.py: Python entry that reads config and launches trainingeval_policy.py: closed-loop MuJoCo evaluation using the trained policycommon.py: shared minimal implementationconfig.json: all parameters
文件说明
collect_dataset.py:采集 MuJoCo 抓取放置数据,并写成 LeRobot 标准格式viz_dataset.py:调用lerobot-dataset-viz可视化当前数据集train_policy.py:读取配置后启动训练eval_policy.py:在 MuJoCo 中闭环评估训练好的策略common.py:公共最小实现config.json:全部参数
Run
Activate your environment first:
conda activate lerobot
cd mujoco_lerobot_train
运行
先激活环境并进入目录:
conda activate lerobot
cd mujoco_lerobot_train
Collect dataset:
python collect_dataset.py
Visualize dataset:
python viz_dataset.py
Train with the Python entry:
python train_policy.py
Closed-loop MuJoCo evaluation:
python eval_policy.py
闭环 MuJoCo 评估:
python eval_policy.py
Config
config.json controls:
- dataset repo id and local root
- image size and fps
- number of episodes
- ACT training hyperparameters
- evaluation episodes and playback speed
配置
config.json 统一控制:
- 数据集 repo id 和本地路径
- 图像分辨率和 fps
- episode 数量
- ACT 训练参数
- 评估轮数和播放速度
Upload To Hugging Face
Login first:
huggingface-cli login
上传到 Hugging Face
先登录:
huggingface-cli login
Then upload this folder:
bash ./upload_to_hf.sh <user_or_org>/<repo_name>
Private repo:
HF_PRIVATE=1 bash ./upload_to_hf.sh <user_or_org>/<repo_name>
Dataset repo instead of model repo:
HF_REPO_TYPE=dataset bash ./upload_to_hf.sh <user_or_org>/<repo_name>
Ignored during upload:
outputs/__pycache__/*.pyc
上传时会自动忽略:
outputs/__pycache__/*.pyc
- Downloads last month
- 41