ray.tune.logger.aim.AimLoggerCallback#

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

Parameters
  • 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.

log_trial_start(trial: Trial)[source]#

Handle logging when a trial starts.

Parameters

trial – Trial object.

log_trial_result(iteration: int, trial: Trial, result: Dict)[source]#

Handle logging when a trial reports a result.

Parameters
  • trial – Trial object.

  • result – Result dictionary.

log_trial_end(trial: Trial, failed: bool = False)[source]#

Handle logging when a trial ends.

Parameters
  • trial – Trial object.

  • failed – True if the Trial finished gracefully, False if it failed (e.g. when it raised an exception).