Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NPE raised when training model with unknown weights column #7378

Closed
exalate-issue-sync bot opened this issue May 11, 2023 · 2 comments
Closed

NPE raised when training model with unknown weights column #7378

exalate-issue-sync bot opened this issue May 11, 2023 · 2 comments

Comments

@exalate-issue-sync
Copy link

trying to train a model with an non-existing {{weights_column}}:

{code:python}df = h2o.import_file("smalldata/prostate/prostate.csv")
gbm = H2OGradientBoostingEstimator()
gbm.train(y=-1, training_frame=df, weights_column='foo'){code}

raises the following error:

{noformat}h2o/estimators/estimator_base.py:297: UserWarning:

`weights_column` parameter has been already set and had a different value in `train` method. The last passed value "foo" is used.

self._check_and_save_parm(parms, "weights_column", weights_column)

H2OServerError Traceback (most recent call last)
...
H2OServerError: HTTP 500 Server Error:
Server error java.lang.NullPointerException:
Error: Caught exception: java.lang.NullPointerException
Request: None{noformat}

in the logs:

{noformat}08-16 18:20:02.646 192.168.0.144:54321 66415 3610597-40 ERROR water.default: _weights_column: Weights column 'foo' not found in the training frame
08-16 18:20:02.646 192.168.0.144:54321 66415 3610597-40 ERROR water.default:
java.lang.NullPointerException
at hex.tree.SharedTree.init(SharedTree.java:159)
at hex.tree.gbm.GBM.init(GBM.java:73)
at water.api.ModelBuilderHandler.handle(ModelBuilderHandler.java:47)
at water.api.ModelBuilderHandler.handle(ModelBuilderHandler.java:16)
at water.api.RequestServer.serve(RequestServer.java:470){noformat}

Please also note the confusing {{UserWarning}}

{noformat}weights_column parameter has been already set [...]{noformat}

printed before the error, when it shouldn’t apply here.

@h2o-ops-ro
Copy link
Collaborator

JIRA Issue Details

Jira Issue: PUBDEV-8276
Assignee: Veronika Maurerová
Reporter: Sebastien Poirier
State: Resolved
Fix Version: 3.34.0.1
Attachments: N/A
Development PRs: Available

@h2o-ops-ro
Copy link
Collaborator

Linked PRs from JIRA

#5630

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant