fbresearch_logger#
FBResearch logger and its helper handlers.
Classes
Logs training and validation metrics for research purposes. |
- class ignite.handlers.fbresearch_logger.FBResearchLogger(logger, delimiter=' ', show_output=False)[source]#
Logs training and validation metrics for research purposes.
This logger is designed to attach to an Ignite Engine and log various metrics and system stats at configurable intervals, including learning rates, iteration times, and GPU memory usage.
- Parameters
Examples
import logging from ignite.handlers.fbresearch_logger import * logger = FBResearchLogger(logger=logging.Logger(__name__), show_output=True) logger.attach(trainer, name="Train", every=10, optimizer=my_optimizer)
- attach(engine, name, every=1, optimizer=None)[source]#
Attaches all the logging handlers to the given engine.
- Parameters
engine (Engine) – The engine to attach the logging handlers to.
name (str) – The name of the engine (e.g., “Train”, “Validate”) to include in log messages.
every (int) – Frequency of iterations to log information. Logs are generated every ‘every’ iterations.
optimizer (Optional[Optimizer]) – The optimizer used during training to log current learning rates.
- Return type
None