mc2-project / secure-xgboost

Secure collaborative training and inference for XGBoost.
https://mc2-project.github.io/secure-xgboost/
Apache License 2.0
105 stars 32 forks source link

Enable `load_model()` from result of `save_raw()` #154

Open chester-leung opened 3 years ago

chester-leung commented 3 years ago

In vanilla XGBoost, the user can call load_model() on the output of save_raw() , which is an in-memory buffer – a serialized model.

In Secure XGBoost, we don’t yet support this functionality when we have a remote client. We need to add support for this by transferring the buffer returned from save_raw() over gRPC to the server, where the buffer (instead of a filename string) can be passed to load_model(). To do so, we'll have to modify the gRPC request message for load_model() to optionally contain the serialized buffer (as well as optionally contain a path to a saved model), and pass this serialized buffer to the server side call for load_model().