From 6fe42a72dbb6f4fc2d6481acbd962def900ec8dc Mon Sep 17 00:00:00 2001 From: Simon Alibert Date: Wed, 19 Feb 2025 15:01:44 +0100 Subject: [PATCH] Add tag --- examples/port_datasets/pusht_zarr.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/examples/port_datasets/pusht_zarr.py b/examples/port_datasets/pusht_zarr.py index e05c742e..4ff361cb 100644 --- a/examples/port_datasets/pusht_zarr.py +++ b/examples/port_datasets/pusht_zarr.py @@ -3,9 +3,10 @@ from pathlib import Path import numpy as np import torch +from huggingface_hub import HfApi from lerobot.common.constants import HF_LEROBOT_HOME -from lerobot.common.datasets.lerobot_dataset import LeRobotDataset +from lerobot.common.datasets.lerobot_dataset import CODEBASE_VERSION, LeRobotDataset from lerobot.common.datasets.push_dataset_to_hub._download_raw import download_raw PUSHT_TASK = "Push the T-shaped blue block onto the T-shaped green target surface." @@ -203,6 +204,8 @@ def main(raw_dir: Path, repo_id: str, mode: str = "video", push_to_hub: bool = T if push_to_hub: dataset.push_to_hub() + hub_api = HfApi() + hub_api.create_tag(repo_id, tag=CODEBASE_VERSION, repo_type="dataset") if __name__ == "__main__":