Python client: raise exception on model pickling describing how to save models in H2O


When user is trying to pickle.dump a model today, it is just serializing the client object state, which is basically useless to recover the model on pickle.load. So a nasty exception is raised when the user tries to load its pickled model.

We should inform the user immediately when s/he's trying to dump the model, by raising an exception explaining the right way to serialize a H2O model, describing the 2 alternatives:

  • binary model to reuse the model between various h2o instances (of the same version).

  • mojo model to productionize the model.

This can be done easily by implementing model_base.__get_state__ , this hook being called by the pickle serializer on dump.


New H2O Bugs

Fix versions


Sebastien Poirier