xgboost
xgboost copied to clipboard
Problem predicting in CPU using a model trained in GPU
I am having some problems using the predict function of the xgboost package. It seems to originate from the fact that the machine was trained in a GPU but the prediction take place in a CPU only machine. I have also posted the issue here because I am not sure this issue arises from xgboost or mlr3. I have also seen that the issue has appeared in the python version here.
Here is my code:
library(mlr3)
d <- fread('path/to/data')
modelup$predict_newdata(d)
error print:
[20:44:33] WARNING: amalgamation/../src/gbm/gbtree.cc:386: Loading from a raw memory buffer on CPU only machine. Changing tree_method to hist.
Error in doTryCatch(return(expr), name, parentenv, handler) :
[20:44:33] amalgamation/../src/tree/tree_updater.cc:20: Unknown tree updater grow_gpu_hist
I am currently using the version 1.5.1 of xgboost.
Hi, here's my guess on what happened:
- The training parameter
updateris used instead oftree_method. Please choose the latter instead. - The model is not persisted using
xgb.save, please consider using this function for model serialization.
Closing as stalled. Feel free to reopen if there's any new info.