英文:
Storing H2o models/MOJO outside the file system
问题
我正在调查将MOJO存储在云存储块或数据库中的可能性。我已经有一个可以工作的概念验证代码,它将MOJO保存到文件,然后加载文件并存储到目标(反之亦然,用于加载),但我想知道是否有任何方法可以跳过文件步骤?我已经研究了Python的BytesIO,但由于h2o mojo API都需要文件路径,我认为我无法使用它。
英文:
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.
答案1
得分: 2
可以使用H2O的REST API来实现。查看model.download_mojo()
以获取从后端获取模型然后使用_process_response()
方法进行保存的参考。关于上传部分,你可以查看h2o.upload_mojo()
。
英文:
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.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论