





'''simple docstring'''
from ....configuration_utils import PretrainedConfig
from ....utils import logging


__snake_case							   =  logging.get_logger(__name__)

# TODO: upload to AWS
__snake_case							   =  {
    '''yjernite/retribert-base-uncased''': (
        '''https://huggingface.co/yjernite/retribert-base-uncased/resolve/main/config.json'''
    ),
}
class      lowercase			(							A__      ):

		"""simple docstring"""

		_a									=       'retribert'




		def __init__(	self					,     UpperCamelCase_=30522					,     UpperCamelCase_=768					,     UpperCamelCase_=8					,     UpperCamelCase_=12					,     UpperCamelCase_=3072					,     UpperCamelCase_="gelu"					,     UpperCamelCase_=0.1					,     UpperCamelCase_=0.1					,     UpperCamelCase_=512					,     UpperCamelCase_=2					,     UpperCamelCase_=0.02					,     UpperCamelCase_=1e-12					,     UpperCamelCase_=True					,     UpperCamelCase_=128					,     UpperCamelCase_=0					,     **UpperCamelCase_					,     ):

							'''simple docstring'''


							super().__init__(pad_token_id=_UpperCAmelCase					,     **_UpperCAmelCase							)

							UpperCamelCase__     :int							      =				vocab_size
							UpperCamelCase__     :List[Any]							      =				hidden_size
							UpperCamelCase__     :Dict							      =				num_hidden_layers
							UpperCamelCase__     :str							      =				num_attention_heads
							UpperCamelCase__     :Any							      =				hidden_act
							UpperCamelCase__     :List[Any]							      =				intermediate_size
							UpperCamelCase__     :Dict							      =				hidden_dropout_prob
							UpperCamelCase__     :Any							      =				attention_probs_dropout_prob
							UpperCamelCase__     :Union[str, Any]							      =				max_position_embeddings
							UpperCamelCase__     :str							      =				type_vocab_size
							UpperCamelCase__     :List[str]							      =				initializer_range
							UpperCamelCase__     :Union[str, Any]							      =				layer_norm_eps
							UpperCamelCase__     :Tuple							      =				share_encoders
							UpperCamelCase__     :List[str]							      =				projection_dim



'''simple docstring'''
class      lowercase			:

		"""simple docstring"""

		def __init__(	self					,     UpperCamelCase_							):

							'''simple docstring'''


							UpperCamelCase__     :Union[str, Any]							      =				n
							UpperCamelCase__     :Tuple							      =				[None] * self.n
							UpperCamelCase__     :str							      =				0  # index of the first element
							UpperCamelCase__     :List[Any]							      =				0
							UpperCamelCase__     :Dict							      =				0




		def __len__(	self							):

							'''simple docstring'''


							return self.size




		def 					lowerCAmelCase__       (	self							):

							'''simple docstring'''


							return self.size == 0




		def 					lowerCAmelCase__       (	self							):

							'''simple docstring'''


							return False if self.is_empty() else self.array[self.front]




		def 					lowerCAmelCase__       (	self					,     UpperCamelCase_							):

							'''simple docstring'''


							if self.size >= self.n:
												raise Exception('''QUEUE IS FULL'''							)

							UpperCamelCase__     :List[Any]							      =				data
							UpperCamelCase__     :List[Any]							      =				(self.rear + 1) % self.n
							self.size += 1
							return self




		def 					lowerCAmelCase__       (	self							):

							'''simple docstring'''


							if self.size == 0:
												raise Exception('''UNDERFLOW'''							)

							UpperCamelCase__     :Dict							      =				self.array[self.front]
							UpperCamelCase__     :Union[str, Any]							      =				None
							UpperCamelCase__     :Union[str, Any]							      =				(self.front + 1) % self.n
							self.size -= 1
							return temp