【问题标题】:How to run h2o AutoML by using rest api?如何使用 rest api 运行 h2o AutoML?
【发布时间】:2019-02-24 15:39:22
【问题描述】:

我想通过使用 rest api 在 h2o 中运行 AutoML?我知道网址是 /99/AutoMLBuilder。但我不知道如何发送参数。官方网站上没有示例代码。我可以使用 curl 访问模型导入/导出,因为参数是平坦的。但似乎 AutoML 的参数可能是嵌套的,我找不到任何关于参数格式的示例代码或答案。

【问题讨论】:

    标签: rest h2o automl


    【解决方案1】:

    参数通过 POST 命令以 JSON 格式发送。例如,假设已经加载了一个名为airlines 的训练框架,您可以通过 curl 训练一个 AutoML 模型:

    curl -X POST http://localhost:54321/99/AutoMLBuilder -H "Content-Type: application/json" -d '{"input_spec": {"training_frame":"airlines", "response_column":"IsDepDelayed"}, "build_control": {"project_name":"aml_curl_test", "stopping_criteria":{"max_models":3} } }'
    

    您可以在此处找到完整的 REST API 参考:http://docs.h2o.ai/h2o/latest-stable/h2o-docs/rest-api-reference.html,它将告诉您每个参数所属的 JSON 对象名称。

    【讨论】:

      猜你喜欢
      • 2019-01-15
      • 1970-01-01
      • 1970-01-01
      • 2021-10-12
      • 2021-04-30
      • 2020-12-17
      • 2023-03-16
      • 2018-01-25
      • 2019-02-08
      相关资源
      最近更新 更多