



from ...configuration_utils import PretrainedConfig


__A       =						{
    '''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 		lowercase						(			snake_case__):






	"""simple docstring"""


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




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

							# BERT hyperparameters (with updated max_position_embeddings and type_vocab_sizes)
							UpperCAmelCase_=       vocab_size
							UpperCAmelCase_=       hidden_size
							UpperCAmelCase_=       num_hidden_layers
							UpperCAmelCase_=       num_attention_heads
							UpperCAmelCase_=       hidden_act
							UpperCAmelCase_=       intermediate_size
							UpperCAmelCase_=       hidden_dropout_prob
							UpperCAmelCase_=       attention_probs_dropout_prob
							UpperCAmelCase_=       max_position_embeddings
							UpperCAmelCase_=       type_vocab_sizes
							UpperCAmelCase_=       initializer_range
							UpperCAmelCase_=       layer_norm_eps

							# Fine-tuning task hyperparameters
							UpperCAmelCase_=       positive_label_weight
							UpperCAmelCase_=       num_aggregation_labels
							UpperCAmelCase_=       aggregation_loss_weight
							UpperCAmelCase_=       use_answer_as_supervision
							UpperCAmelCase_=       answer_loss_importance
							UpperCAmelCase_=       use_normalized_answer_loss
							UpperCAmelCase_=       huber_loss_delta
							UpperCAmelCase_=       temperature
							UpperCAmelCase_=       aggregation_temperature
							UpperCAmelCase_=       use_gumbel_for_cells
							UpperCAmelCase_=       use_gumbel_for_aggregation
							UpperCAmelCase_=       average_approximation_function
							UpperCAmelCase_=       cell_selection_preference
							UpperCAmelCase_=       answer_loss_cutoff
							UpperCAmelCase_=       max_num_rows
							UpperCAmelCase_=       max_num_columns
							UpperCAmelCase_=       average_logits_per_cell
							UpperCAmelCase_=       select_one_column
							UpperCAmelCase_=       allow_empty_column_selection
							UpperCAmelCase_=       init_cell_selection_weights_to_zero
							UpperCAmelCase_=       reset_position_index_per_cell
							UpperCAmelCase_=       disable_per_token_loss

							# Aggregation hyperparameters
							UpperCAmelCase_=       aggregation_labels
							UpperCAmelCase_=       no_aggregation_label_index

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









import pytest

import datasets


# Import fixture modules as plugins
__A       =						['''tests.fixtures.files''', '''tests.fixtures.hub''', '''tests.fixtures.fsspec''']



def 	__a					(   lowerCAmelCase_       : Optional[Any]      ,lowerCAmelCase_       : Any    )				->			Tuple:






						'''simple docstring'''



						for item in items:
												if any(marker in item.keywords for marker in ["""integration""", """unit"""]    ):
																		continue
												item.add_marker(pytest.mark.unit    )



def 	__a					(   lowerCAmelCase_       : Tuple    )				->			Optional[Any]:






						'''simple docstring'''



						config.addinivalue_line("""markers"""      ,"""torchaudio_latest: mark test to run with torchaudio>=0.12"""    )



@pytest.fixture(autouse=lowerCAmelCase_    )
def 	__a					(   lowerCAmelCase_       : List[str]      ,lowerCAmelCase_       : List[str]    )				->			int:






						'''simple docstring'''



						UpperCAmelCase_=       tmp_path_factory.getbasetemp() / """cache"""
						UpperCAmelCase_=       test_hf_cache_home / """datasets"""
						UpperCAmelCase_=       test_hf_cache_home / """metrics"""
						UpperCAmelCase_=       test_hf_cache_home / """modules"""
						monkeypatch.setattr("""datasets.config.HF_DATASETS_CACHE"""      ,str(lowerCAmelCase_    )    )
						monkeypatch.setattr("""datasets.config.HF_METRICS_CACHE"""      ,str(lowerCAmelCase_    )    )
						monkeypatch.setattr("""datasets.config.HF_MODULES_CACHE"""      ,str(lowerCAmelCase_    )    )
						UpperCAmelCase_=       test_hf_datasets_cache / """downloads"""
						monkeypatch.setattr("""datasets.config.DOWNLOADED_DATASETS_PATH"""      ,str(lowerCAmelCase_    )    )
						UpperCAmelCase_=       test_hf_datasets_cache / """downloads""" / """extracted"""
						monkeypatch.setattr("""datasets.config.EXTRACTED_DATASETS_PATH"""      ,str(lowerCAmelCase_    )    )



@pytest.fixture(autouse=lowerCAmelCase_      ,scope="""session"""    )
def 	__a					(   )				->			Optional[int]:






						'''simple docstring'''



						datasets.disable_progress_bar()



@pytest.fixture(autouse=lowerCAmelCase_    )
def 	__a					(   lowerCAmelCase_       : int    )				->			str:






						'''simple docstring'''



						monkeypatch.setattr("""datasets.config.HF_UPDATE_DOWNLOAD_COUNTS"""      ,lowerCAmelCase_    )



@pytest.fixture
def 	__a					(   lowerCAmelCase_       : List[str]    )				->			Union[str, Any]:






						'''simple docstring'''



						monkeypatch.setattr("""sqlalchemy.util.deprecations.SILENCE_UBER_WARNING"""      ,lowerCAmelCase_    )




