Skip to content

Commit

Permalink
Align number of jobs and trials (#34)
Browse files Browse the repository at this point in the history
Co-authored-by: Benedikt Volkel <benedikt.volkel@cern.ch>
  • Loading branch information
benedikt-voelkel and Benedikt Volkel authored Sep 27, 2022
1 parent 851d6fa commit 69d8784
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/o2tuner/optimise.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@ def optimise(objective, optuna_config, *, work_dir="o2tuner_optimise", user_conf
run_serial = True
jobs = 1

if trials < jobs:
LOG.info(f"Attempt to do {trials} trials, hence reducing the number of jobs from {jobs} to {trials}")
jobs = trials

trials_list = floor(trials / jobs)
trials_list = [trials_list] * jobs
# add the left-over trials simply to the last job for now
Expand Down

0 comments on commit 69d8784

Please sign in to comment.