base_logger¶
Base logger and its helper handlers.
Classes
Base handler for defining various useful handlers. |
|
Base logger handler. |
|
Base handler for logging optimizer parameters |
|
Helper handler to log engine’s output and/or metrics |
|
Helper handler to log model’s weights as histograms. |
|
Helper handler to log model’s weights as scalars. |
-
class
ignite.contrib.handlers.base_logger.
BaseHandler
[source]¶ Base handler for defining various useful handlers.
-
class
ignite.contrib.handlers.base_logger.
BaseLogger
[source]¶ Base logger handler. See implementations: TensorboardLogger, VisdomLogger, PolyaxonLogger, MLflowLogger, …
-
attach
(engine, log_handler, event_name)[source]¶ Attach the logger to the engine and execute log_handler function at event_name events.
- Parameters
engine (ignite.engine.engine.Engine) – engine object.
log_handler (Callable) – a logging handler to execute
event_name (Union[str, ignite.engine.events.Events, ignite.engine.events.CallableEventWithFilter, ignite.engine.events.EventsList]) – event to attach the logging handler to. Valid events are from
Events
orEventsList
or any event_name added byregister_events()
.
- Returns
RemovableEventHandle
, which can be used to remove the handler.- Return type
-
attach_opt_params_handler
(engine, event_name, *args, **kwargs)[source]¶ Shortcut method to attach OptimizerParamsHandler to the logger.
- Parameters
engine (ignite.engine.engine.Engine) – engine object.
event_name (Any) – event to attach the logging handler to. Valid events are from
Events
or any event_name added byregister_events()
.args (Any) – args to initialize OptimizerParamsHandler
kwargs (Any) – kwargs to initialize OptimizerParamsHandler
- Returns
RemovableEventHandle
, which can be used to remove the handler.- Return type
Changed in version 0.4.3: Added missing return statement.
-
attach_output_handler
(engine, event_name, *args, **kwargs)[source]¶ Shortcut method to attach OutputHandler to the logger.
- Parameters
engine (ignite.engine.engine.Engine) – engine object.
event_name (Any) – event to attach the logging handler to. Valid events are from
Events
or any event_name added byregister_events()
.args (Any) – args to initialize OutputHandler
kwargs (Any) – kwargs to initialize OutputHandler
- Returns
RemovableEventHandle
, which can be used to remove the handler.- Return type
-
-
class
ignite.contrib.handlers.base_logger.
BaseOptimizerParamsHandler
(optimizer, param_name='lr', tag=None)[source]¶ Base handler for logging optimizer parameters
-
class
ignite.contrib.handlers.base_logger.
BaseOutputHandler
(tag, metric_names=None, output_transform=None, global_step_transform=None)[source]¶ Helper handler to log engine’s output and/or metrics