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

Bases: ray.tune.logger.logger.LoggerCallback

Logs trial results in json format.

Also writes to a results file and param.json file when results or configurations are updated. Experiments must be executed with the JsonLoggerCallback to be compatible with the ExperimentAnalysis tool.

PublicAPI: This API is stable across Ray releases.

log_trial_start(trial: Trial)[source]#

Handle logging when a trial starts.


trial – Trial object.

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