





from ...configuration_utils import PretrainedConfig
from ...utils import logging


_lowerCamelCase			       =      logging.get_logger(__name__)

_lowerCamelCase			       =      {'ctrl': 'https://huggingface.co/ctrl/resolve/main/config.json'}







class 			__A       (      lowerCamelCase__  ):




      """simple docstring"""







      UpperCAmelCase__						=      """ctrl"""
      UpperCAmelCase__						=      ["""past_key_values"""]
      UpperCAmelCase__						=      {
          """max_position_embeddings""": """n_positions""",
          """hidden_size""": """n_embd""",
          """num_attention_heads""": """n_head""",
          """num_hidden_layers""": """n_layer""",
      }


      def __init__(		self      ,							a__=24_6534      ,							a__=256      ,							a__=1280      ,							a__=8192      ,							a__=48      ,							a__=16      ,							a__=0.1      ,							a__=0.1      ,							a__=1e-6      ,							a__=0.02      ,							a__=True      ,							**a__      ,							):



             """simple docstring"""





             _lowerCamelCase							:     List[Any]	=		vocab_size
             _lowerCamelCase							:     Optional[Any]	=		n_positions
             _lowerCamelCase							:     Tuple	=		n_embd
             _lowerCamelCase							:     int	=		n_layer
             _lowerCamelCase							:     Dict	=		n_head
             _lowerCamelCase							:     Optional[int]	=		dff
             _lowerCamelCase							:     Optional[int]	=		resid_pdrop
             _lowerCamelCase							:     int	=		embd_pdrop
             _lowerCamelCase							:     Optional[Any]	=		layer_norm_epsilon
             _lowerCamelCase							:     int	=		initializer_range

             _lowerCamelCase							:     List[str]	=		use_cache

             super().__init__(**a__)








import pytest

import datasets


# Import fixture modules as plugins
_lowerCamelCase			       =      ['tests.fixtures.files', 'tests.fixtures.hub', 'tests.fixtures.fsspec']




def    __UpperCAmelCase(      lowercase_ ,    lowercase_      ):
       # Mark tests as "unit" by default if not marked as "integration" (or already marked as "unit")
       for item in items:
              if any(marker in item.keywords for marker in ['''integration''', '''unit''']      ):
                     continue
              item.add_marker(pytest.mark.unit      )




def    __UpperCAmelCase(      lowercase_      ):
       config.addinivalue_line('''markers''' ,    '''torchaudio_latest: mark test to run with torchaudio>=0.12'''      )




@pytest.fixture(autouse=lowercase_      )
def    __UpperCAmelCase(      lowercase_ ,    lowercase_      ):
       # test_hf_cache_home = tmp_path_factory.mktemp("cache")  # TODO: why a cache dir per test function does not work?
       _lowerCamelCase							:     Optional[Any]	=		tmp_path_factory.getbasetemp() / '''cache'''
       _lowerCamelCase							:     Optional[Any]	=		test_hf_cache_home / '''datasets'''
       _lowerCamelCase							:     Union[str, Any]	=		test_hf_cache_home / '''metrics'''
       _lowerCamelCase							:     Dict	=		test_hf_cache_home / '''modules'''
       monkeypatch.setattr('''datasets.config.HF_DATASETS_CACHE''' ,    str(lowercase_      )      )
       monkeypatch.setattr('''datasets.config.HF_METRICS_CACHE''' ,    str(lowercase_      )      )
       monkeypatch.setattr('''datasets.config.HF_MODULES_CACHE''' ,    str(lowercase_      )      )
       _lowerCamelCase							:     str	=		test_hf_datasets_cache / '''downloads'''
       monkeypatch.setattr('''datasets.config.DOWNLOADED_DATASETS_PATH''' ,    str(lowercase_      )      )
       _lowerCamelCase							:     Optional[int]	=		test_hf_datasets_cache / '''downloads''' / '''extracted'''
       monkeypatch.setattr('''datasets.config.EXTRACTED_DATASETS_PATH''' ,    str(lowercase_      )      )




@pytest.fixture(autouse=lowercase_ ,    scope='''session'''      )
def    __UpperCAmelCase(      ):
       datasets.disable_progress_bar()




@pytest.fixture(autouse=lowercase_      )
def    __UpperCAmelCase(      lowercase_      ):
       # don't take tests into account when counting downloads
       monkeypatch.setattr('''datasets.config.HF_UPDATE_DOWNLOAD_COUNTS''' ,    lowercase_      )




@pytest.fixture
def    __UpperCAmelCase(      lowercase_      ):
       # Required to suppress RemovedIn20Warning when feature(s) are not compatible with SQLAlchemy 2.0
       # To be removed once SQLAlchemy 2.0 supported
       monkeypatch.setattr('''sqlalchemy.util.deprecations.SILENCE_UBER_WARNING''' ,    lowercase_      )

