Open shashwat-nks opened 1 year ago
what happens if you do the following?
batch_predictor = BatchPredictor.from_checkpoint(
self.result.checkpoint, XGBoostPredictor
)
predicted_labels = (
batch_predictor.predict(test_ds)
)
Expected behaviour is observed in the above, i.e., when we train and predict on the go we are able to get the predictions.
I mean what if you don't do the intermediate conversion to native xgboost model and just get self.result.checkpoint
and feed it into batch_predictor like I showed above. Have you tried that?
What happened + What you expected to happen
We are saving and loading a XGBoostTrainer trained model as below, however facing error while loading it most of the times(it works and is able to predict some of the time). This is preventing us from predicting using a saved model.
Versions / Dependencies
2.3.1
Reproduction script
Save:
Load and Predict:
Error being faced:
split_1679035020608/work/src/tree/tree_model.cc:837: Check failed: fi->Read(dmlc::BeginPtr(nodes_), sizeof(Node) * nodes_.size()) == sizeof(Node) * nodes_.size() (980 vs. 10220) :
Issue Severity
High: It blocks me from completing my task.