I\'m catching up on h2o
\'s MOJO and POJO model format. I\'m able to save a model in MOJO/POJO with
h2o.download_mojo(model, path = \"/media/somewhe
Newer versions of H2O have the ability to import MOJOs via the python API:
# re-import saved MOJO
imported_model = h2o.import_mojo(path)
new_observations = h2o.import_file(path='new_observations.csv')
predictions = imported_model.predict(new_observations)
Caution: MOJO cannot be re-imported into python in older H2O versions, which lack the h2o.import_mojo()
function.
So h2o.save_model()
seems to have lost its role - we can use just my_model.save_mojo()
(notice it's not a h2o
method, but a property of the model object), as these files can be used not just for Java apps deployment, but also in python as well (in fact they still use a python-Java bridge for that internally).