addons.tune.tuner
Handles the tuner interface interface
#
TunerInterface Objectsclass TunerInterface()
Handles the general tuner interface by creating the necessary underlying tuner class and dispatches necessary ops to the class instance
Attributes:
_fixed_namespace
- fixed parameter namespace used for combination with a sample draw_lib_interface
- class instance of the underlying hyper-parameter library
#
__init__def __init__(tuner_config: Union[OptunaTunerConfig, AxTunerConfig], tuner_namespace: Spockspace, fixed_namespace: Spockspace)
Init call to the TunerInterface
Arguments:
tuner_config
- necessary object to determine the interface and sample correctly from the underlying librarytuner_namespace
- tuner namespace that has attr classes that maps to an underlying library typesfixed_namespace
- namespace of fixed parameters
#
sampledef sample()
Public interface to underlying library specific sample that returns a single sample/draw from the hyper-parameter sets (e.g. ranges, choices) and combines them with the fixed parameters into a single Spockspace
Returns:
Spockspace of drawn sample of hyper-parameters and fixed parameters
#
tuner_status@propertydef tuner_status()
Returns a dictionary of all the necessary underlying tuner internals to report the result
#
best@propertydef best()
Returns a Spockspace of the best hyper-parameter config and the associated metric value