class_docstr: TQDM progress bar handler to log training progress and computed metrics.
  
  Args:
      persist: set to ``True`` to persist the progress bar after completion (default = ``False``)
      bar_format : Specify a custom bar string formatting. May impact performance.
          [default: '{desc}[{n_fmt}/{total_fmt}] {percentage:3.0f}%|{bar}{postfix} [{elapsed}<{remaining}]'].
          Set to ``None`` to use ``tqdm`` default bar formatting: '{l_bar}{bar}{r_bar}', where
          l_bar='{desc}: {percentage:3.0f}%|' and
          r_bar='| {n_fmt}/{total_fmt} [{elapsed}<{remaining}, {rate_fmt}{postfix}]'. For more details on the
          formatting, see `tqdm docs <https://tqdm.github.io/docs/tqdm/>`_.
      tqdm_kwargs: kwargs passed to tqdm progress bar.
          By default, progress bar description displays "Epoch [5/10]" where 5 is the current epoch and 10 is the
          number of epochs; however, if ``max_epochs`` are set to 1, the progress bar instead displays
          "Iteration: [5/10]". If tqdm_kwargs defines `desc`, e.g. "Predictions", than the description is
          "Predictions [5/10]" if number of epochs is more than one otherwise it is simply "Predictions".
  
  Examples:
      Simple progress bar
  
      .. code-block:: python
  
          trainer = create_supervised_trainer(model, optimizer, loss)
  
          pbar = ProgressBar()
          pbar.attach(trainer)
  
          # Progress bar will looks like
          # Epoch [2/50]: [64/128]  50%|█████      [06:17<12:34]
  
      Log output to a file instead of stderr (tqdm's default output)
  
      .. code-block:: python
  
          trainer = create_supervised_trainer(model, optimizer, loss)
  
          log_file = open("output.log", "w")
          pbar = ProgressBar(file=log_file)
          pbar.attach(trainer)
  
      Attach metrics that already have been computed at :attr:`~ignite.engine.events.Events.ITERATION_COMPLETED`
      (such as :class:`~ignite.metrics.RunningAverage`)
  
      .. code-block:: python
  
          trainer = create_supervised_trainer(model, optimizer, loss)
  
          RunningAverage(output_transform=lambda x: x).attach(trainer, 'loss')
  
          pbar = ProgressBar()
          pbar.attach(trainer, ['loss'])
  
          # Progress bar will looks like
          # Epoch [2/50]: [64/128]  50%|█████      , loss=0.123 [06:17<12:34]
  
      Directly attach the engine's output
  
      .. code-block:: python
  
          trainer = create_supervised_trainer(model, optimizer, loss)
  
          pbar = ProgressBar()
          pbar.attach(trainer, output_transform=lambda x: {'loss': x})
  
          # Progress bar will looks like
          # Epoch [2/50]: [64/128]  50%|█████      , loss=0.123 [06:17<12:34]
  
  
      Example where the State Attributes ``trainer.state.alpha`` and ``trainer.state.beta``
      are also logged along with the NLL and Accuracy after each iteration:
  
      .. code-block:: python
  
          pbar.attach(
              trainer,
              metric_names=["nll", "accuracy"],
              state_attributes=["alpha", "beta"],
          )
  
  
  Note:
      When attaching the progress bar to an engine, it is recommended that you replace
      every print operation in the engine's handlers triggered every iteration with
      ``pbar.log_message`` to guarantee the correct format of the stdout.
  
  Note:
      When using inside jupyter notebook, `ProgressBar` automatically uses `tqdm_notebook`. For correct rendering,
      please install `ipywidgets <https://ipywidgets.readthedocs.io/en/stable/user_install.html#installation>`_.
      Due to `tqdm notebook bugs <https://github.com/tqdm/tqdm/issues/594>`_, bar format may be needed to be set
      to an empty string value.
  
  .. versionchanged:: 0.4.7
      `attach` now accepts an optional list of `state_attributes`
class_docstr_tok: ["TQDM","progress","bar","handler","to","log","training","progress","and","computed","metrics",".","Args",":","persist",":","set","to","``","True","``","to","persist","the","progress","bar","after","completion","(","default","=","``","False","``",")","bar_format",":","Specify","a","custom","bar","string","formatting",".","May","impact","performance",".","[","default",":","'","{","desc","}","[","{","n_fmt","}","\/","{","total_fmt","}","]","{","percentage:3.0f","}","%","|","{","bar","}","{","postfix","}","[","{","elapsed","}","<","{","remaining","}","]","'","]",".","Set","to","``","None","``","to","use","``","tqdm","``","default","bar","formatting",":","'","{","l_bar","}","{","bar","}","{","r_bar","}","'",",","where","l_bar=","'","{","desc","}",":","{","percentage:3.0f","}","%","|","'","and","r_bar='|","{","n_fmt","}","\/","{","total_fmt","}","[","{","elapsed","}","<","{","remaining","}",",","{","rate_fmt","}","{","postfix","}","]","'",".","For","more","details","on","the","formatting",",","see","`","tqdm","docs","<","https",":","\/\/tqdm.github.io\/docs\/tqdm\/",">","`","_",".","tqdm_kwargs",":","kwargs","passed","to","tqdm","progress","bar",".","By","default",",","progress","bar","description","displays","``","Epoch","[","5\/10","]","''","where","5","is","the","current","epoch","and","10","is","the","number","of","epochs",";","however",",","if","``","max_epochs","``","are","set","to","1",",","the","progress","bar","instead","displays","``","Iteration",":","[","5\/10","]","''",".","If","tqdm_kwargs","defines","`","desc","`",",","e.g",".","``","Predictions","''",",","than","the","description","is","``","Predictions","[","5\/10","]","''","if","number","of","epochs","is","more","than","one","otherwise","it","is","simply","``","Predictions","''",".","Examples",":","Simple","progress","bar","..","code-block",":",":","python","trainer","=","create_supervised_trainer","(","model",",","optimizer",",","loss",")","pbar","=","ProgressBar","(",")","pbar.attach","(","trainer",")","#","Progress","bar","will","looks","like","#","Epoch","[","2\/50","]",":","[","64\/128","]","50","%","|\u2588\u2588\u2588\u2588\u2588","[","06:17","<","12:34","]","Log","output","to","a","file","instead","of","stderr","(","tqdm","'s","default","output",")","..","code-block",":",":","python","trainer","=","create_supervised_trainer","(","model",",","optimizer",",","loss",")","log_file","=","open","(","``","output.log","''",",","``","w","''",")","pbar","=","ProgressBar","(","file=log_file",")","pbar.attach","(","trainer",")","Attach","metrics","that","already","have","been","computed","at",":","attr",":","`","~ignite.engine.events.Events.ITERATION_COMPLETED","`","(","such","as",":","class",":","`","~ignite.metrics.RunningAverage","`",")","..","code-block",":",":","python","trainer","=","create_supervised_trainer","(","model",",","optimizer",",","loss",")","RunningAverage","(","output_transform=lambda","x",":","x",")",".attach","(","trainer",",","'loss","'",")","pbar","=","ProgressBar","(",")","pbar.attach","(","trainer",",","[","'loss","'","]",")","#","Progress","bar","will","looks","like","#","Epoch","[","2\/50","]",":","[","64\/128","]","50","%","|\u2588\u2588\u2588\u2588\u2588",",","loss=0.123","[","06:17","<","12:34","]","Directly","attach","the","engine","'s","output","..","code-block",":",":","python","trainer","=","create_supervised_trainer","(","model",",","optimizer",",","loss",")","pbar","=","ProgressBar","(",")","pbar.attach","(","trainer",",","output_transform=lambda","x",":","{","'loss","'",":","x","}",")","#","Progress","bar","will","looks","like","#","Epoch","[","2\/50","]",":","[","64\/128","]","50","%","|\u2588\u2588\u2588\u2588\u2588",",","loss=0.123","[","06:17","<","12:34","]","Example","where","the","State","Attributes","``","trainer.state.alpha","``","and","``","trainer.state.beta","``","are","also","logged","along","with","the","NLL","and","Accuracy","after","each","iteration",":","..","code-block",":",":","python","pbar.attach","(","trainer",",","metric_names=","[","``","nll","''",",","``","accuracy","''","]",",","state_attributes=","[","``","alpha","''",",","``","beta","''","]",",",")","Note",":","When","attaching","the","progress","bar","to","an","engine",",","it","is","recommended","that","you","replace","every","print","operation","in","the","engine","'s","handlers","triggered","every","iteration","with","``","pbar.log_message","``","to","guarantee","the","correct","format","of","the","stdout",".","Note",":","When","using","inside","jupyter","notebook",",","`","ProgressBar","`","automatically","uses","`","tqdm_notebook","`",".","For","correct","rendering",",","please","install","`","ipywidgets","<","https",":","\/\/ipywidgets.readthedocs.io\/en\/stable\/user_install.html","#","installation",">","`","_",".","Due","to","`","tqdm","notebook","bugs","<","https",":","\/\/github.com\/tqdm\/tqdm\/issues\/594",">","`","_",",","bar","format","may","be","needed","to","be","set","to","an","empty","string","value",".","..","versionchanged",":",":","0.4.7","`","attach","`","now","accepts","an","optional","list","of","`","state_attributes","`"]
docstr: Intentionally empty
docstr_tok: ["Intentionally","empty"]
code: def _create_opt_params_handler(self, *args: Any, **kwargs: Any) -> Callable:  # type: ignore[empty-body]
      """Intentionally empty"""
      pass
  
imports: from collections import OrderedDict
  from typing import Any, Callable, List, Optional, Union
  from ignite.contrib.handlers.base_logger import BaseLogger, BaseOutputHandler
  from ignite.engine import Engine, Events
  from ignite.engine.events import CallableEventWithFilter, RemovableEventHandle
label_desc: Use image node_id 9 for calling the ProgressBar obj's underlying member method code with example usage: obj._create_opt_params_handler() without return types