Xgboost (GPU) crashing while predicting

前端 未结 1 1424
长情又很酷
长情又很酷 2021-01-24 09:01

I am using XGBoost GPU version in Python and it crashes whenever I try to run .predict. It works for a smaller data set but for my current problem it is not working.

         


        
相关标签:
1条回答
  • 2021-01-24 09:11

    Saving the model, deleting the booster then loading the model again should achieve this.

    # training
    bst = xgb.train(param, dtrain, num_round)
    
    #save model
    joblib.dump(bst, 'xgb_model.dat')
    bst.__del__()
    
    #load saved model
    bst = joblib.load('xgb_model.dat')
    preds = bst.predict(dtest)
    
    0 讨论(0)
提交回复
热议问题