



"""simple docstring"""
from collections import OrderedDict
from typing import Mapping

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


A:   str								=		logging.get_logger(__name__)

A:   List[str]								=		{
    "kssteven/ibert-roberta-base": "https://huggingface.co/kssteven/ibert-roberta-base/resolve/main/config.json",
    "kssteven/ibert-roberta-large": "https://huggingface.co/kssteven/ibert-roberta-large/resolve/main/config.json",
    "kssteven/ibert-roberta-large-mnli": (
        "https://huggingface.co/kssteven/ibert-roberta-large-mnli/resolve/main/config.json"
    ),
}



class       SCREAMING_SNAKE_CASE__  (					UpperCAmelCase__ ):
   __lowerCAmelCase  :   Dict						=						'ibert'

   def __init__(   self      ,     _SCREAMING_SNAKE_CASE=30522      ,     _SCREAMING_SNAKE_CASE=768      ,     _SCREAMING_SNAKE_CASE=12      ,     _SCREAMING_SNAKE_CASE=12      ,     _SCREAMING_SNAKE_CASE=3072      ,     _SCREAMING_SNAKE_CASE="gelu"      ,     _SCREAMING_SNAKE_CASE=0.1      ,     _SCREAMING_SNAKE_CASE=0.1      ,     _SCREAMING_SNAKE_CASE=512      ,     _SCREAMING_SNAKE_CASE=2      ,     _SCREAMING_SNAKE_CASE=0.02      ,     _SCREAMING_SNAKE_CASE=1E-12      ,     _SCREAMING_SNAKE_CASE=1      ,     _SCREAMING_SNAKE_CASE=0      ,     _SCREAMING_SNAKE_CASE=2      ,     _SCREAMING_SNAKE_CASE="absolute"      ,     _SCREAMING_SNAKE_CASE=False      ,     _SCREAMING_SNAKE_CASE="none"      ,     **_SCREAMING_SNAKE_CASE      ,     )  ->      List[str]:





    '''simple docstring'''




    super().__init__(pad_token_id=_SCREAMING_SNAKE_CASE      ,     bos_token_id=_SCREAMING_SNAKE_CASE      ,     eos_token_id=_SCREAMING_SNAKE_CASE      ,     **_SCREAMING_SNAKE_CASE						)

    UpperCAmelCase	:					Tuple	=	vocab_size
    UpperCAmelCase	:					Union[str, Any]	=	hidden_size
    UpperCAmelCase	:					Optional[int]	=	num_hidden_layers
    UpperCAmelCase	:					Union[str, Any]	=	num_attention_heads
    UpperCAmelCase	:					Dict	=	hidden_act
    UpperCAmelCase	:					List[str]	=	intermediate_size
    UpperCAmelCase	:					Any	=	hidden_dropout_prob
    UpperCAmelCase	:					Dict	=	attention_probs_dropout_prob
    UpperCAmelCase	:					Union[str, Any]	=	max_position_embeddings
    UpperCAmelCase	:					Union[str, Any]	=	type_vocab_size
    UpperCAmelCase	:					List[str]	=	initializer_range
    UpperCAmelCase	:					int	=	layer_norm_eps
    UpperCAmelCase	:					Any	=	position_embedding_type
    UpperCAmelCase	:					Optional[int]	=	quant_mode
    UpperCAmelCase	:					Tuple	=	force_dequant



class       SCREAMING_SNAKE_CASE__  (					UpperCAmelCase__ ):

   @property
   def 	SCREAMING_SNAKE_CASE     (   self						)  ->      Mapping[str, Mapping[int, str]]:





    '''simple docstring'''




    if self.task == "multiple-choice":
     UpperCAmelCase	:					Any	=	{0: """batch""", 1: """choice""", 2: """sequence"""}
    else:
     UpperCAmelCase	:					Optional[int]	=	{0: """batch""", 1: """sequence"""}
    return OrderedDict(
        [
            ("""input_ids""", dynamic_axis),
            ("""attention_mask""", dynamic_axis),
        ]						)








from typing import Callable, Optional

from .. import Features
from ..packaged_modules.generator.generator import Generator
from .abc import AbstractDatasetInputStream

class     _SCREAMING_SNAKE_CASE       (			_a      ):





	def __init__(		self				:					List[Any] ,  __lowerCamelCase				:					Callable ,  __lowerCamelCase				:					Optional[Features] = None ,  __lowerCamelCase				:					str = None ,  __lowerCamelCase				:					bool = False ,  __lowerCamelCase				:					bool = False ,  __lowerCamelCase				:					Optional[dict] = None ,  __lowerCamelCase				:					Optional[int] = None ,  **__lowerCamelCase				:					List[Any] ,  ):
		super().__init__(
		    features=__lowerCamelCase ,  cache_dir=__lowerCamelCase ,  keep_in_memory=__lowerCamelCase ,  streaming=__lowerCamelCase ,  num_proc=__lowerCamelCase ,  **__lowerCamelCase ,  )
		UpperCamelCase     :Union[str, Any]          =	Generator(
		    cache_dir=__lowerCamelCase ,  features=__lowerCamelCase ,  generator=__lowerCamelCase ,  gen_kwargs=__lowerCamelCase ,  **__lowerCamelCase ,  )





	def 						_A (		self				:					List[str]	):
		# Build iterable dataset
		if self.streaming:
			UpperCamelCase     :Any          =	self.builder.as_streaming_dataset(split="""train"""	)
		# Build regular (map-style) dataset
		else:
			UpperCamelCase     :Tuple          =	None
			UpperCamelCase     :Dict          =	None
			UpperCamelCase     :Dict          =	None
			UpperCamelCase     :List[str]          =	None

			self.builder.download_and_prepare(
			    download_config=__lowerCamelCase ,  download_mode=__lowerCamelCase ,  verification_mode=__lowerCamelCase ,  base_path=__lowerCamelCase ,  num_proc=self.num_proc ,  )
			UpperCamelCase     :Tuple          =	self.builder.as_dataset(
			    split="""train""" ,  verification_mode=__lowerCamelCase ,  in_memory=self.keep_in_memory	)
		return dataset
