Shortcuts

Logger

class lightning_fabric.loggers.Logger[source]

Bases: abc.ABC

Base class for experiment loggers.

finalize(status)[source]

Do any processing that is necessary to finalize an experiment.

Parameters

status (str) – Status that the experiment finished with (e.g. success, failed, aborted)

Return type

None

log_graph(model, input_array=None)[source]

Record model graph.

Parameters
  • model (Module) – the model with an implementation of forward.

  • input_array (Optional[Tensor]) – input passes to model.forward

Return type

None

abstract log_hyperparams(params, *args, **kwargs)[source]

Record hyperparameters.

Parameters
  • params (Union[Dict[str, Any], Namespace]) – Namespace or Dict containing the hyperparameters

  • args (Any) – Optional positional arguments, depends on the specific logger being used

  • kwargs (Any) – Optional keyword arguments, depends on the specific logger being used

Return type

None

abstract log_metrics(metrics, step=None)[source]

Records metrics. This method logs metrics as soon as it received them.

Parameters
  • metrics (Dict[str, float]) – Dictionary with metric names as keys and measured quantities as values

  • step (Optional[int]) – Step number at which the metrics should be recorded

Return type

None

save()[source]

Save log data.

Return type

None

property group_separator: str

Return the default separator used by the logger to group the data into subfolders.

Return type

str

property log_dir: Optional[str]

Return directory the current version of the experiment gets saved, or None if the logger does not save data locally.

Return type

Optional[str]

abstract property name: Optional[str]

Return the experiment name.

Return type

Optional[str]

property root_dir: Optional[str]

Return the root directory where all versions of an experiment get saved, or None if the logger does not save data locally.

Return type

Optional[str]

abstract property version: Optional[Union[int, str]]

Return the experiment version.

Return type

Union[int, str, None]


© Copyright Copyright (c) 2018-2023, Lightning AI et al...

Built with Sphinx using a theme provided by Read the Docs.