
"""simple docstring"""







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


_SCREAMING_SNAKE_CASE	       =      logging.get_logger(__name__)

_SCREAMING_SNAKE_CASE	       =      {"""openai-gpt""": """https://huggingface.co/openai-gpt/resolve/main/config.json"""}







class 							__magic_name__     (		lowercase__   ):
					_SCREAMING_SNAKE_CASE       :					Tuple     							=   'openai-gpt'
					_SCREAMING_SNAKE_CASE       :					Optional[Any]     							=   {
					    'max_position_embeddings': 'n_positions',
					    'hidden_size': 'n_embd',
					    'num_attention_heads': 'n_head',
					    'num_hidden_layers': 'n_layer',
					}





					def __init__(				self   :							Union[str, Any]							,						snake_case_   :							Tuple=40478							,						snake_case_   :							Optional[Any]=512							,						snake_case_   :							Optional[Any]=768							,						snake_case_   :							Any=12							,						snake_case_   :							List[str]=12							,						snake_case_   :							List[str]="gelu"							,						snake_case_   :							str=0.1							,						snake_case_   :							List[Any]=0.1							,						snake_case_   :							List[str]=0.1							,						snake_case_   :							List[Any]=1e-5							,						snake_case_   :							Dict=0.02							,						snake_case_   :							Tuple="cls_index"							,						snake_case_   :							Union[str, Any]=True							,						snake_case_   :							Optional[Any]=None							,						snake_case_   :							Optional[int]=True							,						snake_case_   :							Optional[Any]=0.1							,						**snake_case_   :							Any							,						):
												__snake_case     			=       vocab_size
												__snake_case     			=       n_positions
												__snake_case     			=       n_embd
												__snake_case     			=       n_layer
												__snake_case     			=       n_head
												__snake_case     			=       afn
												__snake_case     			=       resid_pdrop
												__snake_case     			=       embd_pdrop
												__snake_case     			=       attn_pdrop
												__snake_case     			=       layer_norm_epsilon
												__snake_case     			=       initializer_range
												__snake_case     			=       summary_type
												__snake_case     			=       summary_use_proj
												__snake_case     			=       summary_activation
												__snake_case     			=       summary_first_dropout
												__snake_case     			=       summary_proj_to_labels
												super().__init__(**snake_case_    )


"""simple docstring"""







import inspect
import re
from hashlib import shaaaa
from typing import Dict, List

from .arrow import arrow
from .audiofolder import audiofolder
from .csv import csv
from .imagefolder import imagefolder
from .json import json
from .pandas import pandas
from .parquet import parquet
from .sql import sql  # noqa F401
from .text import text
def   __UpperCamelCase   (					SCREAMING_SNAKE_CASE )  ->     str:







							"""simple docstring"""


							__snake_case     			=       []
							for line in lines:
														__snake_case     			=       re.sub(r"#.*"							,    ""							,    SCREAMING_SNAKE_CASE )  # remove comments
														if line:
																					filtered_lines.append(SCREAMING_SNAKE_CASE )
							__snake_case     			=       "\n".join(SCREAMING_SNAKE_CASE )

							# Make a hash from all this code
							__snake_case     			=       full_str.encode("utf-8" )
							return shaaaa(SCREAMING_SNAKE_CASE ).hexdigest()


# get importable module names and hash for caching
_SCREAMING_SNAKE_CASE	       =      {
    """csv""": (csv.__name__, _hash_python_lines(inspect.getsource(csv).splitlines())),
    """json""": (json.__name__, _hash_python_lines(inspect.getsource(json).splitlines())),
    """pandas""": (pandas.__name__, _hash_python_lines(inspect.getsource(pandas).splitlines())),
    """parquet""": (parquet.__name__, _hash_python_lines(inspect.getsource(parquet).splitlines())),
    """arrow""": (arrow.__name__, _hash_python_lines(inspect.getsource(arrow).splitlines())),
    """text""": (text.__name__, _hash_python_lines(inspect.getsource(text).splitlines())),
    """imagefolder""": (imagefolder.__name__, _hash_python_lines(inspect.getsource(imagefolder).splitlines())),
    """audiofolder""": (audiofolder.__name__, _hash_python_lines(inspect.getsource(audiofolder).splitlines())),
}

# Used to infer the module to use based on the data files extensions
_SCREAMING_SNAKE_CASE	       =      {
    """.csv""": ("""csv""", {}),
    """.tsv""": ("""csv""", {"""sep""": """\t"""}),
    """.json""": ("""json""", {}),
    """.jsonl""": ("""json""", {}),
    """.parquet""": ("""parquet""", {}),
    """.arrow""": ("""arrow""", {}),
    """.txt""": ("""text""", {}),
}
_EXTENSION_TO_MODULE.update({ext: ("""imagefolder""", {}) for ext in imagefolder.ImageFolder.EXTENSIONS})
_EXTENSION_TO_MODULE.update({ext.upper(): ("""imagefolder""", {}) for ext in imagefolder.ImageFolder.EXTENSIONS})
_EXTENSION_TO_MODULE.update({ext: ("""audiofolder""", {}) for ext in audiofolder.AudioFolder.EXTENSIONS})
_EXTENSION_TO_MODULE.update({ext.upper(): ("""audiofolder""", {}) for ext in audiofolder.AudioFolder.EXTENSIONS})
_SCREAMING_SNAKE_CASE	       =      {"""imagefolder""", """audiofolder"""}

# Used to filter data files based on extensions given a module name
_SCREAMING_SNAKE_CASE	       =      {}
for _ext, (_module, _) in _EXTENSION_TO_MODULE.items():
		_MODULE_TO_EXTENSIONS.setdefault(_module, []).append(_ext)

_MODULE_TO_EXTENSIONS["imagefolder"].append(""".zip""")



_MODULE_TO_EXTENSIONS["audiofolder"].append(""".zip""")
