





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        _SCREAMING_SNAKE_CASE						(     __SCREAMING_SNAKE_CASE   ):







 '''simple docstring'''
 lowercase_		=      "tapas"

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



   '''simple docstring'''



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

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

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

   # Aggregation hyperparameters
   lowerCamelCase__:				Any        =aggregation_labels
   lowerCamelCase__:				Any        =no_aggregation_label_index

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








def 					lowerCAmelCase_			(	__a		)					->		str:







  """simple docstring"""





  if isinstance(__a     ,   __a		):
    raise TypeError("'float' object cannot be interpreted as an integer"		)
  if isinstance(__a     ,   __a		):
    raise TypeError("'str' object cannot be interpreted as an integer"		)

  if num == 0:
    return "0b0"

  lowerCamelCase__:				Optional[int]        =False

  if num < 0:
    lowerCamelCase__:				Optional[Any]        =True
    lowerCamelCase__:				List[Any]        =-num

  lowerCamelCase__:				list[int]        =[]
  while num > 0:
    binary.insert(0     ,   num % 2		)
    num >>= 1

  if negative:
    return "-0b" + "".join(str(__a		) for e in binary		)

  return "0b" + "".join(str(__a		) for e in binary		)


if __name__ == "__main__":
     import doctest

     doctest.testmod()

