ray.air.session.report
ray.air.session.report#
- ray.air.session.report(metrics: Dict, *, checkpoint: Optional[ray.air.checkpoint.Checkpoint] = None) None [source]#
Report metrics and optionally save a checkpoint.
Each invocation of this method will automatically increment the underlying iteration number. The physical meaning of this “iteration” is defined by user (or more specifically the way they call
report
). It does not necessarily map to one epoch.This API is the canonical way to report metrics from Tune and Train, and replaces the legacy
tune.report
,with tune.checkpoint_dir
,train.report
andtrain.save_checkpoint
calls.Note on directory checkpoints: AIR will take ownership of checkpoints passed to
report()
by moving them to a new path. The original directory will no longer be accessible to the caller after the report call.Example
- Parameters
metrics – The metrics you want to report.
checkpoint – The optional checkpoint you want to report.