xgboost交叉验证以及n_jobs报错


今天用xgboost跑了一下分类发生如下报错:

A worker process managed by the executor was unexpectedly terminated.

This could be caused by a segmentation fault while calling the function or by an excessive memory usage causing the Operating System to kill the worker.

 

这是显存不足造成的。

 

解决方案

制定富裕空间的显卡

import os

os.environ["CUDA_VISIBLE_DEVICES"] = "0"

注意,用jupyter发生报错时候可以尝试本地脚本跑!


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM