syne_tune.callbacks package

class syne_tune.callbacks.TensorboardCallback(ignore_metrics=None, target_metric=None, mode=None, log_hyperparameters=True)[source]

Bases: TunerCallback

Logs relevant metrics reported from trial evaluations, so they can be visualized with Tensorboard.

Parameters:
  • ignore_metrics (Optional[List[str]]) – Defines which metrics should be ignored. If None, all metrics are reported to Tensorboard.

  • target_metric (Optional[str]) – Defines the metric we aim to optimize. If this argument is set, we report the cumulative optimum of this metric as well as the optimal hyperparameters we have found so far.

  • mode (Optional[str]) – Determined whether we maximize (“max”) or minimize (“min”) the target metric.

  • log_hyperparameters (bool) – If set to True, we also log all hyperparameters specified in the configurations space.

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 received

  • status (str) – Status of trial before scheduler.on_trial_result has been called

  • result (Dict[str, Any]) – Result dict received

  • decision (str) – Decision returned by scheduler.on_trial_result

on_tuning_start(tuner)[source]

Called at start of tuning loop

Parameters:

tunerTuner object

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.

Submodules