






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 				_A			(     UpperCamelCase				):
    """simple docstring"""

    lowerCamelCase	:							Optional[int]				= 'tapas'



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

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










# Lint as: python3
# pylint: enable=line-too-long
# pylint: disable=g-import-not-at-top,g-bad-import-order,wrong-import-position

__a							     =					'2.13.1'

import platform

import pyarrow
from packaging import version


if version.parse(platform.python_version()) < version.parse('3.7'):
     raise ImportWarning(
         'To use `datasets`, Python>=3.7 is required, and the current version of Python doesn\'t match this condition.'
     )

if version.parse(pyarrow.__version__).major < 8:
     raise ImportWarning(
         'To use `datasets`, the module `pyarrow>=8.0.0` is required, and the current version of `pyarrow` doesn\'t match this condition.\n'
         'If you are running this in a Google Colab, you should probably just restart the runtime to use the right version of `pyarrow`.'
     )

del platform
del pyarrow
del version

from .arrow_dataset import Dataset
from .arrow_reader import ReadInstruction
from .builder import ArrowBasedBuilder, BeamBasedBuilder, BuilderConfig, DatasetBuilder, GeneratorBasedBuilder
from .combine import concatenate_datasets, interleave_datasets
from .dataset_dict import DatasetDict, IterableDatasetDict
from .download import *
from .features import *
from .fingerprint import disable_caching, enable_caching, is_caching_enabled, set_caching_enabled
from .info import DatasetInfo, MetricInfo
from .inspect import (
    get_dataset_config_info,
    get_dataset_config_names,
    get_dataset_infos,
    get_dataset_split_names,
    inspect_dataset,
    inspect_metric,
    list_datasets,
    list_metrics,
)
from .iterable_dataset import IterableDataset
from .load import load_dataset, load_dataset_builder, load_from_disk, load_metric
from .metric import Metric
from .splits import (
    NamedSplit,
    NamedSplitAll,
    Split,
    SplitBase,
    SplitDict,
    SplitGenerator,
    SplitInfo,
    SubSplitInfo,
    percent,
)
from .tasks import *
from .utils import *
from .utils import logging


# deprecated modules
from datasets import arrow_dataset as _arrow_dataset  # isort:skip
from datasets import utils as _utils  # isort:skip
from datasets.utils import download_manager as _deprecated_download_manager  # isort:skip

__a							     =					concatenate_datasets
__a							     =					DownloadConfig
__a							     =					DownloadManager
__a							     =					DownloadMode
__a							     =					DownloadConfig
__a							     =					DownloadMode
__a							     =					DownloadManager

del _arrow_dataset, _utils, _deprecated_download_manager