Safe remove tmpdir (#4781)
authorCody Yu <comaniac0422@gmail.com>
Tue, 28 Jan 2020 00:10:35 +0000 (16:10 -0800)
committerLianmin Zheng <lianminzheng@gmail.com>
Tue, 28 Jan 2020 00:10:35 +0000 (16:10 -0800)
python/tvm/autotvm/measure/measure_methods.py

index 861719f..68f2955 100644 (file)
@@ -93,7 +93,7 @@ class LocalBuilder(Builder):
     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):