From f6a3a562ae71dcc741188ec14e4b8d567b65ca9e Mon Sep 17 00:00:00 2001 From: Cody Yu Date: Fri, 14 Feb 2020 17:02:57 +0000 Subject: [PATCH] Address comments --- python/tvm/autotvm/tuner/index_based_tuner.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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']