t9k.tuner
t9k.tuner.get_current_parameter
get_current_parameter(tag: Optional[str] = None)
Gets current hyper parameters generated by tuner. It returns the same group of hyper parameters as the last call of get_next_parameter returns.
Args
-
tag (Optional[str])
hyper parameter key.
t9k.tuner.get_experiment_id
get_experiment_id()
Gets experiment ID.
Returns
Identifier of current experiment.
t9k.tuner.get_next_parameter
get_next_parameter()
Gets the hyper paremeters generated by tuner. For a multiphase experiment, it returns a new group of hyper parameters at each call of get_next_parameter. For a non-multiphase (multiPhase is not configured or set to False) experiment, it returns hyper parameters only on the first call for each trial job, it returns None since second call. This API should be called only once in each trial job of an experiment which is not specified as multiphase.
Returns
A dict object contains the hyper parameters generated by tuner, the keys of the dict are defined in search space. Returns None if no more hyper parameters can be generated by tuner.
t9k.tuner.get_sequence_id
get_sequence_id()
Gets trial job sequence nubmer. A sequence number is an integer value assigned to each trial job base on the order they are submitted, incremental starting from 0. In one experiment, both trial job ID and sequence number are unique for each trial job, they are of different data types.
Returns
Sequence number of current trial job which is calling this API.
t9k.tuner.get_trial_id
get_trial_id()
Gets trial job ID which is string identifier of a trial job, for example ‘MoXrp’. In one experiment, each trial job has an unique string ID.
Returns
Identifier of current trial job which is calling this API.
t9k.tuner.report_final_result
report_final_result(metric: Any)
Reports final result to TUNER.
Args
-
metric (Any)
Usually (for built-in tuners to work), it should be a number, or a dict with key “default” (a number), and any other extra keys.
t9k.tuner.report_intermediate_result
report_intermediate_result(metric: Any, step: int)
Reports intermediate result to TUNER.
Args
-
metric (Any)
serializable object.