Compare commits

...

4 Commits

Author SHA1 Message Date
Ben Sprenger 2f9bc549a4
Merge 6d0e058186 into b568de35ad 2025-03-28 20:47:06 +03:00
Steven Palma b568de35ad
fix(datasets): cast imgs_dir as Path (#915) 2025-03-28 18:08:12 +01:00
Yongjin Cho ae9c81ac39
fix(docs): correct spelling of 'ffmpeg' in installation instructions (#914) 2025-03-28 17:43:33 +01:00
Ben Sprenger 6d0e058186 fix: reupload dataset card
If a dataset has been modified (e.g. episodes added, removed, or
a new dataset has been re-created under the same name) then the
dataset card should also be reuploaded to match the metadata.

Closes issue: #849
2025-03-19 15:17:54 +01:00
3 changed files with 6 additions and 7 deletions

View File

@ -98,7 +98,7 @@ conda create -y -n lerobot python=3.10
conda activate lerobot conda activate lerobot
``` ```
When using `miniconda`, if you don't have `fffmpeg` in your environment: When using `miniconda`, if you don't have `ffmpeg` in your environment:
```bash ```bash
conda install ffmpeg conda install ffmpeg
``` ```

View File

@ -27,7 +27,6 @@ import torch
import torch.utils import torch.utils
from datasets import concatenate_datasets, load_dataset from datasets import concatenate_datasets, load_dataset
from huggingface_hub import HfApi, snapshot_download from huggingface_hub import HfApi, snapshot_download
from huggingface_hub.constants import REPOCARD_NAME
from huggingface_hub.errors import RevisionNotFoundError from huggingface_hub.errors import RevisionNotFoundError
from lerobot.common.constants import HF_LEROBOT_HOME from lerobot.common.constants import HF_LEROBOT_HOME
@ -560,7 +559,6 @@ class LeRobotDataset(torch.utils.data.Dataset):
else: else:
hub_api.upload_folder(**upload_kwargs) hub_api.upload_folder(**upload_kwargs)
if not hub_api.file_exists(self.repo_id, REPOCARD_NAME, repo_type="dataset", revision=branch):
card = create_lerobot_dataset_card( card = create_lerobot_dataset_card(
tags=tags, dataset_info=self.meta.info, license=license, **card_kwargs tags=tags, dataset_info=self.meta.info, license=license, **card_kwargs
) )

View File

@ -257,6 +257,7 @@ def encode_video_frames(
) -> None: ) -> None:
"""More info on ffmpeg arguments tuning on `benchmark/video/README.md`""" """More info on ffmpeg arguments tuning on `benchmark/video/README.md`"""
video_path = Path(video_path) video_path = Path(video_path)
imgs_dir = Path(imgs_dir)
video_path.parent.mkdir(parents=True, exist_ok=True) video_path.parent.mkdir(parents=True, exist_ok=True)
ffmpeg_args = OrderedDict( ffmpeg_args = OrderedDict(