class ray.tune.logger.aim.AimLoggerCallback(repo: Optional[str] = None, experiment_name: Optional[str] = None, metrics: Optional[List[str]] = None, **aim_run_kwargs)[source]#

Bases: ray.tune.logger.logger.LoggerCallback

Aim Logger: logs metrics in Aim format.

Aim is an open-source, self-hosted ML experiment tracking tool. It’s good at tracking lots (thousands) of training runs, and it allows you to compare them with a performant and well-designed UI.

Source: https://github.com/aimhubio/aim

  • repo – Aim repository directory or a Repo object that the Run object will log results to. If not provided, a default repo will be set up in the experiment directory (one level above trial directories).

  • experiment – Sets the experiment property of each Run object, which is the experiment name associated with it. Can be used later to query runs/sequences. If not provided, the default will be the Tune experiment name set by RunConfig(name=...).

  • metrics – List of metric names (out of the metrics reported by Tune) to track in Aim. If no metric are specified, log everything that is reported.

  • aim_run_kwargs – Additional arguments that will be passed when creating the individual Run objects for each trial. For the full list of arguments, please see the Aim documentation: https://aimstack.readthedocs.io/en/latest/refs/sdk.html

PublicAPI: This API is stable across Ray releases.


__init__([repo, experiment_name, metrics])

See help(AimLoggerCallback) for more information about parameters.


Get the state of the callback.


Handle logging when a trial restores.


Handle logging when a trial saves a checkpoint.

on_checkpoint(iteration, trials, trial, ...)

Called after a trial saved a checkpoint with Tune.

on_experiment_end(trials, **info)

Called after experiment is over and all trials have concluded.

on_step_begin(iteration, trials, **info)

Called at the start of each tuning loop step.

on_step_end(iteration, trials, **info)

Called at the end of each tuning loop step.


Set the state of the callback.

setup([stop, num_samples, total_num_samples])

Called once at the very beginning of training.