class_docstr: Helper handler to log optimizer parameters
  
  Args:
      optimizer: torch optimizer or any object with attribute ``param_groups``
          as a sequence.
      param_name: parameter name
      tag: common title for all produced plots. For example, "generator"
  
  Examples:
      .. code-block:: python
  
          from ignite.contrib.handlers.clearml_logger import *
  
          # Create a logger
  
          clearml_logger = ClearMLLogger(
              project_name="pytorch-ignite-integration",
              task_name="cnn-mnist"
          )
  
          # Attach the logger to the trainer to log optimizer's parameters, e.g. learning rate at each iteration
          clearml_logger.attach(
              trainer,
              log_handler=OptimizerParamsHandler(optimizer),
              event_name=Events.ITERATION_STARTED
          )
          # or equivalently
          clearml_logger.attach_opt_params_handler(
              trainer,
              event_name=Events.ITERATION_STARTED,
              optimizer=optimizer
          )
class_docstr_tok: ["Helper","handler","to","log","optimizer","parameters","Args",":","optimizer",":","torch","optimizer","or","any","object","with","attribute","``","param_groups","``","as","a","sequence",".","param_name",":","parameter","name","tag",":","common","title","for","all","produced","plots",".","For","example",",","``","generator","''","Examples",":","..","code-block",":",":","python","from","ignite.contrib.handlers.clearml_logger","import","*","#","Create","a","logger","clearml_logger","=","ClearMLLogger","(","project_name=","''","pytorch-ignite-integration","''",",","task_name=","''","cnn-mnist","''",")","#","Attach","the","logger","to","the","trainer","to","log","optimizer","'s","parameters",",","e.g",".","learning","rate","at","each","iteration","clearml_logger.attach","(","trainer",",","log_handler=OptimizerParamsHandler","(","optimizer",")",",","event_name=Events.ITERATION_STARTED",")","#","or","equivalently","clearml_logger.attach_opt_params_handler","(","trainer",",","event_name=Events.ITERATION_STARTED",",","optimizer=optimizer",")"]
code: def __init__(
      self,
      optimizer: Optimizer,
      param_name: str = "lr",
      tag: Optional[str] = None,
  ):
      super(OptimizerParamsHandler, self).__init__(
          optimizer, param_name, tag
      )
  
imports: import os
  import tempfile
  import warnings
  from collections import defaultdict
  from datetime import datetime
  from enum import Enum
  from typing import Any, Callable, DefaultDict, List, Mapping, Optional, Tuple, Type, Union
  from torch.optim import Optimizer
  import ignite.distributed
  from ignite.contrib.handlers.base_logger import BaseLogger, BaseOptimizerParamsHandler, BaseOutputHandler, BaseWeightsHandler, BaseWeightsScalarHandler
  from ignite.engine import Engine, Events
  from ignite.handlers import global_step_from_engine
  from ignite.handlers.checkpoint import DiskSaver
label_desc: Use image node_id 1 to create a new OptimizerParamsHandler object from inherited base classes: BaseOptimizerParamsHandler with example: obj = OptimizerParamsHandler(optimizer, param_name, tag)