mrunyan1's picture
Add files using upload-large-folder tool
a2a6348 verified
Raw History Blame Contribute Delete
714 Bytes
#!/usr/bin/env python
"""upload splaire-haec-sqtl-credible-sets to huggingface hub. resumable, parallel."""
from pathlib import Path
from huggingface_hub import HfApi, upload_large_folder
REPO_ID = "mrunyan1/splaire-haec-sqtl-credible-sets"
STAGING = Path("/scratch/runyan.m/hf_uploads/splaire-haec-sqtl-credible-sets")
api = HfApi()
# expects repo already created on the hub. uncomment to create:
# api.create_repo(repo_id=REPO_ID, repo_type="dataset", exist_ok=True, private=False)
# upload everything in STAGING. handles LFS automatically, resumable across retries
upload_large_folder(
folder_path=str(STAGING),
repo_id=REPO_ID,
repo_type="dataset",
num_workers=4,
print_report=True,
)