Skip to content

Commit 94354d6

Browse files
dati91tmoreau89
authored andcommitted
Fix wrong n_trial number in autotvm tutorials' progress bar (apache#4070)
if n_trial is larger then config space.
1 parent 89be933 commit 94354d6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tutorials/autotvm/tune_relay_vta.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,8 @@ def tune_tasks(tasks,
274274
tuner_obj.load_history(autotvm.record.load_from_file(tmp_log_file))
275275

276276
# do tuning
277-
tuner_obj.tune(n_trial=min(n_trial, len(tsk.config_space)),
277+
n_trial = min(n_trial, len(tsk.config_space))
278+
tuner_obj.tune(n_trial=n_trial,
278279
early_stopping=early_stopping,
279280
measure_option=measure_option,
280281
callbacks=[

0 commit comments

Comments
 (0)