Skip to content

Commit

Permalink
better markdown
Browse files Browse the repository at this point in the history
  • Loading branch information
casperdcl committed Oct 20, 2024
1 parent 7c0bc96 commit b27c6ca
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions runner/eval_thresholds.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,7 @@ def pass_time(tensorboard_logfile: PurePath) -> float:
ranks: dict[str, int] = defaultdict(int)
for dataset_name, time_algos in timings.items():
time_algos.sort()
print(dataset_name)
print("=" * len(dataset_name))
print("##", dataset_name)
N = len(time_algos)
rank = 1
for t, algo_name in time_algos:
Expand All @@ -102,11 +101,10 @@ def pass_time(tensorboard_logfile: PurePath) -> float:
else:
_rank = rank
rank += 1
print(f"{_rank}: {algo_name}")
print(f"- {_rank}: {algo_name}")
ranks[algo_name] += _rank
print("\n")

print("Leaderboard")
print("===========")
print("## Leaderboard")
for algo_name, _ in sorted(ranks.items(), key=lambda algo_rank: algo_rank[1]):
print(algo_name)
print("-", algo_name)

0 comments on commit b27c6ca

Please sign in to comment.