Error while running autotvm demo

Hello, when I was running the autotvm demo: Tuning High Performance Convolution on NVIDIA GPUs — tvm 0.10.dev0 documentation I found that there is an error

Traceback (most recent call last):
  File "/home/wuzheng/Document/pycharm_remote/Ansor_mac/autoTVM_demo/autotvm_conv2d_demo.py", line 214, in <module>
    tuner.tune(
  File "/home/wuzheng/Documents/DNN_AutoSchedule/software/tvm/python/tvm/autotvm/tuner/xgboost_tuner.py", line 105, in tune
    super(XGBTuner, self).tune(*args, **kwargs)
  File "/home/wuzheng/Documents/DNN_AutoSchedule/software/tvm/python/tvm/autotvm/tuner/tuner.py", line 172, in tune
    self.update(inputs, results)
  File "/home/wuzheng/Documents/DNN_AutoSchedule/software/tvm/python/tvm/autotvm/tuner/model_based_tuner.py", line 281, in update
    self.cost_model.fit(self.xs, self.ys, self.plan_size)
  File "/home/wuzheng/Documents/DNN_AutoSchedule/software/tvm/python/tvm/autotvm/tuner/xgboost_cost_model.py", line 179, in fit
    x_train = self._get_feature(xs)
  File "/home/wuzheng/Documents/DNN_AutoSchedule/software/tvm/python/tvm/autotvm/tuner/xgboost_cost_model.py", line 349, in _get_feature
    if t.shape[0] < feature_len:
AttributeError: 'NoneType' object has no attribute 'shape'
Exception ignored in: <function Tracker.__del__ at 0x7f154ad983a0>
Traceback (most recent call last):
  File "/home/wuzheng/Documents/DNN_AutoSchedule/software/tvm/python/tvm/rpc/tracker.py", line 486, in __del__
  File "/home/wuzheng/Documents/DNN_AutoSchedule/software/tvm/python/tvm/rpc/tracker.py", line 481, in terminate
  File "/home/wuzheng/Documents/DNN_AutoSchedule/software/tvm/python/tvm/contrib/popen_pool.py", line 137, in kill
  File "/home/wuzheng/Documents/DNN_AutoSchedule/software/tvm/python/tvm/contrib/popen_pool.py", line 43, in kill_child_processes
ImportError: sys.meta_path is None, Python is likely shutting down
Exception ignored in: <function Server.__del__ at 0x7f16af960ee0>
Traceback (most recent call last):
  File "/home/wuzheng/Documents/DNN_AutoSchedule/software/tvm/python/tvm/rpc/server.py", line 502, in __del__
  File "/home/wuzheng/Documents/DNN_AutoSchedule/software/tvm/python/tvm/rpc/server.py", line 498, in terminate
  File "/home/wuzheng/Documents/DNN_AutoSchedule/software/tvm/python/tvm/contrib/popen_pool.py", line 137, in kill
  File "/home/wuzheng/Documents/DNN_AutoSchedule/software/tvm/python/tvm/contrib/popen_pool.py", line 43, in kill_child_processes
ImportError: sys.meta_path is None, Python is likely shutting down

Process finished with exit code 1

I did not change anything, just changed the number of trials.

Looks like it’s because of the error from the Python interpreter. TVM only supports Python 3.7+ (3.6 may work, not sure about it)

Great! Thanks a lot! My Python version is 3.8. After change it to 3.7, the code works.

I thank maybe the document need to be changed because now it says Python 3.8 is well supported.

Thank you again!

3.8 should work. There are no changes to sys.meta_path in recent Python versions. See sys — System-specific parameters and functions — Python 3.10.6 documentation

Personally, Python 3.8 and 3.9 both work for me in my env