style(deprecated method): remove no longer used get_features_from_robot function (replaced by hw_to_dataset_features) (#1560)
This commit is contained in:
@@ -41,7 +41,6 @@ from lerobot.datasets.backward_compatibility import (
|
|||||||
BackwardCompatibilityError,
|
BackwardCompatibilityError,
|
||||||
ForwardCompatibilityError,
|
ForwardCompatibilityError,
|
||||||
)
|
)
|
||||||
from lerobot.robots import Robot
|
|
||||||
from lerobot.utils.utils import is_valid_numpy_dtype_string
|
from lerobot.utils.utils import is_valid_numpy_dtype_string
|
||||||
|
|
||||||
DEFAULT_CHUNK_SIZE = 1000 # Max number of episodes per chunk
|
DEFAULT_CHUNK_SIZE = 1000 # Max number of episodes per chunk
|
||||||
@@ -440,16 +439,6 @@ def build_dataset_frame(
|
|||||||
return 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]:
|
def dataset_to_policy_features(features: dict[str, dict]) -> dict[str, PolicyFeature]:
|
||||||
# TODO(aliberts): Implement "type" in dataset features and simplify this
|
# TODO(aliberts): Implement "type" in dataset features and simplify this
|
||||||
policy_features = {}
|
policy_features = {}
|
||||||
|
|||||||
Reference in New Issue
Block a user