

"""simple docstring"""





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 					_lowerCAmelCase  (	lowercase   ):







 """simple docstring"""







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


 def __init__(			self							:			int,					UpperCAmelCase__							:			List[Any]=3_0_5_2_2,					UpperCAmelCase__							:			Any=7_6_8,					UpperCAmelCase__							:			Tuple=1_2,					UpperCAmelCase__							:			str=1_2,					UpperCAmelCase__							:			Union[str, Any]=3_0_7_2,					UpperCAmelCase__							:			Union[str, Any]="gelu",					UpperCAmelCase__							:			Dict=0.1,					UpperCAmelCase__							:			Union[str, Any]=0.1,					UpperCAmelCase__							:			Optional[int]=1_0_2_4,					UpperCAmelCase__							:			Optional[Any]=[3, 2_5_6, 2_5_6, 2, 2_5_6, 2_5_6, 1_0],					UpperCAmelCase__							:			Dict=0.02,					UpperCAmelCase__							:			str=1E-12,					UpperCAmelCase__							:			int=0,					UpperCAmelCase__							:			Optional[Any]=10.0,					UpperCAmelCase__							:			Union[str, Any]=0,					UpperCAmelCase__							:			Any=1.0,					UpperCAmelCase__							:			List[Any]=None,					UpperCAmelCase__							:			Any=1.0,					UpperCAmelCase__							:			Union[str, Any]=False,					UpperCAmelCase__							:			Union[str, Any]=None,					UpperCAmelCase__							:			Union[str, Any]=1.0,					UpperCAmelCase__							:			Optional[Any]=1.0,					UpperCAmelCase__							:			Optional[Any]=False,					UpperCAmelCase__							:			str=False,					UpperCAmelCase__							:			List[str]="ratio",					UpperCAmelCase__							:			Optional[Any]=None,					UpperCAmelCase__							:			Dict=None,					UpperCAmelCase__							:			Optional[Any]=6_4,					UpperCAmelCase__							:			Dict=3_2,					UpperCAmelCase__							:			Any=False,					UpperCAmelCase__							:			List[str]=True,					UpperCAmelCase__							:			Optional[Any]=False,					UpperCAmelCase__							:			Optional[Any]=False,					UpperCAmelCase__							:			Any=True,					UpperCAmelCase__							:			Union[str, Any]=False,					UpperCAmelCase__							:			str=None,					UpperCAmelCase__							:			int=None,					**UpperCAmelCase__							:			Optional[int],					):
    super().__init__(pad_token_id=UpperCAmelCase__,					**UpperCAmelCase__	)

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

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

    # Aggregation hyperparameters
    __lowercase								=						aggregation_labels
    __lowercase								=						no_aggregation_label_index

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












# Copyright 2023 The HuggingFace Team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available


a		:       Union[str, Any]			     = {"configuration_timm_backbone": ["TimmBackboneConfig"]}


try:
       if not is_torch_available():
              raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
       pass
else:
       a		:       Tuple			     = ["TimmBackbone"]


if TYPE_CHECKING:
       from .configuration_timm_backbone import TimmBackboneConfig

       try:
              if not is_torch_available():
                     raise OptionalDependencyNotAvailable()
       except OptionalDependencyNotAvailable:
              pass
       else:
              from .modeling_timm_backbone import TimmBackbone

else:
       import sys

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


