'''simple docstring'''

from ...configuration_utils import PretrainedConfig


UpperCamelCase__  :						List[Any]					=      {
    '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						(   lowerCAmelCase ):
      '''simple docstring'''


      UpperCAmelCase_   :   str   				= '''tapas'''




      def __init__(					self       ,lowerCamelCase_=30522       ,lowerCamelCase_=768       ,lowerCamelCase_=12       ,lowerCamelCase_=12       ,lowerCamelCase_=3072       ,lowerCamelCase_="gelu"       ,lowerCamelCase_=0.1       ,lowerCamelCase_=0.1       ,lowerCamelCase_=1024       ,lowerCamelCase_=[3, 256, 256, 2, 256, 256, 10]       ,lowerCamelCase_=0.02       ,lowerCamelCase_=1e-12       ,lowerCamelCase_=0       ,lowerCamelCase_=10.0       ,lowerCamelCase_=0       ,lowerCamelCase_=1.0       ,lowerCamelCase_=None       ,lowerCamelCase_=1.0       ,lowerCamelCase_=False       ,lowerCamelCase_=None       ,lowerCamelCase_=1.0       ,lowerCamelCase_=1.0       ,lowerCamelCase_=False       ,lowerCamelCase_=False       ,lowerCamelCase_="ratio"       ,lowerCamelCase_=None       ,lowerCamelCase_=None       ,lowerCamelCase_=64       ,lowerCamelCase_=32       ,lowerCamelCase_=False       ,lowerCamelCase_=True       ,lowerCamelCase_=False       ,lowerCamelCase_=False       ,lowerCamelCase_=True       ,lowerCamelCase_=False       ,lowerCamelCase_=None       ,lowerCamelCase_=None       ,**lowerCamelCase_       ,)      ->      Optional[int]:



         '''simple docstring'''



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

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

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

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

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





'''simple docstring'''

def __UpperCamelCase( _A       :					float	,      _A       :					list[float]     ):
   '''simple docstring'''
   if discount_rate < 0:
      raise ValueError('''Discount rate cannot be negative'''     )
   if not cash_flows:
      raise ValueError('''Cash flows list cannot be empty'''     )
   UpperCAmelCase__				:					str 					=	sum(
       cash_flow / ((1 + discount_rate) ** i) for i, cash_flow in enumerate(_A     )     )
   return round(_A	,      ndigits=2     )


if __name__ == "__main__":
  import doctest

  doctest.testmod()




