class ray.tune.logger.CSVLoggerCallback[source]#

Bases: ray.tune.logger.logger.LoggerCallback

Logs results to progress.csv under the trial directory.

Automatically flattens nested dicts in the result dict before writing to csv:

{“a”: {“b”: 1, “c”: 2}} -> {“a/b”: 1, “a/c”: 2}

PublicAPI: This API is stable across Ray releases.

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

Handle logging when a trial reports a result.

  • trial – Trial object.

  • result – Result dictionary.

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

Handle logging when a trial ends.

  • trial – Trial object.

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