


'''simple docstring'''



from ...configuration_utils import PretrainedConfig


_lowercase      :      Tuple            =					{
    """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 	UpperCamelCase__(       lowerCAmelCase	):
				__magic_name__    :				Any  		=	"tapas"




				def __init__(		self      :			Tuple				,   lowerCAmelCase      :			Optional[int]=30522				,   lowerCAmelCase      :			Any=768				,   lowerCAmelCase      :			List[str]=12				,   lowerCAmelCase      :			int=12				,   lowerCAmelCase      :			Tuple=3072				,   lowerCAmelCase      :			Optional[Any]="gelu"				,   lowerCAmelCase      :			List[Any]=0.1				,   lowerCAmelCase      :			Optional[Any]=0.1				,   lowerCAmelCase      :			List[str]=1024				,   lowerCAmelCase      :			Dict=[3, 256, 256, 2, 256, 256, 10]				,   lowerCAmelCase      :			List[str]=0.02				,   lowerCAmelCase      :			Optional[int]=1E-12				,   lowerCAmelCase      :			Optional[Any]=0				,   lowerCAmelCase      :			Optional[int]=10.0				,   lowerCAmelCase      :			List[str]=0				,   lowerCAmelCase      :			List[str]=1.0				,   lowerCAmelCase      :			int=None				,   lowerCAmelCase      :			Tuple=1.0				,   lowerCAmelCase      :			List[str]=False				,   lowerCAmelCase      :			Optional[int]=None				,   lowerCAmelCase      :			Tuple=1.0				,   lowerCAmelCase      :			Any=1.0				,   lowerCAmelCase      :			Tuple=False				,   lowerCAmelCase      :			Tuple=False				,   lowerCAmelCase      :			int="ratio"				,   lowerCAmelCase      :			Optional[int]=None				,   lowerCAmelCase      :			List[str]=None				,   lowerCAmelCase      :			List[Any]=64				,   lowerCAmelCase      :			Union[str, Any]=32				,   lowerCAmelCase      :			Optional[Any]=False				,   lowerCAmelCase      :			str=True				,   lowerCAmelCase      :			str=False				,   lowerCAmelCase      :			Dict=False				,   lowerCAmelCase      :			Dict=True				,   lowerCAmelCase      :			Optional[Any]=False				,   lowerCAmelCase      :			List[Any]=None				,   lowerCAmelCase      :			str=None				,   **lowerCAmelCase      :			Union[str, Any]				,   )->					Optional[int]:

										"""simple docstring"""




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

										# 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				,   lowerCAmelCase				):
																UpperCAmelCase					    =     {int(lowerCAmelCase				): v for k, v in aggregation_labels.items()}









'''simple docstring'''



from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available


_lowercase      :      List[Any]            =					{
    """configuration_x_clip""": [
        """XCLIP_PRETRAINED_CONFIG_ARCHIVE_MAP""",
        """XCLIPConfig""",
        """XCLIPTextConfig""",
        """XCLIPVisionConfig""",
    ],
    """processing_x_clip""": ["""XCLIPProcessor"""],
}

try:
	if not is_torch_available():
		raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
	pass
else:
	_lowercase      :      List[str]            =					[
	    """XCLIP_PRETRAINED_MODEL_ARCHIVE_LIST""",
	    """XCLIPModel""",
	    """XCLIPPreTrainedModel""",
	    """XCLIPTextModel""",
	    """XCLIPVisionModel""",
	]

if TYPE_CHECKING:
	from .configuration_x_clip import (
	    XCLIP_PRETRAINED_CONFIG_ARCHIVE_MAP,
	    XCLIPConfig,
	    XCLIPTextConfig,
	    XCLIPVisionConfig,
	)
	from .processing_x_clip import XCLIPProcessor

	try:
		if not is_torch_available():
			raise OptionalDependencyNotAvailable()
	except OptionalDependencyNotAvailable:
		pass
	else:
		from .modeling_x_clip import (
		    XCLIP_PRETRAINED_MODEL_ARCHIVE_LIST,
		    XCLIPModel,
		    XCLIPPreTrainedModel,
		    XCLIPTextModel,
		    XCLIPVisionModel,
		)

else:
	import sys

	_lowercase      :      List[Any]            =					_LazyModule(__name__, globals()["""__file__"""], _import_structure, module_spec=__spec__)





