fix(benchmark/reports): Resolve error in format.py on attempt.cost is None

This commit is contained in:
Reinier van der Leer
2024-02-29 19:00:44 +01:00
parent 2c96f6125f
commit c26c79c34c

View File

@@ -102,7 +102,8 @@ def print_markdown_report(report_json_file: str):
f"in **{attempt.run_time}** " f"in **{attempt.run_time}** "
f"and **{quantify('step', attempt.n_steps)}**\n" f"and **{quantify('step', attempt.n_steps)}**\n"
) )
click.echo(f" - **Cost:** `${round(attempt.cost, 3)}`") if attempt.cost is not None:
click.echo(f" - **Cost:** `${round(attempt.cost, 3)}`")
if attempt.fail_reason: if attempt.fail_reason:
click.echo( click.echo(
" - **Failure reason:**\n" " - **Failure reason:**\n"