Skip to content

Commit

Permalink
Make convert_to_parquet CLI command create script branch
Browse files Browse the repository at this point in the history
  • Loading branch information
albertvillanova committed Apr 15, 2024
1 parent a3bc89d commit ab88f73
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/datasets/commands/convert_to_parquet.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from argparse import ArgumentParser
from typing import Optional

from huggingface_hub import HfApi, get_repo_discussions
from huggingface_hub import HfApi, create_branch, get_repo_discussions

from datasets import get_dataset_config_names, get_dataset_default_config_name, load_dataset
from datasets.commands import BaseDatasetsCLICommand
Expand Down Expand Up @@ -88,6 +88,8 @@ 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)
print(f"You can find your PR to convert the dataset to Parquet at: {pr_url}")


Expand Down

0 comments on commit ab88f73

Please sign in to comment.