pytorch_lightning_spells.loggers module

Classes:

ScreenLogger()

A logger that prints metrics to the screen.

Functions:

sanitize_dict_like_object(obj)

Convert a dict-like object into a dict and ensure all values are JSON-serializable.

class pytorch_lightning_spells.loggers.ScreenLogger[source]

Bases: Logger

A logger that prints metrics to the screen.

Suitable in situation where you want to check the training progress directly in the console.

log_hyperparams(params)[source]
log_metrics(metrics, step=None)[source]
Parameters:
  • metrics (dict[str, float])

  • step (int | None)

Return type:

None

property name
property save_dir: str | None

Return the root directory where experiment logs get saved, or None if the logger does not save data locally.

property version: int
pytorch_lightning_spells.loggers.sanitize_dict_like_object(obj)[source]

Convert a dict-like object into a dict and ensure all values are JSON-serializable.

Parameters:

obj (MutableMapping[str, Any])

Return type:

dict[str, Any]