Update app.py
Browse files
app.py
CHANGED
|
@@ -20,7 +20,7 @@ API = HfApi(token=HF_TOKEN)
|
|
| 20 |
@lru_cache(maxsize=128)
|
| 21 |
def _list_collection_files(pr_number: str) -> Tuple[str, ...]:
|
| 22 |
"""
|
| 23 |
-
Return the `
|
| 24 |
"""
|
| 25 |
prefix = f"pr-{pr_number}"
|
| 26 |
print(f"Looking for files with prefix: {prefix}")
|
|
@@ -29,6 +29,7 @@ def _list_collection_files(pr_number: str) -> Tuple[str, ...]:
|
|
| 29 |
entries = API.list_repo_tree(
|
| 30 |
repo_id=DATASET_ID,
|
| 31 |
repo_type="dataset",
|
|
|
|
| 32 |
recursive=True,
|
| 33 |
)
|
| 34 |
except HfHubHTTPError as error:
|
|
@@ -42,12 +43,12 @@ def _list_collection_files(pr_number: str) -> Tuple[str, ...]:
|
|
| 42 |
# Debug: show all files that match the prefix
|
| 43 |
if entry_type == "file" and entry.path.startswith(prefix):
|
| 44 |
matching_paths.append(entry.path)
|
| 45 |
-
# Filter by prefix and look for
|
| 46 |
-
if entry_type == "file" and entry.path.startswith(prefix) and entry.path.endswith("
|
| 47 |
files.append(entry.path)
|
| 48 |
|
| 49 |
print(f"Found {len(matching_paths)} files with prefix {prefix}")
|
| 50 |
-
print(f"Found {len(files)}
|
| 51 |
if matching_paths:
|
| 52 |
print(f"Sample matching paths: {matching_paths[:5]}")
|
| 53 |
return tuple(files)
|
|
@@ -156,6 +157,8 @@ with gr.Blocks() as demo:
|
|
| 156 |
|
| 157 |
Use the filters below to inspect CircleCI test aggregation records for the Transformers repository (or any
|
| 158 |
repository that uploads data to the `transformers-community/circleci-test-results` dataset).
|
|
|
|
|
|
|
| 159 |
"""
|
| 160 |
)
|
| 161 |
|
|
|
|
| 20 |
@lru_cache(maxsize=128)
|
| 21 |
def _list_collection_files(pr_number: str) -> Tuple[str, ...]:
|
| 22 |
"""
|
| 23 |
+
Return the `failure_summary.json` paths stored for a specific PR.
|
| 24 |
"""
|
| 25 |
prefix = f"pr-{pr_number}"
|
| 26 |
print(f"Looking for files with prefix: {prefix}")
|
|
|
|
| 29 |
entries = API.list_repo_tree(
|
| 30 |
repo_id=DATASET_ID,
|
| 31 |
repo_type="dataset",
|
| 32 |
+
revision="main",
|
| 33 |
recursive=True,
|
| 34 |
)
|
| 35 |
except HfHubHTTPError as error:
|
|
|
|
| 43 |
# Debug: show all files that match the prefix
|
| 44 |
if entry_type == "file" and entry.path.startswith(prefix):
|
| 45 |
matching_paths.append(entry.path)
|
| 46 |
+
# Filter by prefix and look for failure_summary.json files
|
| 47 |
+
if entry_type == "file" and entry.path.startswith(prefix) and entry.path.endswith("failure_summary.json"):
|
| 48 |
files.append(entry.path)
|
| 49 |
|
| 50 |
print(f"Found {len(matching_paths)} files with prefix {prefix}")
|
| 51 |
+
print(f"Found {len(files)} failure_summary.json files")
|
| 52 |
if matching_paths:
|
| 53 |
print(f"Sample matching paths: {matching_paths[:5]}")
|
| 54 |
return tuple(files)
|
|
|
|
| 157 |
|
| 158 |
Use the filters below to inspect CircleCI test aggregation records for the Transformers repository (or any
|
| 159 |
repository that uploads data to the `transformers-community/circleci-test-results` dataset).
|
| 160 |
+
|
| 161 |
+
Files are named `failure_summary.json` and organized as `pr-{PR}/sha-{COMMIT}/failure_summary.json`.
|
| 162 |
"""
|
| 163 |
)
|
| 164 |
|