mirror of
https://github.com/huggingface/lerobot.git
synced 2026-05-31 19:01:28 +00:00
fix(features): allowing for sequence of shape (1,) when a names list is provided
This commit is contained in:
@@ -578,7 +578,7 @@ def get_hf_features_from_features(features: dict) -> datasets.Features:
|
||||
continue
|
||||
elif ft["dtype"] == "image":
|
||||
hf_features[key] = datasets.Image()
|
||||
elif ft["shape"] == (1,):
|
||||
elif ft["shape"] == (1,) and ft["names"] is None:
|
||||
hf_features[key] = datasets.Value(dtype=ft["dtype"])
|
||||
elif len(ft["shape"]) == 1:
|
||||
hf_features[key] = datasets.Sequence(
|
||||
|
||||
Reference in New Issue
Block a user