
import unittest

from transformers import DebertaVaTokenizer, DebertaVaTokenizerFast
from transformers.testing_utils import get_tests_dir, require_sentencepiece, require_tokenizers, slow

from ...test_tokenization_common import TokenizerTesterMixin


_UpperCAmelCase      :				List[Any]          = get_tests_dir("fixtures/spiece.model")


@require_sentencepiece
@require_tokenizers
class        lowercase      (	_SCREAMING_SNAKE_CASE						,     unittest.TestCase     ):
		__lowercase : Dict			  =       DebertaVaTokenizer
		__lowercase : Tuple			  =       DebertaVaTokenizerFast
		__lowercase : str			  =       True
		__lowercase : Optional[int]			  =       True



		def __UpperCamelCase				(				self )						->      int:
				"""simple docstring"""
				super().setUp()

				# We have a SentencePiece fixture for testing
				UpperCamelCase						=  DebertaVaTokenizer(A_       ,   unk_token='<unk>' )
				tokenizer.save_pretrained(self.tmpdirname )



		def __UpperCamelCase				(				self       ,   A_ )						->      List[str]:
				"""simple docstring"""
				UpperCamelCase						=  'this is a test'
				UpperCamelCase						=  'this is a test'
				return input_text, output_text



		def __UpperCamelCase				(				self )						->      List[str]:
				"""simple docstring"""
				UpperCamelCase						=  '<pad>'
				UpperCamelCase						=  0

				self.assertEqual(self.get_tokenizer()._convert_token_to_id(A_ )       ,   A_ )
				self.assertEqual(self.get_tokenizer()._convert_id_to_token(A_ )       ,   A_ )



		def __UpperCamelCase				(				self )						->      Dict:
				"""simple docstring"""
				UpperCamelCase						=  list(self.get_tokenizer().get_vocab().keys() )
				self.assertEqual(vocab_keys[0]       ,   '<pad>' )
				self.assertEqual(vocab_keys[1]       ,   '<unk>' )
				self.assertEqual(vocab_keys[-1]       ,   '[PAD]' )
				self.assertEqual(len(A_ )       ,   30_001 )



		def __UpperCamelCase				(				self )						->      Any:
				"""simple docstring"""
				self.assertEqual(self.get_tokenizer().vocab_size       ,   30_000 )



		def __UpperCamelCase				(				self )						->      Any:
				"""simple docstring"""
				UpperCamelCase						=  ' \tHeLLo!how  \n Are yoU?  '
				UpperCamelCase						=  ['▁hello', '!', 'how', '▁are', '▁you', '?']
				# fmt: on

				UpperCamelCase						=  DebertaVaTokenizer(A_       ,   do_lower_case=A_ )
				UpperCamelCase						=  tokenizer.convert_ids_to_tokens(tokenizer.encode(A_       ,   add_special_tokens=A_ ) )

				self.assertListEqual(A_       ,   A_ )

				UpperCamelCase						=  DebertaVaTokenizerFast(A_       ,   do_lower_case=A_ )
				UpperCamelCase						=  rust_tokenizer.convert_ids_to_tokens(rust_tokenizer.encode(A_       ,   add_special_tokens=A_ ) )

				self.assertListEqual(A_       ,   A_ )



		@unittest.skip('There is an inconsistency between slow and fast tokenizer due to a bug in the fast one.' )
		def __UpperCamelCase				(				self )						->      List[Any]:
				"""simple docstring"""
				pass



		@unittest.skip('There is an inconsistency between slow and fast tokenizer due to a bug in the fast one.' )
		def __UpperCamelCase				(				self )						->      str:
				"""simple docstring"""
				pass



		def __UpperCamelCase				(				self )						->      List[Any]:
				"""simple docstring"""
				UpperCamelCase						=  'I was born in 92000, and this is falsé.'
				UpperCamelCase						=  ['▁', '<unk>', '▁was', '▁born', '▁in', '▁9', '2000', '▁', ',', '▁and', '▁this', '▁is', '▁fal', 's', '<unk>', '▁', '.', ]
				# fmt: on

				UpperCamelCase						=  DebertaVaTokenizer(A_       ,   split_by_punct=A_ )
				UpperCamelCase						=  tokenizer.convert_ids_to_tokens(tokenizer.encode(A_       ,   add_special_tokens=A_ ) )

				self.assertListEqual(A_       ,   A_ )

				UpperCamelCase						=  DebertaVaTokenizerFast(A_       ,   split_by_punct=A_ )
				UpperCamelCase						=  rust_tokenizer.convert_ids_to_tokens(rust_tokenizer.encode(A_       ,   add_special_tokens=A_ ) )

				self.assertListEqual(A_       ,   A_ )



		def __UpperCamelCase				(				self )						->      List[str]:
				"""simple docstring"""
				UpperCamelCase						=  'I was born in 92000, and this is falsé.'
				UpperCamelCase						=  ['▁i', '▁was', '▁born', '▁in', '▁9', '2000', '▁', ',', '▁and', '▁this', '▁is', '▁fal', 's', '<unk>', '▁', '.', ]
				# fmt: on

				UpperCamelCase						=  DebertaVaTokenizer(A_       ,   do_lower_case=A_       ,   split_by_punct=A_ )
				UpperCamelCase						=  tokenizer.convert_ids_to_tokens(tokenizer.encode(A_       ,   add_special_tokens=A_ ) )
				self.assertListEqual(A_       ,   A_ )

				UpperCamelCase						=  DebertaVaTokenizerFast(A_       ,   do_lower_case=A_       ,   split_by_punct=A_ )
				UpperCamelCase						=  rust_tokenizer.convert_ids_to_tokens(rust_tokenizer.encode(A_       ,   add_special_tokens=A_ ) )
				self.assertListEqual(A_       ,   A_ )



		def __UpperCamelCase				(				self )						->      Union[str, Any]:
				"""simple docstring"""
				UpperCamelCase						=  'I was born in 92000, and this is falsé.'
				UpperCamelCase						=  ['▁i', '▁was', '▁born', '▁in', '▁9', '2000', ',', '▁and', '▁this', '▁is', '▁fal', 's', '<unk>', '.', ]
				# fmt: on

				UpperCamelCase						=  DebertaVaTokenizer(A_       ,   do_lower_case=A_       ,   split_by_punct=A_ )
				UpperCamelCase						=  tokenizer.convert_ids_to_tokens(tokenizer.encode(A_       ,   add_special_tokens=A_ ) )

				self.assertListEqual(A_       ,   A_ )

				UpperCamelCase						=  DebertaVaTokenizerFast(A_       ,   do_lower_case=A_       ,   split_by_punct=A_ )
				UpperCamelCase						=  rust_tokenizer.convert_ids_to_tokens(rust_tokenizer.encode(A_       ,   add_special_tokens=A_ ) )

				self.assertListEqual(A_       ,   A_ )



		def __UpperCamelCase				(				self )						->      Dict:
				"""simple docstring"""
				UpperCamelCase						=  'I was born in 92000, and this is falsé.'
				UpperCamelCase						=  ['▁', '<unk>', '▁was', '▁born', '▁in', '▁9', '2000', '▁', ',', '▁and', '▁this', '▁is', '▁fal', 's', '<unk>', '▁', '.', ]
				# fmt: on

				UpperCamelCase						=  DebertaVaTokenizer(A_       ,   do_lower_case=A_       ,   split_by_punct=A_ )
				UpperCamelCase						=  tokenizer.convert_ids_to_tokens(tokenizer.encode(A_       ,   add_special_tokens=A_ ) )

				self.assertListEqual(A_       ,   A_ )

				UpperCamelCase						=  DebertaVaTokenizerFast(A_       ,   do_lower_case=A_       ,   split_by_punct=A_ )
				UpperCamelCase						=  rust_tokenizer.convert_ids_to_tokens(rust_tokenizer.encode(A_       ,   add_special_tokens=A_ ) )

				self.assertListEqual(A_       ,   A_ )



		def __UpperCamelCase				(				self )						->      Optional[Any]:
				"""simple docstring"""
				UpperCamelCase						=  ' \tHeLLo!how  \n Are yoU?  '
				UpperCamelCase						=  ['▁', '<unk>', 'e', '<unk>', 'o', '!', 'how', '▁', '<unk>', 're', '▁yo', '<unk>', '?']
				# fmt: on

				UpperCamelCase						=  DebertaVaTokenizer(A_       ,   do_lower_case=A_       ,   split_by_punct=A_ )
				UpperCamelCase						=  tokenizer.convert_ids_to_tokens(tokenizer.encode(A_       ,   add_special_tokens=A_ ) )

				self.assertListEqual(A_       ,   A_ )

				UpperCamelCase						=  DebertaVaTokenizerFast(A_       ,   do_lower_case=A_       ,   split_by_punct=A_ )
				UpperCamelCase						=  rust_tokenizer.convert_ids_to_tokens(rust_tokenizer.encode(A_       ,   add_special_tokens=A_ ) )

				self.assertListEqual(A_       ,   A_ )



		def __UpperCamelCase				(				self )						->      int:
				"""simple docstring"""
				UpperCamelCase						=  self.get_tokenizer()
				UpperCamelCase						=  self.get_rust_tokenizer()

				UpperCamelCase						=  'I was born in 92000, and this is falsé.'

				UpperCamelCase						=  tokenizer.convert_ids_to_tokens(tokenizer.encode(A_       ,   add_special_tokens=A_ ) )
				UpperCamelCase						=  rust_tokenizer.convert_ids_to_tokens(rust_tokenizer.encode(A_       ,   add_special_tokens=A_ ) )
				self.assertListEqual(A_       ,   A_ )

				UpperCamelCase						=  tokenizer.encode(A_       ,   add_special_tokens=A_ )
				UpperCamelCase						=  rust_tokenizer.encode(A_       ,   add_special_tokens=A_ )
				self.assertListEqual(A_       ,   A_ )

				UpperCamelCase						=  self.get_rust_tokenizer()
				UpperCamelCase						=  tokenizer.encode(A_ )
				UpperCamelCase						=  rust_tokenizer.encode(A_ )
				self.assertListEqual(A_       ,   A_ )



		def __UpperCamelCase				(				self )						->      Union[str, Any]:
				"""simple docstring"""
				UpperCamelCase						=  'This is a test'
				UpperCamelCase						=  [13, 1, 4_398, 25, 21, 1_289]
				UpperCamelCase						=  ['▁', 'T', 'his', '▁is', '▁a', '▁test']
				UpperCamelCase						=  ['▁', '<unk>', 'his', '▁is', '▁a', '▁test']

				UpperCamelCase						=  DebertaVaTokenizer(A_       ,   keep_accents=A_ )
				UpperCamelCase						=  DebertaVaTokenizerFast(A_       ,   keep_accents=A_ )

				UpperCamelCase						=  tokenizer.encode(A_       ,   add_special_tokens=A_ )
				self.assertListEqual(A_       ,   A_ )
				UpperCamelCase						=  tokenizer.tokenize(A_ )
				self.assertListEqual(A_       ,   A_ )
				UpperCamelCase						=  tokenizer.convert_ids_to_tokens(A_ )
				self.assertListEqual(A_       ,   A_ )

				UpperCamelCase						=  rust_tokenizer.encode(A_       ,   add_special_tokens=A_ )
				self.assertListEqual(A_       ,   A_ )
				UpperCamelCase						=  rust_tokenizer.tokenize(A_ )
				self.assertListEqual(A_       ,   A_ )
				UpperCamelCase						=  rust_tokenizer.convert_ids_to_tokens(A_ )
				self.assertListEqual(A_       ,   A_ )

				# fmt: off
				UpperCamelCase						=  'I was born in 92000, and this is falsé.'
				UpperCamelCase						=  [13, 1, 23, 386, 19, 561, 3_050, 15, 17, 48, 25, 8_256, 18, 1, 9]
				UpperCamelCase						=  ['▁', 'I', '▁was', '▁born', '▁in', '▁9', '2000', ',', '▁and', '▁this', '▁is', '▁fal', 's', 'é', '.', ]
				UpperCamelCase						=  ['▁', '<unk>', '▁was', '▁born', '▁in', '▁9', '2000', ',', '▁and', '▁this', '▁is', '▁fal', 's', '<unk>', '.', ]
				# fmt: on

				UpperCamelCase						=  tokenizer.encode(A_       ,   add_special_tokens=A_ )
				self.assertListEqual(A_       ,   A_ )
				UpperCamelCase						=  tokenizer.tokenize(A_ )
				self.assertListEqual(A_       ,   A_ )
				UpperCamelCase						=  tokenizer.convert_ids_to_tokens(A_ )
				self.assertListEqual(A_       ,   A_ )

				UpperCamelCase						=  rust_tokenizer.encode(A_       ,   add_special_tokens=A_ )
				self.assertListEqual(A_       ,   A_ )
				UpperCamelCase						=  rust_tokenizer.tokenize(A_ )
				self.assertListEqual(A_       ,   A_ )
				UpperCamelCase						=  rust_tokenizer.convert_ids_to_tokens(A_ )
				self.assertListEqual(A_       ,   A_ )



		def __UpperCamelCase				(				self )						->      int:
				"""simple docstring"""
				UpperCamelCase						=  DebertaVaTokenizer(A_ )

				UpperCamelCase						=  tokenizer.encode('sequence builders' )
				UpperCamelCase						=  tokenizer.encode('multi-sequence build' )

				UpperCamelCase						=  tokenizer.build_inputs_with_special_tokens(A_ )
				UpperCamelCase						=  tokenizer.build_inputs_with_special_tokens(A_       ,   A_ )

				self.assertEqual([tokenizer.cls_token_id] + text + [tokenizer.sep_token_id]       ,   A_ )
				self.assertEqual(
				    [tokenizer.cls_token_id] + text + [tokenizer.sep_token_id] + text_a + [tokenizer.sep_token_id]       ,   A_       ,   )



		@slow
		def __UpperCamelCase				(				self )						->      Any:
				"""simple docstring"""
				UpperCamelCase						=  {'input_ids': [[1, 39_867, 36, 19_390, 486, 27, 35_052, 81_436, 18, 60_685, 1_225, 7, 35_052, 81_436, 18, 9_367, 16_899, 18, 15_937, 53, 594, 773, 18, 16_287, 30_465, 36, 15_937, 6, 41_139, 38, 36_979, 60_763, 191, 6, 34_132, 99, 6, 50_538, 390, 43_230, 6, 34_132, 2_779, 20_850, 14, 699, 1_072, 1_194, 36, 382, 10_901, 53, 7, 699, 1_072, 2_084, 36, 20_422, 630, 53, 19, 105, 3_049, 1_896, 1_053, 16_899, 1_506, 11, 37_978, 4_243, 7, 1_237, 31_869, 200, 16_566, 654, 6, 35_052, 81_436, 7, 55_630, 13_593, 4, 2], [1, 26, 15_011, 13, 667, 8, 1_053, 18, 23_611, 1_237, 72_356, 12_820, 34, 104_134, 1_209, 35, 13_313, 6_627, 21, 202, 347, 7, 164, 2_399, 11, 46, 4_485, 4, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [1, 5, 1_232, 2_864, 15_785, 14_951, 105, 5, 8_581, 1_250, 4, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]], 'token_type_ids': [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]], 'attention_mask': [[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]]}  # noqa: E501
				# fmt: on

				self.tokenizer_integration_test_util(
				    expected_encoding=A_       ,   model_name='microsoft/deberta-v2-xlarge'       ,   revision='ad6e42c1532ddf3a15c39246b63f5559d558b670'       ,   )


from scipy.stats import pearsonr, spearmanr
from sklearn.metrics import fa_score, matthews_corrcoef

import datasets


_UpperCAmelCase      :				Any          = "\\n@inproceedings{wang2019glue,\n  title={{GLUE}: A Multi-Task Benchmark and Analysis Platform for Natural Language Understanding},\n  author={Wang, Alex and Singh, Amanpreet and Michael, Julian and Hill, Felix and Levy, Omer and Bowman, Samuel R.},\n  note={In the Proceedings of ICLR.},\n  year={2019}\n}\n"

_UpperCAmelCase      :				str          = "\\nGLUE, the General Language Understanding Evaluation benchmark\n(https://gluebenchmark.com/) is a collection of resources for training,\nevaluating, and analyzing natural language understanding systems.\n"

_UpperCAmelCase      :				List[str]          = "\nCompute GLUE evaluation metric associated to each GLUE dataset.\nArgs:\n    predictions: list of predictions to score.\n        Each translation should be tokenized into a list of tokens.\n    references: list of lists of references for each translation.\n        Each reference should be tokenized into a list of tokens.\nReturns: depending on the GLUE subset, one or several of:\n    \"accuracy\": Accuracy\n    \"f1\": F1 score\n    \"pearson\": Pearson Correlation\n    \"spearmanr\": Spearman Correlation\n    \"matthews_correlation\": Matthew Correlation\nExamples:\n\n    >>> glue_metric = datasets.load_metric('glue', 'sst2')  # 'sst2' or any of [\"mnli\", \"mnli_mismatched\", \"mnli_matched\", \"qnli\", \"rte\", \"wnli\", \"hans\"]\n    >>> references = [0, 1]\n    >>> predictions = [0, 1]\n    >>> results = glue_metric.compute(predictions=predictions, references=references)\n    >>> print(results)\n    {'accuracy': 1.0}\n\n    >>> glue_metric = datasets.load_metric('glue', 'mrpc')  # 'mrpc' or 'qqp'\n    >>> references = [0, 1]\n    >>> predictions = [0, 1]\n    >>> results = glue_metric.compute(predictions=predictions, references=references)\n    >>> print(results)\n    {'accuracy': 1.0, 'f1': 1.0}\n\n    >>> glue_metric = datasets.load_metric('glue', 'stsb')\n    >>> references = [0., 1., 2., 3., 4., 5.]\n    >>> predictions = [0., 1., 2., 3., 4., 5.]\n    >>> results = glue_metric.compute(predictions=predictions, references=references)\n    >>> print({\"pearson\": round(results[\"pearson\"], 2), \"spearmanr\": round(results[\"spearmanr\"], 2)})\n    {'pearson': 1.0, 'spearmanr': 1.0}\n\n    >>> glue_metric = datasets.load_metric('glue', 'cola')\n    >>> references = [0, 1]\n    >>> predictions = [0, 1]\n    >>> results = glue_metric.compute(predictions=predictions, references=references)\n    >>> print(results)\n    {'matthews_correlation': 1.0}\n"


def    A (      lowercase					, lowercase				)     ->						List[str]:
		'''simple docstring'''

		return float((preds == labels).mean()				)


def    A (      lowercase					, lowercase				)     ->						Tuple:
		'''simple docstring'''

		UpperCamelCase						=  simple_accuracy(lowercase					, lowercase				)
		UpperCamelCase						=  float(fa_score(y_true=lowercase					, y_pred=lowercase				)				)
		return {
		    "accuracy": acc,
		    "f1": fa,
		}


def    A (      lowercase					, lowercase				)     ->						Optional[int]:
		'''simple docstring'''

		UpperCamelCase						=  float(pearsonr(lowercase					, lowercase				)[0]				)
		UpperCamelCase						=  float(spearmanr(lowercase					, lowercase				)[0]				)
		return {
		    "pearson": pearson_corr,
		    "spearmanr": spearman_corr,
		}


@datasets.utils.file_utils.add_start_docstrings(_DESCRIPTION						,     _KWARGS_DESCRIPTION     )
class        lowercase      (	datasets.Metric     ):



		def __UpperCamelCase				(				self )						->      Optional[Any]:
				"""simple docstring"""
				if self.config_name not in [
				    "sst2",
				    "mnli",
				    "mnli_mismatched",
				    "mnli_matched",
				    "cola",
				    "stsb",
				    "mrpc",
				    "qqp",
				    "qnli",
				    "rte",
				    "wnli",
				    "hans",
				]:
						raise KeyError(
						    'You should supply a configuration name selected in '
						    '["sst2", "mnli", "mnli_mismatched", "mnli_matched", '
						    '"cola", "stsb", "mrpc", "qqp", "qnli", "rte", "wnli", "hans"]' )
				return datasets.MetricInfo(
				    description=_DESCRIPTION       ,   citation=_CITATION       ,   inputs_description=_KWARGS_DESCRIPTION       ,   features=datasets.Features(
				        {
				            'predictions': datasets.Value('int64' if self.config_name != 'stsb' else 'float32' ),
				            'references': datasets.Value('int64' if self.config_name != 'stsb' else 'float32' ),
				        } )       ,   codebase_urls=[]       ,   reference_urls=[]       ,   format='numpy'       ,   )



		def __UpperCamelCase				(				self       ,   A_       ,   A_ )						->      Any:
				"""simple docstring"""
				if self.config_name == "cola":
						return {"matthews_correlation": matthews_corrcoef(A_       ,   A_ )}
				elif self.config_name == "stsb":
						return pearson_and_spearman(A_       ,   A_ )
				elif self.config_name in ["mrpc", "qqp"]:
						return acc_and_fa(A_       ,   A_ )
				elif self.config_name in ["sst2", "mnli", "mnli_mismatched", "mnli_matched", "qnli", "rte", "wnli", "hans"]:
						return {"accuracy": simple_accuracy(A_       ,   A_ )}
				else:
						raise KeyError(
						    'You should supply a configuration name selected in '
						    '["sst2", "mnli", "mnli_mismatched", "mnli_matched", '
						    '"cola", "stsb", "mrpc", "qqp", "qnli", "rte", "wnli", "hans"]' )
