Skip to content

Commit 69d8784

Browse files
benedikt-voelkelBenedikt Volkel
andauthored
Align number of jobs and trials (#34)
Co-authored-by: Benedikt Volkel <[email protected]>
1 parent 851d6fa commit 69d8784

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/o2tuner/optimise.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,10 @@ def optimise(objective, optuna_config, *, work_dir="o2tuner_optimise", user_conf
5252
run_serial = True
5353
jobs = 1
5454

55+
if trials < jobs:
56+
LOG.info(f"Attempt to do {trials} trials, hence reducing the number of jobs from {jobs} to {trials}")
57+
jobs = trials
58+
5559
trials_list = floor(trials / jobs)
5660
trials_list = [trials_list] * jobs
5761
# add the left-over trials simply to the last job for now

0 commit comments

Comments
 (0)