from ...configuration_utils import PretrainedConfig


__lowercase									=   {
    """google/tapas-base-finetuned-sqa""": (
        """https://huggingface.co/google/tapas-base-finetuned-sqa/resolve/main/config.json"""
    ),
    """google/tapas-base-finetuned-wtq""": (
        """https://huggingface.co/google/tapas-base-finetuned-wtq/resolve/main/config.json"""
    ),
    """google/tapas-base-finetuned-wikisql-supervised""": (
        """https://huggingface.co/google/tapas-base-finetuned-wikisql-supervised/resolve/main/config.json"""
    ),
    """google/tapas-base-finetuned-tabfact""": (
        """https://huggingface.co/google/tapas-base-finetuned-tabfact/resolve/main/config.json"""
    ),
}


class       lowerCamelCase_	(  __lowercase					):






    '''simple docstring'''






    a__      :		int         = '''tapas'''







    def __init__(      self					,					__lowercase=30_522					,					__lowercase=768					,					__lowercase=12					,					__lowercase=12					,					__lowercase=3_072					,					__lowercase="gelu"					,					__lowercase=0.1					,					__lowercase=0.1					,					__lowercase=1_024					,					__lowercase=[3, 256, 256, 2, 256, 256, 10]					,					__lowercase=0.02					,					__lowercase=1E-1_2					,					__lowercase=0					,					__lowercase=10.0					,					__lowercase=0					,					__lowercase=1.0					,					__lowercase=None					,					__lowercase=1.0					,					__lowercase=False					,					__lowercase=None					,					__lowercase=1.0					,					__lowercase=1.0					,					__lowercase=False					,					__lowercase=False					,					__lowercase="ratio"					,					__lowercase=None					,					__lowercase=None					,					__lowercase=64					,					__lowercase=32					,					__lowercase=False					,					__lowercase=True					,					__lowercase=False					,					__lowercase=False					,					__lowercase=True					,					__lowercase=False					,					__lowercase=None					,					__lowercase=None					,					**__lowercase					,					)			->      Optional[int]:
        super().__init__(pad_token_id=_lowerCAmelCase					,					**_lowerCAmelCase)

        # BERT hyperparameters (with updated max_position_embeddings and type_vocab_sizes)
        __UpperCamelCase	:Union[str, Any]         =						vocab_size
        __UpperCamelCase	:Union[str, Any]         =						hidden_size
        __UpperCamelCase	:Union[str, Any]         =						num_hidden_layers
        __UpperCamelCase	:Optional[int]         =						num_attention_heads
        __UpperCamelCase	:Optional[Any]         =						hidden_act
        __UpperCamelCase	:List[str]         =						intermediate_size
        __UpperCamelCase	:str         =						hidden_dropout_prob
        __UpperCamelCase	:List[str]         =						attention_probs_dropout_prob
        __UpperCamelCase	:Optional[Any]         =						max_position_embeddings
        __UpperCamelCase	:int         =						type_vocab_sizes
        __UpperCamelCase	:str         =						initializer_range
        __UpperCamelCase	:Optional[int]         =						layer_norm_eps

        # Fine-tuning task hyperparameters
        __UpperCamelCase	:Any         =						positive_label_weight
        __UpperCamelCase	:Union[str, Any]         =						num_aggregation_labels
        __UpperCamelCase	:Optional[Any]         =						aggregation_loss_weight
        __UpperCamelCase	:int         =						use_answer_as_supervision
        __UpperCamelCase	:Any         =						answer_loss_importance
        __UpperCamelCase	:List[Any]         =						use_normalized_answer_loss
        __UpperCamelCase	:List[Any]         =						huber_loss_delta
        __UpperCamelCase	:Any         =						temperature
        __UpperCamelCase	:str         =						aggregation_temperature
        __UpperCamelCase	:Tuple         =						use_gumbel_for_cells
        __UpperCamelCase	:List[Any]         =						use_gumbel_for_aggregation
        __UpperCamelCase	:Optional[int]         =						average_approximation_function
        __UpperCamelCase	:Optional[Any]         =						cell_selection_preference
        __UpperCamelCase	:Union[str, Any]         =						answer_loss_cutoff
        __UpperCamelCase	:Union[str, Any]         =						max_num_rows
        __UpperCamelCase	:Union[str, Any]         =						max_num_columns
        __UpperCamelCase	:str         =						average_logits_per_cell
        __UpperCamelCase	:str         =						select_one_column
        __UpperCamelCase	:Tuple         =						allow_empty_column_selection
        __UpperCamelCase	:Any         =						init_cell_selection_weights_to_zero
        __UpperCamelCase	:List[str]         =						reset_position_index_per_cell
        __UpperCamelCase	:Optional[Any]         =						disable_per_token_loss

        # Aggregation hyperparameters
        __UpperCamelCase	:Dict         =						aggregation_labels
        __UpperCamelCase	:Any         =						no_aggregation_label_index

        if isinstance(self.aggregation_labels					,					_lowerCAmelCase):
            __UpperCamelCase	:Optional[Any]         =						{int(_lowerCAmelCase): v for k, v in aggregation_labels.items()}












from ..utils import DummyObject, requires_backends





class 				a			(      metaclass=__lowercase			):
				SCREAMING_SNAKE_CASE__     :   List[Any]		      =     ['''torch''', '''scipy''']






				def __init__(  self			, *_lowerCAmelCase			, **_lowerCAmelCase					):

										"""simple docstring"""




										requires_backends(self			, ['''torch''', '''scipy''']					)






				@classmethod
				def 			snake_case_    (  cls			, *_lowerCAmelCase			, **_lowerCAmelCase					):

										"""simple docstring"""




										requires_backends(cls			, ['''torch''', '''scipy''']					)






				@classmethod
				def 			snake_case_    (  cls			, *_lowerCAmelCase			, **_lowerCAmelCase					):

										"""simple docstring"""




										requires_backends(cls			, ['''torch''', '''scipy''']					)



