






from ...configuration_utils import PretrainedConfig


__UpperCAmelCase								=						{
    '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'''



		_snake_case    :    Union[str, Any]       						=  "tapas"



		def __init__(							self				,		_UpperCamelCase=3_0_5_2_2				,		_UpperCamelCase=7_6_8				,		_UpperCamelCase=1_2				,		_UpperCamelCase=1_2				,		_UpperCamelCase=3_0_7_2				,		_UpperCamelCase="gelu"				,		_UpperCamelCase=0.1				,		_UpperCamelCase=0.1				,		_UpperCamelCase=1_0_2_4				,		_UpperCamelCase=[3, 2_5_6, 2_5_6, 2, 2_5_6, 2_5_6, 1_0]				,		_UpperCamelCase=0.02				,		_UpperCamelCase=1E-12				,		_UpperCamelCase=0				,		_UpperCamelCase=10.0				,		_UpperCamelCase=0				,		_UpperCamelCase=1.0				,		_UpperCamelCase=None				,		_UpperCamelCase=1.0				,		_UpperCamelCase=False				,		_UpperCamelCase=None				,		_UpperCamelCase=1.0				,		_UpperCamelCase=1.0				,		_UpperCamelCase=False				,		_UpperCamelCase=False				,		_UpperCamelCase="ratio"				,		_UpperCamelCase=None				,		_UpperCamelCase=None				,		_UpperCamelCase=6_4				,		_UpperCamelCase=3_2				,		_UpperCamelCase=False				,		_UpperCamelCase=True				,		_UpperCamelCase=False				,		_UpperCamelCase=False				,		_UpperCamelCase=True				,		_UpperCamelCase=False				,		_UpperCamelCase=None				,		_UpperCamelCase=None				,		**_UpperCamelCase				,		)	->							int:
							super().__init__(pad_token_id=_a				,		**_a   )

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

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

							# Aggregation hyperparameters
							UpperCAmelCase_    :      Union[str, Any]            =						aggregation_labels
							UpperCAmelCase_    :      List[Any]            =						no_aggregation_label_index

							if isinstance(self.aggregation_labels				,		_a   ):
												UpperCAmelCase_    :      Tuple            =						{int(_a   ): v for k, v in aggregation_labels.items()}









import logging

from transformers import PretrainedConfig


a__				=		logging.getLogger(__name__)


a__				=		{
    '''bertabs-finetuned-cnndm''': '''https://huggingface.co/remi/bertabs-finetuned-cnndm-extractive-abstractive-summarization/resolve/main/config.json''',
}

class 				UpperCAmelCase_		(			__lowercase   ):
							"""simple docstring"""







							UpperCAmelCase__       :						Any	    =    "bertabs"


							def __init__(			self       ,							_a=3_0_5_2_2       ,							_a=5_1_2       ,							_a=6       ,							_a=5_1_2       ,							_a=8       ,							_a=5_1_2       ,							_a=0.2       ,							_a=6       ,							_a=7_6_8       ,							_a=8       ,							_a=2_0_4_8       ,							_a=0.2       ,							**_a       ,							)    ->    Any:
												super().__init__(**_a       )

												_a	:    int         =		vocab_size
												_a	:    List[str]         =		max_pos

												_a	:    Tuple         =		enc_layers
												_a	:    Optional[Any]         =		enc_hidden_size
												_a	:    int         =		enc_heads
												_a	:    Optional[Any]         =		enc_ff_size
												_a	:    List[str]         =		enc_dropout

												_a	:    Tuple         =		dec_layers
												_a	:    Optional[Any]         =		dec_hidden_size
												_a	:    Optional[Any]         =		dec_heads
												_a	:    Optional[Any]         =		dec_ff_size
												_a	:    List[Any]         =		dec_dropout



