TVM运行报错:ImportError: cannot import name ‘EarlyStopException‘ from ‘xgboost.core‘

[Task  1/95]  Current/Best:  125.21/ 165.29 GFLOPS | Progress: (48/1000) | 93.94 sTraceback (most recent call last):
  File "ssd_tvm_zjj.py", line 151, in <module>
    autotvm.callback.log_to_file(tuning_option["tuning_records"]),
  File "/home/dl3/ZJJ/TVM_source/tvm/python/tvm/autotvm/tuner/xgboost_tuner.py", line 105, in tune
    super(XGBTuner, self).tune(*args, **kwargs)
  File "/home/dl3/ZJJ/TVM_source/tvm/python/tvm/autotvm/tuner/tuner.py", line 169, in tune
    self.update(inputs, results)
  File "/home/dl3/ZJJ/TVM_source/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/dl3/ZJJ/TVM_source/tvm/python/tvm/autotvm/tuner/xgboost_cost_model.py", line 210, in fit
    verbose_eval=self.log_interval,
  File "/home/dl3/ZJJ/TVM_source/tvm/python/tvm/autotvm/tuner/xgboost_cost_model.py", line 462, in custom_callback
    from xgboost.core import EarlyStopException
ImportError: cannot import name 'EarlyStopException' from 'xgboost.core' (/home/dl3/anaconda3/envs/WH/lib/python3.7/site-packages/xgboost/core.py)
 Done.

解决办法:pip install xgboost==1.5.0

参考网址: Auto Scheduler (Ansor) XGBoost cost model import error - Troubleshooting - Apache TVM Discuss

  • 2
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值