Add Wall-X serving and Turtle2 TCP WebSocket bridge
Pre-commit / pre-commit (push) Canceled after 0s
Pre-commit / pre-commit (push) Canceled after 0s
This commit is contained in:
@@ -9,6 +9,7 @@ from typing import Protocol, SupportsIndex, TypeVar
|
||||
import numpy as np
|
||||
import torch
|
||||
from lerobot.datasets.lerobot_dataset import LeRobotDataset, LeRobotDatasetMetadata
|
||||
from lerobot.datasets.utils import check_delta_timestamps, get_delta_indices
|
||||
from qwen_vl_utils.vision_process import smart_resize
|
||||
from torch.utils.data import DistributedSampler, random_split
|
||||
from transformers import AutoProcessor
|
||||
@@ -788,6 +789,27 @@ def load_lerobot_data(
|
||||
video_backend="pyav",
|
||||
)
|
||||
|
||||
# Some locally patched LeRobot releases return from timestamp
|
||||
# validation before initializing delta_indices. Restore the normal
|
||||
# upstream behavior so action chunks contain the requested horizon.
|
||||
if (
|
||||
train_dataset.delta_timestamps is not None
|
||||
and train_dataset.delta_indices is None
|
||||
):
|
||||
check_delta_timestamps(
|
||||
train_dataset.delta_timestamps,
|
||||
train_dataset.fps,
|
||||
train_dataset.tolerance_s,
|
||||
)
|
||||
train_dataset.delta_indices = get_delta_indices(
|
||||
train_dataset.delta_timestamps, train_dataset.fps
|
||||
)
|
||||
logger.warning(
|
||||
"[Global rank %s] LeRobot did not initialize delta_indices; "
|
||||
"restored them in Wall-X for action chunk loading",
|
||||
global_rank,
|
||||
)
|
||||
|
||||
logger.info(
|
||||
"[Global rank %s] Finished loading on local_rank=%s",
|
||||
global_rank,
|
||||
|
||||
@@ -10,6 +10,33 @@ import numpy as np
|
||||
import torch
|
||||
from transformers import BatchFeature
|
||||
|
||||
KEY_MAPPINGS = {
|
||||
"lerobot/aloha_mobile_cabinet": {
|
||||
"camera": {
|
||||
"observation.images.cam_high": "face_view",
|
||||
"observation.images.cam_left_wrist": "left_wrist_view",
|
||||
"observation.images.cam_right_wrist": "right_wrist_view",
|
||||
},
|
||||
"state": "observation.state",
|
||||
"action": "action",
|
||||
},
|
||||
"physical-intelligence/libero": {
|
||||
"camera": {
|
||||
"image": "face_view",
|
||||
"wrist_image": "left_wrist_view",
|
||||
},
|
||||
"state": "state",
|
||||
"action": "actions",
|
||||
},
|
||||
"/home/xiehaolv/huanghuagui/dataset/aloha_sim_transfer_cube_human": {
|
||||
"camera": {
|
||||
"observation.images.top": "face_view",
|
||||
},
|
||||
"state": "observation.state",
|
||||
"action": "action",
|
||||
}, ##根据meta查询出来的结果,这一数据集只有"observation.images.top",所以其余部分实际上无法得到引用结果
|
||||
} ##真实进入训练时需要对这一部分进行修改
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user