Skip to content

Commit

Permalink
Simplify the conditional printing of run directories when the compare…
Browse files Browse the repository at this point in the history
…d algorithms have the same name and explain why.
  • Loading branch information
ernestum committed Oct 26, 2023
1 parent 27510b5 commit dcde3a9
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions benchmarking/compute_probability_of_improvement.py
Original file line number Diff line number Diff line change
Expand Up @@ -274,13 +274,14 @@ def main():
reps=args.bootstrap_reps,
)

show_path = args.algo == args.baseline_algo
algo_str = f"{args.algo} ({args.runs_dir})" if show_path else args.algo
baseline_algo_str = (
f"{args.baseline_algo} ({args.baseline_runs_dir})"
if show_path
else args.baseline_algo
)
algo_str = args.algo
baseline_algo_str = args.baseline_algo
if args.algo == args.baseline_algo:
# Only print the run directories if we have to disambiguate the two algorithms
# When we have to different algorithms we can assume the user knows which
# runs_dir and baseline_runs_dir they are using.
algo_str += f" ({args.runs_dir})"
baseline_algo_str += f" ({args.baseline_runs_dir})"

print(
f"Comparison based on {probability_of_improvement_result.n_samples} samples "
Expand Down

0 comments on commit dcde3a9

Please sign in to comment.