Skip to content

Commit d4f9f39

Browse files
authored
Update speedrun script to load speedrun_results.json from folder depth > 1 (#3079)
Simple 4 line update to load speedrun_results.json files that aren't just at root level in experiments/speedrun/x/. From testing localing, this should pick up ~100 runs from others.
1 parent ca8edb7 commit d4f9f39

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

lib/marin/src/marin/speedrun/create_leaderboard.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,13 @@ class LeaderboardEntry:
6666

6767

6868
def find_speedrun_results(base_path: str) -> list[str]:
69-
fs = fsspec.filesystem(base_path.split("://", 1)[0] if "://" in base_path else "file")
70-
pattern = f"{base_path}/**/speedrun_results.json"
71-
all_results = fs.glob(pattern)
69+
if "://" in base_path:
70+
fs = fsspec.filesystem(base_path.split("://", 1)[0])
71+
pattern = f"{base_path}/**/speedrun_results.json"
72+
all_results = fs.glob(pattern)
73+
else:
74+
# fsspec's local glob doesn't recurse with **, so use pathlib instead.
75+
all_results = [str(p) for p in Path(base_path).glob("**/speedrun_results.json")]
7276

7377
# Filter out excluded speedruns by checking the run name (directory name)
7478
return [path for path in all_results if Path(path).parent.name not in EXCLUDED_SPEEDRUNS]

0 commit comments

Comments
 (0)