-
Notifications
You must be signed in to change notification settings - Fork 1
/
delete_repos.py
33 lines (28 loc) · 1.05 KB
/
delete_repos.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
from benchmark_qa import all_augment_cols
from huggingface_hub import delete_repo
from tqdm import tqdm
from huggingface_hub import login
username = "parinzee"
if __name__ == "__main__":
# Confirm
print("Are you sure you want to delete all the repos from claq?")
print("This action cannot be undone.")
print("Type 'yes' to confirm.")
confirm = input("> ")
if confirm.lower() != "yes":
print("Aborting.")
exit()
for col in tqdm(all_augment_cols):
try:
if col:
for ratio in range(1, 11):
ratio = ratio / 10
print(f"Deleting {username}/claq-qa-th-wangchanberta-{col}_{ratio}")
delete_repo(f"{username}/claq-qa-th-wangchanberta-{col}_{ratio}")
else:
print(f"Deleting {username}/claq-qa-th-wangchanberta-original")
delete_repo(f"{username}/claq-qa-th-wangchanberta-original")
except Exception as e:
print(e)
print("Failed to delete repo.")
continue