Tune Loggers (tune.logger)#

Tune automatically uses loggers for TensorBoard, CSV, and JSON formats. By default, Tune only logs the returned result dictionaries from the training function.

If you need to log something lower level like model weights or gradients, see Trainable Logging.

Note

Tune’s per-trial Logger classes have been deprecated. Use the LoggerCallback interface instead.

LoggerCallback Interface (tune.logger.LoggerCallback)#

LoggerCallback()

Base class for experiment-level logger callbacks

log_trial_start(trial)

Handle logging when a trial starts.

log_trial_restore(trial)

Handle logging when a trial restores.

log_trial_save(trial)

Handle logging when a trial saves a checkpoint.

log_trial_result(iteration, trial, result)

Handle logging when a trial reports a result.

log_trial_end(trial[, failed])

Handle logging when a trial ends.

Tune Built-in Loggers#

tune.logger.JsonLoggerCallback()

Logs trial results in json format.

tune.logger.CSVLoggerCallback()

Logs results to progress.csv under the trial directory.

tune.logger.TBXLoggerCallback()

TensorBoardX Logger.

MLFlow Integration#

Tune also provides a logger for MLflow. You can install MLflow via pip install mlflow. See the tutorial here.

tune.logger.mlflow.MLflowLoggerCallback([...])

MLflow Logger to automatically log Tune results and config to MLflow.

Wandb Integration#

Tune also provides a logger for Weights & Biases. You can install Wandb via pip install wandb. See the tutorial here.

tune.logger.wandb.WandbLoggerCallback([...])

Weights and biases (https://www.wandb.ai/) is a tool for experiment tracking, model optimization, and dataset versioning.

Comet Integration#

Tune also provides a logger for Comet. You can install Comet via pip install comet-ml. See the tutorial here.

tune.logger.comet.CometLoggerCallback([...])

CometLoggerCallback for logging Tune results to Comet.

Aim Integration#

Tune also provides a logger for the Aim experiment tracker. You can install Aim via pip install aim. See the tutorial here

AimLoggerCallback([repo, experiment_name, ...])

Aim Logger: logs metrics in Aim format.

Other Integrations#

Viskit#

Tune automatically integrates with Viskit via the CSVLoggerCallback outputs. To use VisKit (you may have to install some dependencies), run:

$ git clone https://github.com/rll/rllab.git
$ python rllab/rllab/viskit/frontend.py ~/ray_results/my_experiment

The non-relevant metrics (like timing stats) can be disabled on the left to show only the relevant ones (like accuracy, loss, etc.).

../../_images/ray-tune-viskit.png