Spaces:
Running on Zero
Running on Zero
Commit ·
10c1a7b
1
Parent(s): f152e6e
Narrow try/except to only the list_repo_tree API call
Browse filesCo-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- logging_utils.py +2 -5
logging_utils.py
CHANGED
|
@@ -87,14 +87,11 @@ def _make_path(now, uid):
|
|
| 87 |
|
| 88 |
def _list_existing_files(api, repo_id):
|
| 89 |
try:
|
| 90 |
-
|
| 91 |
-
f.path
|
| 92 |
-
for f in api.list_repo_tree(repo_id, repo_type="dataset", path_in_repo="data")
|
| 93 |
-
if f.path.endswith(".parquet")
|
| 94 |
-
)
|
| 95 |
except Exception as e:
|
| 96 |
print(f"[log] could not list existing files (empty repo?): {e}")
|
| 97 |
return []
|
|
|
|
| 98 |
|
| 99 |
|
| 100 |
def _build_add_ops(batch):
|
|
|
|
| 87 |
|
| 88 |
def _list_existing_files(api, repo_id):
|
| 89 |
try:
|
| 90 |
+
entries = api.list_repo_tree(repo_id, repo_type="dataset", path_in_repo="data")
|
|
|
|
|
|
|
|
|
|
|
|
|
| 91 |
except Exception as e:
|
| 92 |
print(f"[log] could not list existing files (empty repo?): {e}")
|
| 93 |
return []
|
| 94 |
+
return sorted(f.path for f in entries if f.path.endswith(".parquet"))
|
| 95 |
|
| 96 |
|
| 97 |
def _build_add_ops(batch):
|