Skip to content

Commit

Permalink
disallow video push_to_hub
Browse files Browse the repository at this point in the history
  • Loading branch information
lhoestq committed Oct 30, 2024
1 parent 46e4616 commit a54d018
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/datasets/arrow_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -5400,6 +5400,13 @@ def push_to_hub(
>>> french_dataset = load_dataset("<organization>/<dataset_id>", "fr")
```
"""
if "Video(" in str(self.features):
raise NotImplementedError(
"push_to_hub is not implemented for video datasets, instead you should upload the video files "
"using e.g. the huggingface_hub library and optionally upload a metadata.csv or metadata.jsonl "
"file containing other information like video captions, features or labels. More information "
"at https://huggingface.co/docs/datasets/main/en/video_load#videofolder"
)
if config_name == "data":
raise ValueError("`config_name` cannot be 'data'. Please, choose another name for configuration.")

Expand Down

0 comments on commit a54d018

Please sign in to comment.