存储 H2O 模型/MOJO 文件到文件系统之外

huangapple go评论112阅读模式
英文:

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.

huangapple
  • 本文由 发表于 2023年3月7日 00:37:33
  • 转载请务必保留本文链接:https://go.coder-hub.com/75653463.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定