mirror of
https://github.com/huggingface/lerobot.git
synced 2026-05-25 13:40:00 +00:00
feat(is_depth): simplifying is_depth nested name + legacy support
This commit is contained in:
@@ -59,7 +59,7 @@ DEPTH_FEATURES = {
|
||||
"dtype": "video",
|
||||
"shape": (64, 96, 1),
|
||||
"names": ["height", "width", "channels"],
|
||||
"info": {"video.is_depth_map": True},
|
||||
"info": {"is_depth_map": True},
|
||||
},
|
||||
}
|
||||
|
||||
@@ -155,7 +155,7 @@ def test_create_without_videos_has_no_video_path(tmp_path):
|
||||
|
||||
|
||||
def test_depth_keys_property_filters_by_marker(tmp_path):
|
||||
"""``depth_keys`` selects only video features carrying ``video.is_depth_map=True``."""
|
||||
"""``depth_keys`` selects only features carrying ``is_depth_map=True`` in info."""
|
||||
features = {
|
||||
**VIDEO_FEATURES,
|
||||
**DEPTH_FEATURES,
|
||||
@@ -164,8 +164,8 @@ def test_depth_keys_property_filters_by_marker(tmp_path):
|
||||
repo_id="test/depth_keys", fps=DEFAULT_FPS, features=features, root=tmp_path / "depth_keys"
|
||||
)
|
||||
|
||||
assert set(meta.video_keys) == {"observation.images.laptop", "observation.depth.laptop"}
|
||||
assert meta.depth_keys == ["observation.depth.laptop"]
|
||||
assert set(meta.video_keys) == {"observation.images.laptop", "observation.images.laptop_depth"}
|
||||
assert meta.depth_keys == ["observation.images.laptop_depth"]
|
||||
|
||||
|
||||
def test_depth_keys_empty_when_no_marker(tmp_path):
|
||||
|
||||
Reference in New Issue
Block a user