"""Upload ToolFault-Bench to the Hugging Face Hub. pip install -U huggingface_hub hf auth login # older versions: huggingface-cli login (needs a token with write access) python push.py # public dataset at ATTY57/toolfault-bench python push.py --private # upload privately first to review the page """ import argparse import os from huggingface_hub import HfApi ap = argparse.ArgumentParser() ap.add_argument("--repo", default="ATTY57/toolfault-bench") ap.add_argument("--private", action="store_true") a = ap.parse_args() here = os.path.dirname(os.path.abspath(__file__)) api = HfApi() api.create_repo(a.repo, repo_type="dataset", private=a.private, exist_ok=True) api.upload_folder( folder_path=here, repo_id=a.repo, repo_type="dataset", allow_patterns=["README.md", "LICENSE-CODE", "requirements.txt", "evaluate.py", "push.py", "data/*.parquet", "scripts/*.py", "results/*/metrics.json"], commit_message="ToolFault-Bench v1.0", ) print(f"Done: https://huggingface.co/datasets/{a.repo}")