Skip to content

Commit 8322792

Browse files
committed
include leaderboard results in report
1 parent 6e7b751 commit 8322792

1 file changed

Lines changed: 20 additions & 1 deletion

File tree

src/discord-cluster-manager/report.py

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ async def _send_split_log(thread: discord.Thread, partial_message: str, header:
2626
if len(partial_message) + len(line) < 1900:
2727
partial_message += line + "\n"
2828
else:
29-
chunks.append(partial_message)
29+
if partial_message != "":
30+
chunks.append(partial_message)
3031
partial_message = line
3132

3233
if partial_message != "":
@@ -258,6 +259,24 @@ async def generate_report(thread: discord.Thread, runs: dict[str, EvalResult]):
258259
make_benchmark_log(bench_run),
259260
)
260261

262+
if "leaderboard" in runs:
263+
bench_run = runs["leaderboard"]
264+
if bench_run.compilation is not None and not bench_run.compilation.success:
265+
await _generate_compile_report(thread, bench_run.compilation)
266+
return
267+
268+
bench_run = bench_run.run
269+
if not bench_run.success:
270+
await _generate_crash_report(thread, bench_run)
271+
return
272+
273+
message = await _send_split_log(
274+
thread,
275+
message,
276+
"Ranked Benchmark",
277+
make_benchmark_log(bench_run),
278+
)
279+
261280
if "script" in runs:
262281
run = runs["script"]
263282
if run.compilation is not None and not run.compilation.success:

0 commit comments

Comments
 (0)