
from collections import OrderedDict
from typing import Mapping

from ...configuration_utils import PretrainedConfig
from ...onnx import OnnxConfig
from ...utils import logging


__A				=logging.get_logger(__name__)

__A				={
    '''distilbert-base-uncased''': '''https://huggingface.co/distilbert-base-uncased/resolve/main/config.json''',
    '''distilbert-base-uncased-distilled-squad''': (
        '''https://huggingface.co/distilbert-base-uncased-distilled-squad/resolve/main/config.json'''
    ),
    '''distilbert-base-cased''': '''https://huggingface.co/distilbert-base-cased/resolve/main/config.json''',
    '''distilbert-base-cased-distilled-squad''': (
        '''https://huggingface.co/distilbert-base-cased-distilled-squad/resolve/main/config.json'''
    ),
    '''distilbert-base-german-cased''': '''https://huggingface.co/distilbert-base-german-cased/resolve/main/config.json''',
    '''distilbert-base-multilingual-cased''': (
        '''https://huggingface.co/distilbert-base-multilingual-cased/resolve/main/config.json'''
    ),
    '''distilbert-base-uncased-finetuned-sst-2-english''': (
        '''https://huggingface.co/distilbert-base-uncased-finetuned-sst-2-english/resolve/main/config.json'''
    ),
}




class     _SCREAMING_SNAKE_CASE     (      snake_case_						):
	lowerCAmelCase__         = 'distilbert'
	lowerCAmelCase__         = {
	    'hidden_size': 'dim',
	    'num_attention_heads': 'n_heads',
	    'num_hidden_layers': 'n_layers',
	}



	def __init__(    self						,  lowercase=30522						,  lowercase=512						,  lowercase=False						,  lowercase=6						,  lowercase=12						,  lowercase=768						,  lowercase=4 * 768						,  lowercase=0.1						,  lowercase=0.1						,  lowercase="gelu"						,  lowercase=0.0_2						,  lowercase=0.1						,  lowercase=0.2						,  lowercase=0						,  **lowercase						,  )				->       List[Any]:
					lowerCamelCase_						=			vocab_size
					lowerCamelCase_						=			max_position_embeddings
					lowerCamelCase_						=			sinusoidal_pos_embds
					lowerCamelCase_						=			n_layers
					lowerCamelCase_						=			n_heads
					lowerCamelCase_						=			dim
					lowerCamelCase_						=			hidden_dim
					lowerCamelCase_						=			dropout
					lowerCamelCase_						=			attention_dropout
					lowerCamelCase_						=			activation
					lowerCamelCase_						=			initializer_range
					lowerCamelCase_						=			qa_dropout
					lowerCamelCase_						=			seq_classif_dropout
					super().__init__(**lowercase						,  pad_token_id=lowercase )




class     _SCREAMING_SNAKE_CASE     (      snake_case_						):



	@property
	def     SCREAMING_SNAKE_CASE_(    self )				->       Mapping[str, Mapping[int, str]]:
					if self.task == "multiple-choice":
									lowerCamelCase_						=			{0: "batch", 1: "choice", 2: "sequence"}
					else:
									lowerCamelCase_						=			{0: "batch", 1: "sequence"}
					return OrderedDict(
					    [
					        ("input_ids", dynamic_axis),
					        ("attention_mask", dynamic_axis),
					    ] )




# Lint as: python3
# pylint: enable=line-too-long
# pylint: disable=g-import-not-at-top,g-bad-import-order,wrong-import-position

__A				='''2.13.1'''

import platform

import pyarrow
from packaging import version


if version.parse(platform.python_version()) < version.parse('''3.7'''):
			raise ImportWarning(
			    '''To use `datasets`, Python>=3.7 is required, and the current version of Python doesn\'t match this condition.'''
			)

if version.parse(pyarrow.__version__).major < 8:
			raise ImportWarning(
			    '''To use `datasets`, the module `pyarrow>=8.0.0` is required, and the current version of `pyarrow` doesn\'t match this condition.\n'''
			    '''If you are running this in a Google Colab, you should probably just restart the runtime to use the right version of `pyarrow`.'''
			)

del platform
del pyarrow
del version

from .arrow_dataset import Dataset
from .arrow_reader import ReadInstruction
from .builder import ArrowBasedBuilder, BeamBasedBuilder, BuilderConfig, DatasetBuilder, GeneratorBasedBuilder
from .combine import concatenate_datasets, interleave_datasets
from .dataset_dict import DatasetDict, IterableDatasetDict
from .download import *
from .features import *
from .fingerprint import disable_caching, enable_caching, is_caching_enabled, set_caching_enabled
from .info import DatasetInfo, MetricInfo
from .inspect import (
    get_dataset_config_info,
    get_dataset_config_names,
    get_dataset_infos,
    get_dataset_split_names,
    inspect_dataset,
    inspect_metric,
    list_datasets,
    list_metrics,
)
from .iterable_dataset import IterableDataset
from .load import load_dataset, load_dataset_builder, load_from_disk, load_metric
from .metric import Metric
from .splits import (
    NamedSplit,
    NamedSplitAll,
    Split,
    SplitBase,
    SplitDict,
    SplitGenerator,
    SplitInfo,
    SubSplitInfo,
    percent,
)
from .tasks import *
from .utils import *
from .utils import logging


# deprecated modules
from datasets import arrow_dataset as _arrow_dataset  # isort:skip
from datasets import utils as _utils  # isort:skip
from datasets.utils import download_manager as _deprecated_download_manager  # isort:skip

__A				=concatenate_datasets
__A				=DownloadConfig
__A				=DownloadManager
__A				=DownloadMode
__A				=DownloadConfig
__A				=DownloadMode
__A				=DownloadManager

del _arrow_dataset, _utils, _deprecated_download_manager


