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. They can still be used, but we encourage you to use our new interface with the LoggerCallback class instead.

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

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: MLFlowLoggerCallback#

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

air.integrations.mlflow.MLflowLoggerCallback([...])

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.

air.integrations.wandb.WandbLoggerCallback([...])

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

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.