public static interface HyperSpaceWalker.HyperSpaceIterator<MP extends Model.Parameters>
Modifier and Type | Method and Description |
---|---|
boolean |
hasNext(Model previousModel)
Returns true if the iterator can continue.
|
MP |
nextModelParameters(Model previousModel)
Get next model parameters.
|
void |
onModelFailure(Model failedModel,
java.util.function.Consumer<java.lang.Object[]> withFailedModelHyperParams)
Inform the Iterator that a model build failed in case it needs to adjust its internal state.
|
MP nextModelParameters(Model previousModel)
It should return model parameters for next point in hyper space.
Throws NoSuchElementException
if there is no remaining point in space
to explore.
The method can optimize based on previousModel, but should be able to handle null-value.
previousModel
- model generated for the previous point in hyper space, can be null.java.lang.IllegalArgumentException
- when model parameters cannot be constructedjava.util.NoSuchElementException
- if the iteration has no more elementsboolean hasNext(Model previousModel)
previousModel
- optional parameter which helps to determine next step, can be nullvoid onModelFailure(Model failedModel, java.util.function.Consumer<java.lang.Object[]> withFailedModelHyperParams)
withFailedModelHyperParams
callback with the hyperParams used to create the failed model.failedModel:
- the model whose training failed.withFailedModelHyperParams:
- consumes the "raw" hyperparameters values used for the failed model.