class_docstr: This class manages the setup and configuration of adapter modules in a pre-trained model.
class_docstr_tok: ["This","class","manages","the","setup","and","configuration","of","adapter","modules","in","a","pre-trained","model","."]
code: def __init__(self, **kwargs):
      adapters_list = kwargs.pop("adapters", {})
      # this is for backwards compability: in v1.x, self.adapters values had shape (<type>, <config_name>)
      adapters_list = dict(
          map(
              lambda t: (
                  t[0],
                  t[1][1] or t[1][0]
                  if isinstance(t[1], tuple)
                  else t[1],
              ),
              adapters_list.items(),
          )
      )
      self.adapters: Mapping[str, str] = adapters_list
      self.config_map = kwargs.pop("config_map", {})
  
      self.fusions: Mapping[str, str] = kwargs.pop("fusions", {})
      self.fusion_config_map = kwargs.pop("fusion_config_map", {})
  
      # TODO-V2 Save this with config?
      self.active_setup: Optional[AdapterCompositionBlock] = None
      self.skip_layers = None
  
imports: import copy
  import logging
  from collections.abc import Collection, Mapping
  from typing import List, Optional, Union
  from ..None import __version__
  from ..composition import AdapterCompositionBlock
  from ..utils import get_adapter_config_hash
  from .adapter_config import ADAPTER_CONFIG_MAP, DEFAULT_ADAPTER_CONFIG, AdapterConfig, ConfigUnion
  from .adapter_fusion_config import ADAPTERFUSION_CONFIG_MAP, DEFAULT_ADAPTERFUSION_CONFIG
label_desc: Use image node_id 1 to create a new ModelAdaptersConfig object from inherited base classes: Collection with example: obj = ModelAdaptersConfig()