File size: 714 Bytes
a2a6348
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/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,
)