From d54036a909b9157d15b26462499aba10bbf920c8 Mon Sep 17 00:00:00 2001 From: Cody Yu Date: Mon, 27 Jan 2020 16:10:35 -0800 Subject: [PATCH] Safe remove tmpdir (#4781) --- python/tvm/autotvm/measure/measure_methods.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/tvm/autotvm/measure/measure_methods.py b/python/tvm/autotvm/measure/measure_methods.py index 861719fffe53..68f2955b05aa 100644 --- a/python/tvm/autotvm/measure/measure_methods.py +++ b/python/tvm/autotvm/measure/measure_methods.py @@ -93,7 +93,7 @@ def __init__(self, timeout=10, n_parallel=None, build_func='default'): def build(self, measure_inputs): results = [] - shutil.rmtree(self.tmp_dir) + shutil.rmtree(self.tmp_dir, ignore_errors=True) self.tmp_dir = tempfile.mkdtemp() for i in range(0, len(measure_inputs), self.n_parallel):