I'm investigating the possibility of storing MOJOs in cloud storage blobs and/or a database. I have proof-of-concept code working that saves the MOJO to a file then loads the file and stores to the target (and vice-versa for loading), but I'd like to know if there's any way to skip the file step? I've looked into python's BytesIO, but since the h2o mojo APIs all require a file-path I don't think I can use it.
It's possible using the H2O's REST API. Have a look at model.download_mojo()
for the reference which gets the model from the backend and then persists it using the _process_response()
method. You can have a look at h2o.upload_mojo()
for the uploading part.