syne_tune.tuner_callback module
- class syne_tune.tuner_callback.TunerCallback[source]
Bases:
object
Allows user of
Tuner
to monitor progress, store additional results, etc.- on_tuning_end()[source]
Called once the tuning loop terminates
This is called before
Tuner
object is serialized (optionally), and also before running jobs are stopped.
- on_loop_start()[source]
Called at start of each tuning loop iteration
Every iteration starts with fetching new results from the backend. This is called before this is done.
- on_loop_end()[source]
Called at end of each tuning loop iteration
This is done before the loop stopping condition is checked and acted upon.
- on_fetch_status_results(trial_status_dict, new_results)[source]
Called just after
trial_backend.fetch_status_results
- Parameters:
trial_status_dict (
Dict
[int
,Tuple
[Trial
,str
]]) – Result offetch_status_results
new_results (
List
[Tuple
[int
,dict
]]) – Result offetch_status_results
- on_trial_complete(trial, result)[source]
Called when a trial completes (
Status.completed
)The arguments here also have been passed to
scheduler.on_trial_complete
, before this call here.- Parameters:
trial (
Trial
) – Trial that just completed.result (
Dict
[str
,Any
]) – Last result obtained.
- 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
- on_tuning_sleep(sleep_time)[source]
Called just after tuner has slept, because no worker was available
- Parameters:
sleep_time (
float
) – Time (in secs) for which tuner has just slept