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.


Tune’s per-trial Logger classes have been deprecated. They can still be used, but we encourage you to use our new interface with the LoggerCallback class instead.


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.).


Tune Built-in Loggers#


Logs trial results in json format.


Logs results to progress.csv under the trial directory.


TensorBoardX Logger.

MLFlow Integration: MLFlowLoggerCallback#

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


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

Wandb Integration: WandbLoggerCallback#

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


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

LoggerCallback Interface (tune.logger.LoggerCallback)#


Base class for experiment-level logger callbacks


Handle logging when a trial starts.


Handle logging when a trial restores.


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.