I have been trying to train a XGBoost model in a Jupyter Notebook. I installed XGboost(GPU) by following commands:
git clone — recursive https://github.com/dmlc/xgboost
cd xgboost
mkdir build
cd build
cmake .. -DUSE_CUDA=ON
make -j
But whenever I try to train the model but model.fit, the kernel restarts after a few minutes.
code:
params = { 'max_depth': 50, 'n_estimators':80, 'learning_rate':0.1, 'colsample_bytree':7, 'gamma':0, 'reg_alpha':4, 'objective':'binary:logistic', 'eta':0.3, 'silent':1, 'subsample':0.8, 'tree_method':'gpu_hist', 'predictor':'gpu_predictor',}
xgb_model = xgb.XGBClassifier(**params).fit(X_train, y_train)
xgb_prediction = xgb_model.predict(X_valid)
where X_train and y_train are derived form sklearn TfidfVectorizer
I have cuda installed,
cat /usr/local/cuda/version.txt gives : CUDA Version 10.2.89