diff --git a/python/tvm/autotvm/tuner/index_based_tuner.py b/python/tvm/autotvm/tuner/index_based_tuner.py index 0404ddbfe837a..8d8e2d2d3c585 100644 --- a/python/tvm/autotvm/tuner/index_based_tuner.py +++ b/python/tvm/autotvm/tuner/index_based_tuner.py @@ -60,7 +60,7 @@ def next_batch(self, batch_size): ret = [] for _ in range(batch_size): if self.counter >= self.range_length: - continue + break index = self.counter + self.index_offset ret.append(self.task.config_space.get(index)) self.counter = self.counter + 1 @@ -115,7 +115,7 @@ def next_batch(self, batch_size): return ret def __getstate__(self): - return {"visited": self.counter} + return {"visited": self.visited} def __setstate__(self, state): self.counter = state['visited']