"""simple docstring"""






from ...configuration_utils import PretrainedConfig
from ...utils import logging


lowerCAmelCase__  :  List[str]											=     logging.get_logger(__name__)

lowerCAmelCase__  :  int											=     {
    'bert-base-uncased': 'https://huggingface.co/bert-base-uncased/resolve/main/config.json',
    # QDQBERT models can be loaded from any BERT checkpoint, available at https://huggingface.co/models?filter=bert
}
class     snake_case	(			__UpperCAmelCase    ):




					"""simple docstring"""

					snake_case__       =			"qdqbert"







					def __init__(    self       :     List[str]   ,lowerCamelCase__       :     Optional[int]=30_522   ,lowerCamelCase__       :     Dict=768   ,lowerCamelCase__       :     Any=12   ,lowerCamelCase__       :     str=12   ,lowerCamelCase__       :     List[str]=3_072   ,lowerCamelCase__       :     Any="gelu"   ,lowerCamelCase__       :     Tuple=0.1   ,lowerCamelCase__       :     List[str]=0.1   ,lowerCamelCase__       :     int=512   ,lowerCamelCase__       :     str=2   ,lowerCamelCase__       :     Dict=0.0_2   ,lowerCamelCase__       :     str=1e-12   ,lowerCamelCase__       :     Dict=True   ,lowerCamelCase__       :     List[Any]=1   ,lowerCamelCase__       :     Tuple=0   ,lowerCamelCase__       :     Optional[int]=2   ,**lowerCamelCase__       :     Optional[int]   ,):
									super().__init__(pad_token_id=lowerCamelCase__   ,bos_token_id=lowerCamelCase__   ,eos_token_id=lowerCamelCase__   ,**lowerCamelCase__      )

									UpperCAmelCase__					=							vocab_size
									UpperCAmelCase__					=							max_position_embeddings
									UpperCAmelCase__					=							hidden_size
									UpperCAmelCase__					=							num_hidden_layers
									UpperCAmelCase__					=							num_attention_heads
									UpperCAmelCase__					=							intermediate_size
									UpperCAmelCase__					=							hidden_act
									UpperCAmelCase__					=							hidden_dropout_prob
									UpperCAmelCase__					=							attention_probs_dropout_prob
									UpperCAmelCase__					=							initializer_range
									UpperCAmelCase__					=							type_vocab_size
									UpperCAmelCase__					=							layer_norm_eps
									UpperCAmelCase__					=							use_cache




"""simple docstring"""






from sklearn.metrics import accuracy_score

import datasets


lowerCAmelCase__  :  List[str]											=     '\nAccuracy is the proportion of correct predictions among the total number of cases processed. It can be computed with:\nAccuracy = (TP + TN) / (TP + TN + FP + FN)\n Where:\nTP: True positive\nTN: True negative\nFP: False positive\nFN: False negative\n'


lowerCAmelCase__  :  List[str]											=     '\nArgs:\n    predictions (`list` of `int`): Predicted labels.\n    references (`list` of `int`): Ground truth labels.\n    normalize (`boolean`): If set to False, returns the number of correctly classified samples. Otherwise, returns the fraction of correctly classified samples. Defaults to True.\n    sample_weight (`list` of `float`): Sample weights Defaults to None.\n\nReturns:\n    accuracy (`float` or `int`): Accuracy score. Minimum possible value is 0. Maximum possible value is 1.0, or the number of examples input, if `normalize` is set to `True`.. A higher score means higher accuracy.\n\nExamples:\n\n    Example 1-A simple example\n        >>> accuracy_metric = datasets.load_metric("accuracy")\n        >>> results = accuracy_metric.compute(references=[0, 1, 2, 0, 1, 2], predictions=[0, 1, 1, 2, 1, 0])\n        >>> print(results)\n        {\'accuracy\': 0.5}\n\n    Example 2-The same as Example 1, except with `normalize` set to `False`.\n        >>> accuracy_metric = datasets.load_metric("accuracy")\n        >>> results = accuracy_metric.compute(references=[0, 1, 2, 0, 1, 2], predictions=[0, 1, 1, 2, 1, 0], normalize=False)\n        >>> print(results)\n        {\'accuracy\': 3.0}\n\n    Example 3-The same as Example 1, except with `sample_weight` set.\n        >>> accuracy_metric = datasets.load_metric("accuracy")\n        >>> results = accuracy_metric.compute(references=[0, 1, 2, 0, 1, 2], predictions=[0, 1, 1, 2, 1, 0], sample_weight=[0.5, 2, 0.7, 0.5, 9, 0.4])\n        >>> print(results)\n        {\'accuracy\': 0.8778625954198473}\n'


lowerCAmelCase__  :  Dict											=     '\n@article{scikit-learn,\n  title={Scikit-learn: Machine Learning in {P}ython},\n  author={Pedregosa, F. and Varoquaux, G. and Gramfort, A. and Michel, V.\n         and Thirion, B. and Grisel, O. and Blondel, M. and Prettenhofer, P.\n         and Weiss, R. and Dubourg, V. and Vanderplas, J. and Passos, A. and\n         Cournapeau, D. and Brucher, M. and Perrot, M. and Duchesnay, E.},\n  journal={Journal of Machine Learning Research},\n  volume={12},\n  pages={2825--2830},\n  year={2011}\n}\n'
@datasets.utils.file_utils.add_start_docstrings(_DESCRIPTION				,   _KWARGS_DESCRIPTION    )
class     snake_case	(			datasets.Metric    ):




					"""simple docstring"""

					def 		__lowerCAmelCase						(    self       :     List[Any]      ):
									return datasets.MetricInfo(
									    description=_DESCRIPTION   ,citation=_CITATION   ,inputs_description=_KWARGS_DESCRIPTION   ,features=datasets.Features(
									        {
									            'predictions': datasets.Sequence(datasets.Value('int32'      )      ),
									            'references': datasets.Sequence(datasets.Value('int32'      )      ),
									        }
									        if self.config_name == 'multilabel'
									        else {
									            'predictions': datasets.Value('int32'      ),
									            'references': datasets.Value('int32'      ),
									        }      )   ,reference_urls=['https://scikit-learn.org/stable/modules/generated/sklearn.metrics.accuracy_score.html']   ,)







					def 		__lowerCAmelCase						(    self       :     int   ,lowerCamelCase__       :     Any   ,lowerCamelCase__       :     List[str]   ,lowerCamelCase__       :     Dict=True   ,lowerCamelCase__       :     Tuple=None      ):
									return {
									    "accuracy": float(
									        accuracy_score(lowerCamelCase__   ,lowerCamelCase__   ,normalize=lowerCamelCase__   ,sample_weight=lowerCamelCase__      )      )
									}



