Skip to content

Commit

Permalink
Start progress bar with previous results
Browse files Browse the repository at this point in the history
  • Loading branch information
stephane-caron committed Dec 6, 2024
1 parent 091058b commit dc2a298
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions qpbenchmark/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,15 @@ def run(
start_counter = perf_counter()
last_save = perf_counter()

nb_problems = 1 if only_problem else test_set.count_problems()
nb_solvers = len(filtered_solvers)
nb_settings = len(filtered_settings)
tqdm_total = nb_problems * nb_solvers * nb_settings
progress_bar = None if verbose else tqdm(total=tqdm_total)
progress_bar = None
if not verbose:
nb_problems = 1 if only_problem else test_set.count_problems()
nb_solvers = len(filtered_solvers)
nb_settings = len(filtered_settings)
progress_bar = tqdm(
total=nb_problems * nb_solvers * nb_settings,
initial=results.nb_rows,
)

for problem in test_set:
if only_problem and problem.name != only_problem:
Expand Down

0 comments on commit dc2a298

Please sign in to comment.