h2oai / h2o-3

H2O is an Open Source, Distributed, Fast & Scalable Machine Learning Platform: Deep Learning, Gradient Boosting (GBM) & XGBoost, Random Forest, Generalized Linear Modeling (GLM with Elastic Net), K-Means, PCA, Generalized Additive Models (GAM), RuleFit, Support Vector Machine (SVM), Stacked Ensembles, Automatic Machine Learning (AutoML), etc.
http://h2o.ai
Apache License 2.0
6.86k stars 2k forks source link

Exception handling should be improved in GridSearch.gridSearch method #8527

Open exalate-issue-sync[bot] opened 1 year ago

exalate-issue-sync[bot] commented 1 year ago

Originally discussed here [https://github.com/h2oai/h2o-3/pull/4114#discussion_r352644226|https://github.com/h2oai/h2o-3/pull/4114#discussion_r352644226]

Comment from [~accountid:5b153fb1b0d76456f36daced]:

{quote}this legacy catch (IllegalArgumentException e) looks so nasty with the nested catch (RuntimeException e) inside. I'm sure its scope should have been limited to params = it.nextModelParameters(model);, avoiding you to have to handle numberOfBuiltModels-- multiple times. In worst case scenario — let's imagine grid.appendFailedModelParameters throws an IllegalArgumentException — the counter will be decremented twice.{quote}

h2o-ops commented 1 year ago

JIRA Issue Migration Info

Jira Issue: PUBDEV-7113 Assignee: New H2O Bugs Reporter: Andrey Spiridonov State: Open Fix Version: N/A Attachments: N/A Development PRs: N/A