class_docstr: Container abstracting a list of callbacks.
class_docstr_tok: ["Container","abstracting","a","list","of","callbacks","."]
docstr: Creates a container for `Callbacks`.
  
  Arguments:
    callbacks: List of `Callback` instances.
    add_history: Whether a `History` callback should be added, if one does not
      already exist in `callback`s.
    add_progbar: Whether a `ProgbarLogger` callback should be added, if one
      does not already exist in `callback`s.
    model: The `Model` these `Callback`s are used with.`
    **params: If provided, parameters will be passed to each `Callback` via
      `Callback.set_params`.
docstr_tok: ["Creates","a","container","for","`","Callbacks","`",".","Arguments",":","callbacks",":","List","of","`","Callback","`","instances",".","add_history",":","Whether","a","`","History","`","callback","should","be","added",",","if","one","does","not","already","exist","in","`","callback","`","s",".","add_progbar",":","Whether","a","`","ProgbarLogger","`","callback","should","be","added",",","if","one","does","not","already","exist","in","`","callback","`","s",".","model",":","The","`","Model","`","these","`","Callback","`","s","are","used","with.","`","*","*","params",":","If","provided",",","parameters","will","be","passed","to","each","`","Callback","`","via","`","Callback.set_params","`","."]
code: def __init__(
      self,
      callbacks: tp.Optional[tp.List[Callback]] = None,
      add_history: bool = False,
      add_progbar: bool = False,
      sigint_mode: tp.Optional[SigIntMode] = None,
      model: tp.Optional[tp.Any] = None,
      **params,
  ):
      """Creates a container for `Callbacks`.
  
      Arguments:
        callbacks: List of `Callback` instances.
        add_history: Whether a `History` callback should be added, if one does not
          already exist in `callback`s.
        add_progbar: Whether a `ProgbarLogger` callback should be added, if one
          does not already exist in `callback`s.
        model: The `Model` these `Callback`s are used with.`
        **params: If provided, parameters will be passed to each `Callback` via
          `Callback.set_params`.
      """
      self.callbacks = callbacks if callbacks else []
      self._add_default_callbacks(add_history, add_progbar, sigint_mode)
  
      if model:
          self.set_model(model)
      if params:
          self.set_params(params)
  
      self._queue_length = 10
      self._reset_batch_timing()
  
      # Determines if batch-level hooks need to be called.
      # This is important for performance, because processing batch-level logs
      # will cause async eager to block on each batch.
      # pylint: disable=protected-access
      self._should_call_train_batch_hooks = any(
          cb._implements_train_batch_hooks() for cb in self.callbacks
      )
      self._should_call_test_batch_hooks = any(
          cb._implements_test_batch_hooks() for cb in self.callbacks
      )
      self._should_call_predict_batch_hooks = any(
          cb._implements_predict_batch_hooks() for cb in self.callbacks
      )
  
imports: import collections
  import logging
  import time
  import typing
  import numpy
  from elegy.callbacks.sigint import SigInt, SigIntMode
  from .callback import Callback
  from .history import History
  from .progbar_logger import ProgbarLogger
label_desc: Use image node_id 1 to create a new CallbackList object from inherited base classes: object with example: obj = CallbackList(callbacks, add_history, add_progbar, sigint_mode, model)