Skip to content

Commit 6350e9c

Browse files
committed
Fix wrong n_trial number in autotvm tutorials' progress bar
if n_trial is larger then config space.
1 parent 776fd6b commit 6350e9c

File tree

7 files changed

+14
-7
lines changed

7 files changed

+14
-7
lines changed

nnvm/tutorials/tune_nnvm_arm.py

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

309309
# do tuning
310-
tuner_obj.tune(n_trial=min(n_trial, len(tsk.config_space)),
310+
n_trial = min(n_trial, len(tsk.config_space))
311+
tuner_obj.tune(n_trial=n_trial,
311312
early_stopping=early_stopping,
312313
measure_option=measure_option,
313314
callbacks=[

nnvm/tutorials/tune_nnvm_cuda.py

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

206206
# do tuning
207-
tuner_obj.tune(n_trial=min(n_trial, len(tsk.config_space)),
207+
n_trial = min(n_trial, len(tsk.config_space))
208+
tuner_obj.tune(n_trial=n_trial,
208209
early_stopping=early_stopping,
209210
measure_option=measure_option,
210211
callbacks=[

nnvm/tutorials/tune_nnvm_mobile_gpu.py

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

292292
# do tuning
293-
tuner_obj.tune(n_trial=min(n_trial, len(tsk.config_space)),
293+
n_trial = min(n_trial, len(tsk.config_space))
294+
tuner_obj.tune(n_trial=n_trial,
294295
early_stopping=early_stopping,
295296
measure_option=measure_option,
296297
callbacks=[

tutorials/autotvm/tune_relay_arm.py

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

301301
# do tuning
302-
tuner_obj.tune(n_trial=min(n_trial, len(tsk.config_space)),
302+
n_trial = min(n_trial, len(tsk.config_space))
303+
tuner_obj.tune(n_trial=n_trial,
303304
early_stopping=early_stopping,
304305
measure_option=measure_option,
305306
callbacks=[

tutorials/autotvm/tune_relay_cuda.py

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

203203
# do tuning
204-
tuner_obj.tune(n_trial=min(n_trial, len(tsk.config_space)),
204+
n_trial = min(n_trial, len(tsk.config_space))
205+
tuner_obj.tune(n_trial=n_trial,
205206
early_stopping=early_stopping,
206207
measure_option=measure_option,
207208
callbacks=[

tutorials/autotvm/tune_relay_mobile_gpu.py

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

285285
# do tuning
286-
tuner_obj.tune(n_trial=min(n_trial, len(tsk.config_space)),
286+
n_trial = min(n_trial, len(tsk.config_space))
287+
tuner_obj.tune(n_trial=n_trial,
287288
early_stopping=early_stopping,
288289
measure_option=measure_option,
289290
callbacks=[

vta/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)