首页 > 解决方案 > H2OServerError:HTTP 500 服务器错误:在训练 automl 时

问题描述

从 h2o 训练自动机器学习模型时收到以下错误。

H2OServerError: HTTP 500 Server Error:
Server error java.lang.NullPointerException:
Error: Caught exception: java.lang.NullPointerException
Request: None

这就是我初始化 h2o 的方式:h2o.init(nthreads = -1) 这是我在 h2o 初始化后收到的:

Checking whether there is an H2O instance running at http://localhost:54321 . connected.
H2O_cluster_uptime: 31 mins 51 secs
H2O_cluster_timezone:   Asia/Kolkata
H2O_data_parsing_timezone:  UTC
H2O_cluster_version:    3.34.0.1
H2O_cluster_version_age:    3 days
H2O_cluster_name:   H2O_from_python_rosha_vhyf5v
H2O_cluster_total_nodes:    1
H2O_cluster_free_memory:    2.959 Gb
H2O_cluster_total_cores:    4
H2O_cluster_allowed_cores:  4
H2O_cluster_status: locked, healthy
H2O_connection_url: http://localhost:54321
H2O_connection_proxy:   {"http": null, "https": null}
H2O_internal_security:  False
H2O_API_Extensions: Amazon S3, Algos, AutoML, Core V3, TargetEncoder, Core V4
Python_version: 3.8.8 final

这就是我训练 automl 模型的方式:

aml = H2OAutoML(max_models = 10, max_runtime_secs = 500, stopping_rounds = 5)
aml.train(x = aml_x, y = aml_y, training_frame = train)

我将数据导出并处理为熊猫数据框。所以,我改变了它使用

train = h2o.H2OFrame(df)

我尝试了堆栈溢出的解决方案,它试图通过将数据分成两半来发现数据中的错误。无论我如何拆分,我都会遇到同样的错误。并且解决方案假定在运行代码后立即弹出错误,但在我的情况下,它需要大约 4-5 秒才能给出错误。

请注意,我有一个大约 200,000 列和 20 行的大型数据集。

标签: machine-learningh2oautoml

解决方案


我可以确认在尝试对回归问题运行 automl 时,我在版本 3.34.0.1 上遇到了同样的错误。构建 GBM 没有引发错误。我将版本降级到 3.32.1.7 并且在运行相同的代码时没有收到错误消息。现在,我建议在发布更新之前恢复到以前的版本。


推荐阅读