mirror of
https://github.com/huggingface/lerobot.git
synced 2026-07-24 02:06:15 +00:00
fix: DEFAULT FEATURES must be present when creating metadata. If not, then we raise. this is a first step towards standardazing the dataset format, or otherwise (as it is now) everything would be allowed
This commit is contained in:
@@ -512,7 +512,9 @@ class LeRobotDatasetMetadata:
|
|||||||
|
|
||||||
obj.root.mkdir(parents=True, exist_ok=False)
|
obj.root.mkdir(parents=True, exist_ok=False)
|
||||||
|
|
||||||
features = {**features, **DEFAULT_FEATURES}
|
assert set(DEFAULT_FEATURES.keys()).issubset(set(features.keys())), (
|
||||||
|
f"Default features must be a subset of the provided features! Got {set(features.keys())} and {set(DEFAULT_FEATURES.keys())}"
|
||||||
|
)
|
||||||
_validate_feature_names(features)
|
_validate_feature_names(features)
|
||||||
|
|
||||||
obj.tasks = None
|
obj.tasks = None
|
||||||
|
|||||||
Reference in New Issue
Block a user