Shortcuts

StdoutLogger

class torchtune.utils.metric_logging.StdoutLogger(*args, **kwargs)[source]

Logger to standard output.

close() None[source]

Close log resource, flushing if necessary. Logs should not be written after close is called.

log(name: str, data: Union[Tensor, ndarray, int, float], step: int) None[source]

Log scalar data.

Parameters:
  • name (str) – tag name used to group scalars

  • data (Scalar) – scalar data to log

  • step (int) – step value to record

log_dict(payload: Mapping[str, Union[Tensor, ndarray, int, float]], step: int) None[source]

Log multiple scalar values.

Parameters:
  • payload (Mapping[str, Scalar]) – dictionary of tag name and scalar value

  • step (int) – step value to record

Docs

Access comprehensive developer documentation for PyTorch

View Docs

Tutorials

Get in-depth tutorials for beginners and advanced developers

View Tutorials

Resources

Find development resources and get your questions answered

View Resources