# \[Autotvm\] stuck during tuning

**URL:** <https://discuss.tvm.apache.org/t/autotvm-stuck-during-tuning/6011>\
**Category:** Troubleshooting\
**Created:** [March 17, 2020, 9:34pm UTC](https://discuss.tvm.apache.org/t/autotvm-stuck-during-tuning/6011 "2020-03-17T21:34:00Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rms45](https://discuss.tvm.apache.org/letter_avatar_proxy/v4/letter/r/7bcc69/32.png) [@Rms45](https://discuss.tvm.apache.org/u/Rms45)\
**Post date:** [March 17, 2020, 9:34pm UTC](https://discuss.tvm.apache.org/t/autotvm-stuck-during-tuning/6011/1 "2020-03-17T21:34:00Z")

</div>

I am tuning a resnet-18 network and below is the tuning parameters. The tuning is stuck at 60/1000 , irrespective of the value of n\_trails and early\_stopping(as long as n\_trails is \< 60, tuning works).

> tuning\_option = { # ‘log\_filename’: log\_file,
> 
> ```
> 'tuner': 'xgb',
> 'n_trial': 1000,
> 'early_stopping': 600,
> 
> 'measure_option': autotvm.measure_option(
> builder=autotvm.LocalBuilder(timeout=10),
> runner=autotvm.LocalRunner(number=10, repeat=3, timeout=4, min_repeat_ms=150),
> # runner=autotvm.RPCRunner(
> # '1080ti', # change the device key to your key
> # '0.0.0.0', 9190,
> # number=20, repeat=3, timeout=4, min_repeat_ms=150)
> ),
> 
> ```
> 
> }

tuning output:(first line prints - len(tsk.config\_space),n\_trial,tsk\_trial)

> 462000 1000 1000 [Task 1/16] Current/Best: 55.86/ 327.70 GFLOPS | Progress: (60/1000) | 136.54 s

---

<div class="post-metadata">

**Author:** ![comaniac](https://discuss.tvm.apache.org/user_avatar/discuss.tvm.apache.org/comaniac/32/899_2.png) [@comaniac](https://discuss.tvm.apache.org/u/comaniac)\
**Post date:** [March 17, 2020, 10:08pm UTC](https://discuss.tvm.apache.org/t/autotvm-stuck-during-tuning/6011/2 "2020-03-17T22:08:26Z")

</div>

You can try random tuner first to see if it’s an issue from XGBoost.

---

<div class="post-metadata">

**Author:** ![Rms45](https://discuss.tvm.apache.org/letter_avatar_proxy/v4/letter/r/7bcc69/32.png) [@Rms45](https://discuss.tvm.apache.org/u/Rms45)\
**Post date:** [March 18, 2020, 8:56am UTC](https://discuss.tvm.apache.org/t/autotvm-stuck-during-tuning/6011/3 "2020-03-18T08:56:27Z")

</div>

Random tuner works. The issue is with XGBoost. How can i fix this?

---

<div class="post-metadata">

**Author:** ![Rms45](https://discuss.tvm.apache.org/letter_avatar_proxy/v4/letter/r/7bcc69/32.png) [@Rms45](https://discuss.tvm.apache.org/u/Rms45)\
**Post date:** [March 18, 2020, 3:09pm UTC](https://discuss.tvm.apache.org/t/autotvm-stuck-during-tuning/6011/4 "2020-03-18T15:09:09Z")

</div>

XGBoost stops only temporarily at the 60th config and proceeds after waiting for a long time. Tuning one task to completion(n\_trails=500) seems to take around one hour. Is there any way to speed it up?

---

<div class="post-metadata">

**Author:** ![comaniac](https://discuss.tvm.apache.org/user_avatar/discuss.tvm.apache.org/comaniac/32/899_2.png) [@comaniac](https://discuss.tvm.apache.org/u/comaniac)\
**Post date:** [March 18, 2020, 4:23pm UTC](https://discuss.tvm.apache.org/t/autotvm-stuck-during-tuning/6011/5 "2020-03-18T16:23:23Z")

</div>

The time was used to train a search model but it’s not usual to take that long. A recent issue suggests to use XGBoost 0.9.0 to avoid some unexpected errors. You could take a try, but I’m not sure if it works for your case.
