


import os
import tempfile
import unittest

from transformers import FlaubertConfig, is_torch_available
from transformers.testing_utils import require_torch, require_torch_gpu, slow, torch_device

from ...test_configuration_common import ConfigTester
from ...test_modeling_common import ModelTesterMixin, ids_tensor, random_attention_mask
from ...test_pipeline_mixin import PipelineTesterMixin


if is_torch_available():
			import torch

			from transformers import (
			    FlaubertForMultipleChoice,
			    FlaubertForQuestionAnswering,
			    FlaubertForQuestionAnsweringSimple,
			    FlaubertForSequenceClassification,
			    FlaubertForTokenClassification,
			    FlaubertModel,
			    FlaubertWithLMHeadModel,
			)
			from transformers.models.flaubert.modeling_flaubert import FLAUBERT_PRETRAINED_MODEL_ARCHIVE_LIST


class 			_a				(     UpperCamelCase__     ):

							def __init__(				self:      Optional[int]       ,		UpperCamelCase_:      Dict       ,		UpperCamelCase_:      Optional[int]=13       ,		UpperCamelCase_:      List[Any]=7       ,		UpperCamelCase_:      Tuple=True       ,		UpperCamelCase_:      List[Any]=True       ,		UpperCamelCase_:      Dict=True       ,		UpperCamelCase_:      Optional[Any]=True       ,		UpperCamelCase_:      Dict=True       ,		UpperCamelCase_:      Optional[int]=False       ,		UpperCamelCase_:      str=False       ,		UpperCamelCase_:      Any=False       ,		UpperCamelCase_:      int=2       ,		UpperCamelCase_:      Dict=99       ,		UpperCamelCase_:      Tuple=0       ,		UpperCamelCase_:      Tuple=32       ,		UpperCamelCase_:      List[str]=5       ,		UpperCamelCase_:      Tuple=4       ,		UpperCamelCase_:      Union[str, Any]=0.1       ,		UpperCamelCase_:      Tuple=0.1       ,		UpperCamelCase_:      Any=512       ,		UpperCamelCase_:      Union[str, Any]=12       ,		UpperCamelCase_:      Optional[Any]=2       ,		UpperCamelCase_:      Any=0.02       ,		UpperCamelCase_:      Tuple=3       ,		UpperCamelCase_:      Optional[int]=4       ,		UpperCamelCase_:      Dict="last"       ,		UpperCamelCase_:      Optional[Any]=None       ,		UpperCamelCase_:      Union[str, Any]=None       ,		)     ->  List[str]:





									"""simple docstring"""







									lowercase__				= parent
									lowercase__				= batch_size
									lowercase__				= seq_length
									lowercase__				= is_training
									lowercase__				= use_input_lengths
									lowercase__				= use_token_type_ids
									lowercase__				= use_labels
									lowercase__				= gelu_activation
									lowercase__				= sinusoidal_embeddings
									lowercase__				= causal
									lowercase__				= asm
									lowercase__				= n_langs
									lowercase__				= vocab_size
									lowercase__				= n_special
									lowercase__				= hidden_size
									lowercase__				= num_hidden_layers
									lowercase__				= num_attention_heads
									lowercase__				= hidden_dropout_prob
									lowercase__				= attention_probs_dropout_prob
									lowercase__				= max_position_embeddings
									lowercase__				= type_vocab_size
									lowercase__				= type_sequence_label_size
									lowercase__				= initializer_range
									lowercase__				= num_labels
									lowercase__				= num_choices
									lowercase__				= summary_type
									lowercase__				= use_proj
									lowercase__				= scope

							def  lowerCamelCase_					(				self:      Optional[Any]				)     ->  str:





									"""simple docstring"""







									lowercase__				= ids_tensor([self.batch_size, self.seq_length]       ,		self.vocab_size				)
									lowercase__				= random_attention_mask([self.batch_size, self.seq_length]				)

									lowercase__				= None
									if self.use_input_lengths:
											lowercase__				= (
											    ids_tensor([self.batch_size]       ,		vocab_size=2				) + self.seq_length - 2
											)  # small variation of seq_length

									lowercase__				= None
									if self.use_token_type_ids:
											lowercase__				= ids_tensor([self.batch_size, self.seq_length]       ,		self.n_langs				)

									lowercase__				= None
									lowercase__				= None
									lowercase__				= None
									if self.use_labels:
											lowercase__				= ids_tensor([self.batch_size]       ,		self.type_sequence_label_size				)
											lowercase__				= ids_tensor([self.batch_size, self.seq_length]       ,		self.num_labels				)
											lowercase__				= ids_tensor([self.batch_size]       ,		2				).float()
											lowercase__				= ids_tensor([self.batch_size]       ,		self.num_choices				)

									lowercase__				= self.get_config()

									return (
									    config,
									    input_ids,
									    token_type_ids,
									    input_lengths,
									    sequence_labels,
									    token_labels,
									    is_impossible_labels,
									    choice_labels,
									    input_mask,
									)

							def  lowerCamelCase_					(				self:      int				)     ->  Optional[Any]:





									"""simple docstring"""







									return FlaubertConfig(
									    vocab_size=self.vocab_size       ,		n_special=self.n_special       ,		emb_dim=self.hidden_size       ,		n_layers=self.num_hidden_layers       ,		n_heads=self.num_attention_heads       ,		dropout=self.hidden_dropout_prob       ,		attention_dropout=self.attention_probs_dropout_prob       ,		gelu_activation=self.gelu_activation       ,		sinusoidal_embeddings=self.sinusoidal_embeddings       ,		asm=self.asm       ,		causal=self.causal       ,		n_langs=self.n_langs       ,		max_position_embeddings=self.max_position_embeddings       ,		initializer_range=self.initializer_range       ,		summary_type=self.summary_type       ,		use_proj=self.use_proj       ,		)

							def  lowerCamelCase_					(				self:      Optional[int]       ,		UpperCamelCase_:      Tuple       ,		UpperCamelCase_:      List[Any]       ,		UpperCamelCase_:      Union[str, Any]       ,		UpperCamelCase_:      List[Any]       ,		UpperCamelCase_:      List[Any]       ,		UpperCamelCase_:      Optional[int]       ,		UpperCamelCase_:      Dict       ,		UpperCamelCase_:      Any       ,		UpperCamelCase_:      Any       ,		)     ->  Optional[int]:





									"""simple docstring"""







									lowercase__				= FlaubertModel(config=UpperCamelCase_				)
									model.to(UpperCamelCase_				)
									model.eval()
									lowercase__				= model(UpperCamelCase_       ,		lengths=UpperCamelCase_       ,		langs=UpperCamelCase_				)
									lowercase__				= model(UpperCamelCase_       ,		langs=UpperCamelCase_				)
									lowercase__				= model(UpperCamelCase_				)
									self.parent.assertEqual(result.last_hidden_state.shape       ,		(self.batch_size, self.seq_length, self.hidden_size)				)

							def  lowerCamelCase_					(				self:      Any       ,		UpperCamelCase_:      Tuple       ,		UpperCamelCase_:      List[str]       ,		UpperCamelCase_:      List[Any]       ,		UpperCamelCase_:      Optional[int]       ,		UpperCamelCase_:      Dict       ,		UpperCamelCase_:      Dict       ,		UpperCamelCase_:      str       ,		UpperCamelCase_:      Optional[int]       ,		UpperCamelCase_:      Any       ,		)     ->  str:





									"""simple docstring"""







									lowercase__				= FlaubertWithLMHeadModel(UpperCamelCase_				)
									model.to(UpperCamelCase_				)
									model.eval()

									lowercase__				= model(UpperCamelCase_       ,		token_type_ids=UpperCamelCase_       ,		labels=UpperCamelCase_				)
									self.parent.assertEqual(result.loss.shape       ,		()				)
									self.parent.assertEqual(result.logits.shape       ,		(self.batch_size, self.seq_length, self.vocab_size)				)

							def  lowerCamelCase_					(				self:      str       ,		UpperCamelCase_:      Any       ,		UpperCamelCase_:      Optional[int]       ,		UpperCamelCase_:      Optional[int]       ,		UpperCamelCase_:      int       ,		UpperCamelCase_:      List[str]       ,		UpperCamelCase_:      Tuple       ,		UpperCamelCase_:      List[str]       ,		UpperCamelCase_:      List[Any]       ,		UpperCamelCase_:      Optional[Any]       ,		)     ->  Dict:





									"""simple docstring"""







									lowercase__				= FlaubertForQuestionAnsweringSimple(UpperCamelCase_				)
									model.to(UpperCamelCase_				)
									model.eval()

									lowercase__				= model(UpperCamelCase_				)

									lowercase__				= model(UpperCamelCase_       ,		start_positions=UpperCamelCase_       ,		end_positions=UpperCamelCase_				)
									self.parent.assertEqual(result.start_logits.shape       ,		(self.batch_size, self.seq_length)				)
									self.parent.assertEqual(result.end_logits.shape       ,		(self.batch_size, self.seq_length)				)

							def  lowerCamelCase_					(				self:      Optional[int]       ,		UpperCamelCase_:      Any       ,		UpperCamelCase_:      Union[str, Any]       ,		UpperCamelCase_:      Optional[int]       ,		UpperCamelCase_:      str       ,		UpperCamelCase_:      Optional[int]       ,		UpperCamelCase_:      Optional[int]       ,		UpperCamelCase_:      List[str]       ,		UpperCamelCase_:      Any       ,		UpperCamelCase_:      int       ,		)     ->  Optional[int]:





									"""simple docstring"""







									lowercase__				= FlaubertForQuestionAnswering(UpperCamelCase_				)
									model.to(UpperCamelCase_				)
									model.eval()

									lowercase__				= model(UpperCamelCase_				)

									lowercase__				= model(
									    UpperCamelCase_       ,		start_positions=UpperCamelCase_       ,		end_positions=UpperCamelCase_       ,		cls_index=UpperCamelCase_       ,		is_impossible=UpperCamelCase_       ,		p_mask=UpperCamelCase_       ,		)

									lowercase__				= model(
									    UpperCamelCase_       ,		start_positions=UpperCamelCase_       ,		end_positions=UpperCamelCase_       ,		cls_index=UpperCamelCase_       ,		is_impossible=UpperCamelCase_       ,		)

									((lowercase__)	,						)				= result_with_labels.to_tuple()

									lowercase__				= model(UpperCamelCase_       ,		start_positions=UpperCamelCase_       ,		end_positions=UpperCamelCase_				)

									((lowercase__)	,						)				= result_with_labels.to_tuple()

									self.parent.assertEqual(result_with_labels.loss.shape       ,		()				)
									self.parent.assertEqual(result.start_top_log_probs.shape       ,		(self.batch_size, model.config.start_n_top)				)
									self.parent.assertEqual(result.start_top_index.shape       ,		(self.batch_size, model.config.start_n_top)				)
									self.parent.assertEqual(
									    result.end_top_log_probs.shape       ,		(self.batch_size, model.config.start_n_top * model.config.end_n_top)				)
									self.parent.assertEqual(
									    result.end_top_index.shape       ,		(self.batch_size, model.config.start_n_top * model.config.end_n_top)				)
									self.parent.assertEqual(result.cls_logits.shape       ,		(self.batch_size,)				)

							def  lowerCamelCase_					(				self:      List[Any]       ,		UpperCamelCase_:      Any       ,		UpperCamelCase_:      Dict       ,		UpperCamelCase_:      str       ,		UpperCamelCase_:      Optional[int]       ,		UpperCamelCase_:      str       ,		UpperCamelCase_:      str       ,		UpperCamelCase_:      Any       ,		UpperCamelCase_:      Optional[Any]       ,		UpperCamelCase_:      Tuple       ,		)     ->  Optional[Any]:





									"""simple docstring"""







									lowercase__				= FlaubertForSequenceClassification(UpperCamelCase_				)
									model.to(UpperCamelCase_				)
									model.eval()

									lowercase__				= model(UpperCamelCase_				)
									lowercase__				= model(UpperCamelCase_       ,		labels=UpperCamelCase_				)

									self.parent.assertEqual(result.loss.shape       ,		()				)
									self.parent.assertEqual(result.logits.shape       ,		(self.batch_size, self.type_sequence_label_size)				)

							def  lowerCamelCase_					(				self:      Optional[int]       ,		UpperCamelCase_:      Dict       ,		UpperCamelCase_:      Optional[Any]       ,		UpperCamelCase_:      Dict       ,		UpperCamelCase_:      int       ,		UpperCamelCase_:      Union[str, Any]       ,		UpperCamelCase_:      Union[str, Any]       ,		UpperCamelCase_:      Any       ,		UpperCamelCase_:      List[str]       ,		UpperCamelCase_:      List[str]       ,		)     ->  int:





									"""simple docstring"""







									lowercase__				= self.num_labels
									lowercase__				= FlaubertForTokenClassification(UpperCamelCase_				)
									model.to(UpperCamelCase_				)
									model.eval()

									lowercase__				= model(UpperCamelCase_       ,		attention_mask=UpperCamelCase_       ,		labels=UpperCamelCase_				)
									self.parent.assertEqual(result.logits.shape       ,		(self.batch_size, self.seq_length, self.num_labels)				)

							def  lowerCamelCase_					(				self:      Any       ,		UpperCamelCase_:      Optional[int]       ,		UpperCamelCase_:      Union[str, Any]       ,		UpperCamelCase_:      Optional[Any]       ,		UpperCamelCase_:      Optional[int]       ,		UpperCamelCase_:      Any       ,		UpperCamelCase_:      Dict       ,		UpperCamelCase_:      Optional[Any]       ,		UpperCamelCase_:      Tuple       ,		UpperCamelCase_:      int       ,		)     ->  List[str]:





									"""simple docstring"""







									lowercase__				= self.num_choices
									lowercase__				= FlaubertForMultipleChoice(config=UpperCamelCase_				)
									model.to(UpperCamelCase_				)
									model.eval()
									lowercase__				= input_ids.unsqueeze(1				).expand(-1       ,		self.num_choices       ,		-1				).contiguous()
									lowercase__				= token_type_ids.unsqueeze(1				).expand(-1       ,		self.num_choices       ,		-1				).contiguous()
									lowercase__				= input_mask.unsqueeze(1				).expand(-1       ,		self.num_choices       ,		-1				).contiguous()
									lowercase__				= model(
									    UpperCamelCase_       ,		attention_mask=UpperCamelCase_       ,		token_type_ids=UpperCamelCase_       ,		labels=UpperCamelCase_       ,		)
									self.parent.assertEqual(result.logits.shape       ,		(self.batch_size, self.num_choices)				)


							def  lowerCamelCase_					(				self:      List[str]				)     ->  Optional[int]:





									"""simple docstring"""







									lowercase__				= self.prepare_config_and_inputs()
									(
									    (
									    lowercase__
									)	,						(
									    lowercase__
									)	,						(
									    lowercase__
									)	,						(
									    lowercase__
									)	,						(
									    lowercase__
									)	,						(
									    lowercase__
									)	,						(
									    lowercase__
									)	,						(
									    lowercase__
									)	,						(
									    lowercase__
									)	,						
									)				= config_and_inputs
									lowercase__				= {
									    '''input_ids''': input_ids,
									    '''token_type_ids''': token_type_ids,
									    '''lengths''': input_lengths,
									    '''attention_mask''': input_mask,
									}
									return config, inputs_dict


@require_torch
class 			_a				(     UpperCamelCase__	,      UpperCamelCase__	,      unittest.TestCase     ):
							_lowercase      :     Optional[int]     =					(
							    (
							        FlaubertModel,
							        FlaubertWithLMHeadModel,
							        FlaubertForQuestionAnswering,
							        FlaubertForQuestionAnsweringSimple,
							        FlaubertForSequenceClassification,
							        FlaubertForTokenClassification,
							        FlaubertForMultipleChoice,
							    )
							    if is_torch_available()
							    else ()
							)
							_lowercase      :     str     =					(
							    {
							        '''feature-extraction''': FlaubertModel,
							        '''fill-mask''': FlaubertWithLMHeadModel,
							        '''question-answering''': FlaubertForQuestionAnsweringSimple,
							        '''text-classification''': FlaubertForSequenceClassification,
							        '''token-classification''': FlaubertForTokenClassification,
							        '''zero-shot''': FlaubertForSequenceClassification,
							    }
							    if is_torch_available()
							    else {}
							)

							def  lowerCamelCase_					(				self:      Any       ,		UpperCamelCase_:      str       ,		UpperCamelCase_:      Union[str, Any]       ,		UpperCamelCase_:      Tuple       ,		UpperCamelCase_:      Dict       ,		UpperCamelCase_:      Any				)     ->  Dict:





									"""simple docstring"""







									if (
									    pipeline_test_casse_name == "QAPipelineTests"
									    and tokenizer_name is not None
									    and not tokenizer_name.endswith('''Fast'''				)
									):
											# `QAPipelineTests` fails for a few models when the slower tokenizer are used.
											# (The slower tokenizers were never used for pipeline tests before the pipeline testing rework)
											# TODO: check (and possibly fix) the `QAPipelineTests` with slower tokenizer
											return True

									return False

							def  lowerCamelCase_					(				self:      Tuple       ,		UpperCamelCase_:      Optional[int]       ,		UpperCamelCase_:      int       ,		UpperCamelCase_:      Any=False				)     ->  Tuple:





									"""simple docstring"""







									lowercase__				= super()._prepare_for_class(UpperCamelCase_       ,		UpperCamelCase_       ,		return_labels=UpperCamelCase_				)

									if return_labels:
											if model_class.__name__ == "FlaubertForQuestionAnswering":
													lowercase__				= torch.zeros(
													    self.model_tester.batch_size       ,		dtype=torch.long       ,		device=UpperCamelCase_				)
													lowercase__				= torch.zeros(
													    self.model_tester.batch_size       ,		dtype=torch.long       ,		device=UpperCamelCase_				)

									return inputs_dict

							def  lowerCamelCase_					(				self:      Any				)     ->  Dict:





									"""simple docstring"""







									lowercase__				= FlaubertModelTester(self				)
									lowercase__				= ConfigTester(self       ,		config_class=UpperCamelCase_       ,		emb_dim=37				)

							def  lowerCamelCase_					(				self:      int				)     ->  int:





									"""simple docstring"""







									self.config_tester.run_common_tests()

							def  lowerCamelCase_					(				self:      str				)     ->  Union[str, Any]:





									"""simple docstring"""







									lowercase__				= self.model_tester.prepare_config_and_inputs()
									self.model_tester.create_and_check_flaubert_model(*UpperCamelCase_				)

							def  lowerCamelCase_					(				self:      List[Any]				)     ->  List[str]:





									"""simple docstring"""







									lowercase__				= self.model_tester.prepare_config_and_inputs()
									self.model_tester.create_and_check_flaubert_lm_head(*UpperCamelCase_				)

							def  lowerCamelCase_					(				self:      int				)     ->  Union[str, Any]:





									"""simple docstring"""







									lowercase__				= self.model_tester.prepare_config_and_inputs()
									self.model_tester.create_and_check_flaubert_simple_qa(*UpperCamelCase_				)

							def  lowerCamelCase_					(				self:      Union[str, Any]				)     ->  str:





									"""simple docstring"""







									lowercase__				= self.model_tester.prepare_config_and_inputs()
									self.model_tester.create_and_check_flaubert_qa(*UpperCamelCase_				)

							def  lowerCamelCase_					(				self:      Optional[int]				)     ->  List[Any]:





									"""simple docstring"""







									lowercase__				= self.model_tester.prepare_config_and_inputs()
									self.model_tester.create_and_check_flaubert_sequence_classif(*UpperCamelCase_				)

							def  lowerCamelCase_					(				self:      Union[str, Any]				)     ->  List[Any]:





									"""simple docstring"""







									lowercase__				= self.model_tester.prepare_config_and_inputs()
									self.model_tester.create_and_check_flaubert_token_classif(*UpperCamelCase_				)

							def  lowerCamelCase_					(				self:      int				)     ->  Tuple:





									"""simple docstring"""







									lowercase__				= self.model_tester.prepare_config_and_inputs()
									self.model_tester.create_and_check_flaubert_multiple_choice(*UpperCamelCase_				)

							@slow
							def  lowerCamelCase_					(				self:      int				)     ->  List[str]:





									"""simple docstring"""







									for model_name in FLAUBERT_PRETRAINED_MODEL_ARCHIVE_LIST[:1]:
											lowercase__				= FlaubertModel.from_pretrained(UpperCamelCase_				)
											self.assertIsNotNone(UpperCamelCase_				)


							@slow
							@require_torch_gpu
							def  lowerCamelCase_					(				self:      Union[str, Any]				)     ->  List[Any]:





									"""simple docstring"""







									lowercase__	,						lowercase__				= self.model_tester.prepare_config_and_inputs_for_common()
									for model_class in self.all_model_classes:
											# FlauBertForMultipleChoice behaves incorrectly in JIT environments.
											if model_class == FlaubertForMultipleChoice:
													return

											lowercase__				= True
											lowercase__				= model_class(config=UpperCamelCase_				)

											lowercase__				= self._prepare_for_class(UpperCamelCase_       ,		UpperCamelCase_				)
											lowercase__				= torch.jit.trace(
											    UpperCamelCase_       ,		(inputs_dict['''input_ids'''].to('''cpu'''				), inputs_dict['''attention_mask'''].to('''cpu'''				))				)

											with tempfile.TemporaryDirectory() as tmp:
													torch.jit.save(UpperCamelCase_       ,		os.path.join(UpperCamelCase_       ,		'''traced_model.pt'''				)				)
													lowercase__				= torch.jit.load(os.path.join(UpperCamelCase_       ,		'''traced_model.pt'''				)       ,		map_location=UpperCamelCase_				)
													loaded(inputs_dict['''input_ids'''].to(UpperCamelCase_				)       ,		inputs_dict['''attention_mask'''].to(UpperCamelCase_				)				)


@require_torch
class 			_a				(     unittest.TestCase     ):

							@slow
							def  lowerCamelCase_					(				self:      Any				)     ->  Optional[int]:





									"""simple docstring"""







									lowercase__				= FlaubertModel.from_pretrained('''flaubert/flaubert_base_cased'''				)
									lowercase__				= torch.tensor([[0, 345, 232, 328, 740, 140, 1_695, 69, 6_078, 1_588, 2]]				)
									with torch.no_grad():
											lowercase__				= model(UpperCamelCase_				)[0]
									lowercase__				= torch.Size((1, 11, 768)				)
									self.assertEqual(output.shape       ,		UpperCamelCase_				)
									lowercase__				= torch.tensor(
									    [[[-2.6251, -1.4298, -0.0227], [-2.8510, -1.6387, 0.2258], [-2.8114, -1.1832, -0.3066]]]				)

									self.assertTrue(torch.allclose(output[:, :3, :3]       ,		UpperCamelCase_       ,		atol=1E-4				)				)






import datasets


snake_case							:       int										=	'''\
@InProceedings{conneau2018xnli,
  author = "Conneau, Alexis
                 and Rinott, Ruty
                 and Lample, Guillaume
                 and Williams, Adina
                 and Bowman, Samuel R.
                 and Schwenk, Holger
                 and Stoyanov, Veselin",
  title = "XNLI: Evaluating Cross-lingual Sentence Representations",
  booktitle = "Proceedings of the 2018 Conference on Empirical Methods
               in Natural Language Processing",
  year = "2018",
  publisher = "Association for Computational Linguistics",
  location = "Brussels, Belgium",
}
'''

snake_case							:       Tuple										=	'''\
XNLI is a subset of a few thousand examples from MNLI which has been translated
into a 14 different languages (some low-ish resource). As with MNLI, the goal is
to predict textual entailment (does sentence A imply/contradict/neither sentence
B) and is a classification task (given two sentences, predict one of three
labels).
'''

snake_case							:       Union[str, Any]										=	'''
Computes XNLI score which is just simple accuracy.
Args:
    predictions: Predicted labels.
    references: Ground truth labels.
Returns:
    \'accuracy\': accuracy
Examples:

    >>> predictions = [0, 1]
    >>> references = [0, 1]
    >>> xnli_metric = datasets.load_metric("xnli")
    >>> results = xnli_metric.compute(predictions=predictions, references=references)
    >>> print(results)
    {\'accuracy\': 1.0}
'''
def 							__lowerCamelCase		(					UpperCAmelCase_		:						List[Any]					,    UpperCAmelCase_		:						List[str]		):




      """simple docstring"""





      return (preds == labels).mean()







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




 def 			SCREAMING_SNAKE_CASE__							(						self       ):
       return datasets.MetricInfo(
           description=_DESCRIPTION   ,    citation=_CITATION   ,    inputs_description=_KWARGS_DESCRIPTION   ,    features=datasets.Features(
               {
                   '''predictions''': datasets.Value('''int64''' if self.config_name != '''sts-b''' else '''float32'''       ),
                   '''references''': datasets.Value('''int64''' if self.config_name != '''sts-b''' else '''float32'''       ),
               }       )   ,    codebase_urls=[]   ,    reference_urls=[]   ,    format='''numpy'''   ,    )




 def 			SCREAMING_SNAKE_CASE__							(						self   ,    _lowerCamelCase   ,    _lowerCamelCase       ):
       return {"accuracy": simple_accuracy(_lowerCamelCase   ,    _lowerCamelCase       )}





