Exception handling should be improved in GridSearch.gridSearch method

Description

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

Comment from :

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.

 

Status

Assignee

New H2O Bugs

Fix versions

None

Reporter

Andrey Spiridonov

Support ticket URL

None

Labels

None

Affected Spark version

None

Customer Request Type

None

Task progress

None

CustomerVisible

No

Priority

Major
Configure