syne_tune.results_callback module
- class syne_tune.results_callback.ExtraResultsComposer[source]
Bases:
object
Base class for
extra_results_composer
argument inStoreResultsCallback
. Extracts extra results inStoreResultsCallback.on_trial_result()
and returns them as dictionary to be appended to the results dataframe.Why don’t we use a lambda function instead? We would like the tuner, with all its dependent objects, to be dill serializable, and lambda functions are not.
- class syne_tune.results_callback.StoreResultsCallback(add_wallclock_time=True, extra_results_composer=None)[source]
Bases:
TunerCallback
Default implementation of
TunerCallback
which records all reported results, and allows to store them as CSV file.- Parameters:
add_wallclock_time (
bool
) – IfTrue
, wallclock time since call ofon_tuning_start
is stored asST_TUNER_TIME
.extra_results_composer (
Optional
[ExtraResultsComposer
]) – Optional. If given, this is called inon_trial_result()
, and the resulting dictionary is appended as extra columns to the results dataframe
- on_trial_result(trial, status, result, decision)[source]
Called when a new result (reported by a trial) is observed
The arguments here are inputs or outputs of
scheduler.on_trial_result
(called just before).- Parameters:
trial (
Trial
) – Trial whose report has been receivedstatus (
str
) – Status of trial beforescheduler.on_trial_result
has been calledresult (
Dict
[str
,Any
]) – Result dict receiveddecision (
str
) – Decision returned byscheduler.on_trial_result