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/somewhere/tmp") # ok
h2o.download_pojo(model, path = "/media/somewhere/tmp") # ok
which writes an object with name like mymodel.zip or mymodel.java to the directory.
However, it's not clear to me how to read it back into the server in R. I tried,
saved_model2 <- h2o.loadModel("/media/somewhere/tmp/mymodel.java") # not work
saved_model3 <- h2o.loadModel("/media/somewhere/tmp/mymodel.zip") # not work
but got error msg like this,
ERROR: Unexpected HTTP Status code: 400 Bad Request (url = http://localhost:54321/99/Models.bin/)
java.lang.IllegalArgumentException
[1] "java.lang.IllegalArgumentException: Missing magic number 0x1CED at stream start"
....
Error in .h2o.doSafeREST(h2oRestApiVersion = h2oRestApiVersion, urlSuffix = page, :
ERROR MESSAGE:
Missing magic number 0x1CED at stream start