Logger — lightning 2.5.1.post0 documentation (original) (raw)
class lightning.fabric.loggers.Logger[source]¶
Bases: ABC
Base class for experiment loggers.
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:
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:
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:
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:
Save log data.
Return type:
property group_separator_: str_¶
Return the default separator used by the logger to group the data into subfolders.
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.
abstract property name_: Optional[str]_¶
Return the experiment name.
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.
abstract property version_: Optional[Union[int, str]]_¶
Return the experiment version.