style(deprecated method): remove no longer used get_features_from_robot function (replaced by hw_to_dataset_features) (#1560)

This commit is contained in:
Caroline Pascal
2025-07-21 19:12:03 +02:00
committed by GitHub
parent f6ec1d89a5
commit 9b9f4757fb

View File

@@ -41,7 +41,6 @@ from lerobot.datasets.backward_compatibility import (
BackwardCompatibilityError,
ForwardCompatibilityError,
)
from lerobot.robots import Robot
from lerobot.utils.utils import is_valid_numpy_dtype_string
DEFAULT_CHUNK_SIZE = 1000 # Max number of episodes per chunk
@@ -440,16 +439,6 @@ def build_dataset_frame(
return frame
def get_features_from_robot(robot: Robot, use_videos: bool = True) -> dict:
camera_ft = {}
if robot.cameras:
camera_ft = {
key: {"dtype": "video" if use_videos else "image", **ft}
for key, ft in robot.camera_features.items()
}
return {**robot.motor_features, **camera_ft, **DEFAULT_FEATURES}
def dataset_to_policy_features(features: dict[str, dict]) -> dict[str, PolicyFeature]:
# TODO(aliberts): Implement "type" in dataset features and simplify this
policy_features = {}