Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/datasets/commands/convert_to_parquet.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from typing import Optional

from huggingface_hub import HfApi, create_branch, get_repo_discussions
from huggingface_hub.utils import HfHubHTTPError

from datasets import get_dataset_config_names, get_dataset_default_config_name, load_dataset
from datasets.commands import BaseDatasetsCLICommand
Expand Down Expand Up @@ -91,7 +92,10 @@ def run(self) -> None:
time.sleep(5)
delete_files(dataset_id, revision=pr_revision, token=token)
if not revision:
create_branch(dataset_id, branch="script", repo_type="dataset", token=token, exist_ok=True)
try:
create_branch(dataset_id, branch="script", repo_type="dataset", token=token, exist_ok=True)
except HfHubHTTPError:
pass
print(f"You can find your PR to convert the dataset to Parquet at: {pr_url}")


Expand Down