Spaces:
Running
Running
df fixes
Browse files
src/leaderboard/build_leaderboard.py
CHANGED
@@ -23,12 +23,19 @@ def time_diff_wrapper(func):
|
|
23 |
|
24 |
return wrapper
|
25 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
26 |
|
27 |
@time_diff_wrapper
|
28 |
def download_dataset(repo_id, local_dir, repo_type="dataset", max_attempts=3, backoff_factor=1.5):
|
29 |
"""Download dataset with exponential backoff retries."""
|
30 |
-
os.makedirs(local_dir, exist_ok=True)
|
31 |
-
os.
|
32 |
attempt = 0
|
33 |
while attempt < max_attempts:
|
34 |
try:
|
|
|
23 |
|
24 |
return wrapper
|
25 |
|
26 |
+
def chmod_recursive(path, mode):
|
27 |
+
os.chmod(path, mode)
|
28 |
+
for root, dirs, files in os.walk(path):
|
29 |
+
for dir in dirs:
|
30 |
+
os.chmod(os.path.join(root, dir), mode)
|
31 |
+
for file in files:
|
32 |
+
os.chmod(os.path.join(root, file), mode)
|
33 |
|
34 |
@time_diff_wrapper
|
35 |
def download_dataset(repo_id, local_dir, repo_type="dataset", max_attempts=3, backoff_factor=1.5):
|
36 |
"""Download dataset with exponential backoff retries."""
|
37 |
+
os.makedirs(local_dir,777, exist_ok=True)
|
38 |
+
os.makedirs('./tmp',777, exist_ok=True)
|
39 |
attempt = 0
|
40 |
while attempt < max_attempts:
|
41 |
try:
|