



"""simple docstring"""






from dataclasses import dataclass
from typing import Dict, Optional, Tuple, Union

import torch
import torch.nn as nn

from ..configuration_utils import ConfigMixin, register_to_config
from ..utils import BaseOutput, apply_forward_hook
from .attention_processor import AttentionProcessor, AttnProcessor
from .modeling_utils import ModelMixin
from .vae import Decoder, DecoderOutput, DiagonalGaussianDistribution, Encoder



@dataclass
class 			A__   (  __SCREAMING_SNAKE_CASE							):




	'''simple docstring'''





	SCREAMING_SNAKE_CASE          =	42






class 			A__   (  __SCREAMING_SNAKE_CASE  ,		__SCREAMING_SNAKE_CASE							):




	'''simple docstring'''





	SCREAMING_SNAKE_CASE          =	True

	@register_to_config
	def __init__(     self:		Optional[int]       ,			_SCREAMING_SNAKE_CASE:		int = 3       ,			_SCREAMING_SNAKE_CASE:		int = 3       ,			_SCREAMING_SNAKE_CASE:		Tuple[str] = ("DownEncoderBlock2D",)       ,			_SCREAMING_SNAKE_CASE:		Tuple[str] = ("UpDecoderBlock2D",)       ,			_SCREAMING_SNAKE_CASE:		Tuple[int] = (64,)       ,			_SCREAMING_SNAKE_CASE:		int = 1       ,			_SCREAMING_SNAKE_CASE:		str = "silu"       ,			_SCREAMING_SNAKE_CASE:		int = 4       ,			_SCREAMING_SNAKE_CASE:		int = 32       ,			_SCREAMING_SNAKE_CASE:		int = 32       ,			_SCREAMING_SNAKE_CASE:		float = 0.1_8215       ,			)				->       List[str]:

				"""simple docstring"""

				super().__init__()

				# pass init params to Encoder
				__lowerCAmelCase      :  int												=       Encoder(
				    in_channels=_SCREAMING_SNAKE_CASE       ,			out_channels=_SCREAMING_SNAKE_CASE       ,			down_block_types=_SCREAMING_SNAKE_CASE       ,			block_out_channels=_SCREAMING_SNAKE_CASE       ,			layers_per_block=_SCREAMING_SNAKE_CASE       ,			act_fn=_SCREAMING_SNAKE_CASE       ,			norm_num_groups=_SCREAMING_SNAKE_CASE       ,			double_z=_SCREAMING_SNAKE_CASE       ,			)

				# pass init params to Decoder
				__lowerCAmelCase      :  List[Any]												=       Decoder(
				    in_channels=_SCREAMING_SNAKE_CASE       ,			out_channels=_SCREAMING_SNAKE_CASE       ,			up_block_types=_SCREAMING_SNAKE_CASE       ,			block_out_channels=_SCREAMING_SNAKE_CASE       ,			layers_per_block=_SCREAMING_SNAKE_CASE       ,			norm_num_groups=_SCREAMING_SNAKE_CASE       ,			act_fn=_SCREAMING_SNAKE_CASE       ,			)

				__lowerCAmelCase      :  Union[str, Any]												=       nn.Convad(2 * latent_channels       ,			2 * latent_channels       ,			1)
				__lowerCAmelCase      :  str												=       nn.Convad(_SCREAMING_SNAKE_CASE       ,			_SCREAMING_SNAKE_CASE       ,			1)

				__lowerCAmelCase      :  int												=       False
				__lowerCAmelCase      :  str												=       False

				# only relevant if vae tiling is enabled
				__lowerCAmelCase      :  List[Any]												=       self.config.sample_size
				__lowerCAmelCase      :  Tuple												=       (
				    self.config.sample_size[0]
				    if isinstance(self.config.sample_size       ,			(list, tuple))
				    else self.config.sample_size
				)
				__lowerCAmelCase      :  Dict												=       int(sample_size / (2 ** (len(self.config.block_out_channels) - 1)))
				__lowerCAmelCase      :  Tuple												=       0.25

	def 							_SCREAMING_SNAKE_CASE   (     self:		Optional[Any]       ,			_SCREAMING_SNAKE_CASE:		Any       ,			_SCREAMING_SNAKE_CASE:		Dict=False)				->       Optional[Any]:

				"""simple docstring"""

				if isinstance(_SCREAMING_SNAKE_CASE       ,			(Encoder, Decoder)):
							__lowerCAmelCase      :  Tuple												=       value

	def 							_SCREAMING_SNAKE_CASE   (     self:		Any       ,			_SCREAMING_SNAKE_CASE:		bool = True)				->       List[str]:

				"""simple docstring"""

				__lowerCAmelCase      :  Union[str, Any]												=       use_tiling

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

				"""simple docstring"""

				self.enable_tiling(_SCREAMING_SNAKE_CASE)

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

				"""simple docstring"""

				__lowerCAmelCase      :  Optional[int]												=       True

	def 							_SCREAMING_SNAKE_CASE   (     self:		Tuple)				->       str:

				"""simple docstring"""

				__lowerCAmelCase      :  List[str]												=       False

	@property
	# Copied from diffusers.models.unet_2d_condition.UNet2DConditionModel.attn_processors
	def 							_SCREAMING_SNAKE_CASE   (     self:		List[str])				->       Dict[str, AttentionProcessor]:

				"""simple docstring"""

				__lowerCAmelCase      :  str												=       {}

				def fn_recursive_add_processors(_SCREAMING_SNAKE_CASE:		str       ,			_SCREAMING_SNAKE_CASE:		torch.nn.Module       ,			_SCREAMING_SNAKE_CASE:		Dict[str, AttentionProcessor]):
							if hasattr(_SCREAMING_SNAKE_CASE       ,			"set_processor"):
										__lowerCAmelCase      :  Tuple												=       module.processor

							for sub_name, child in module.named_children():
										fn_recursive_add_processors(F"""{name}.{sub_name}"""       ,			_SCREAMING_SNAKE_CASE       ,			_SCREAMING_SNAKE_CASE)

							return processors

				for name, module in self.named_children():
							fn_recursive_add_processors(_SCREAMING_SNAKE_CASE       ,			_SCREAMING_SNAKE_CASE       ,			_SCREAMING_SNAKE_CASE)

				return processors

	def 							_SCREAMING_SNAKE_CASE   (     self:		Optional[int]       ,			_SCREAMING_SNAKE_CASE:		Union[AttentionProcessor, Dict[str, AttentionProcessor]])				->       Union[str, Any]:

				"""simple docstring"""

				__lowerCAmelCase      :  Dict												=       len(self.attn_processors.keys())

				if isinstance(_SCREAMING_SNAKE_CASE       ,			_SCREAMING_SNAKE_CASE) and len(_SCREAMING_SNAKE_CASE) != count:
							raise ValueError(
							    F"""A dict of processors was passed, but the number of processors {len(_SCREAMING_SNAKE_CASE)} does not match the"""
							    F""" number of attention layers: {count}. Please make sure to pass {count} processor classes.""")

				def fn_recursive_attn_processor(_SCREAMING_SNAKE_CASE:		str       ,			_SCREAMING_SNAKE_CASE:		torch.nn.Module       ,			_SCREAMING_SNAKE_CASE:		Optional[Any]):
							if hasattr(_SCREAMING_SNAKE_CASE       ,			"set_processor"):
										if not isinstance(_SCREAMING_SNAKE_CASE       ,			_SCREAMING_SNAKE_CASE):
													module.set_processor(_SCREAMING_SNAKE_CASE)
										else:
													module.set_processor(processor.pop(F"""{name}.processor"""))

							for sub_name, child in module.named_children():
										fn_recursive_attn_processor(F"""{name}.{sub_name}"""       ,			_SCREAMING_SNAKE_CASE       ,			_SCREAMING_SNAKE_CASE)

				for name, module in self.named_children():
							fn_recursive_attn_processor(_SCREAMING_SNAKE_CASE       ,			_SCREAMING_SNAKE_CASE       ,			_SCREAMING_SNAKE_CASE)

	def 							_SCREAMING_SNAKE_CASE   (     self:		Dict)				->       int:

				"""simple docstring"""

				self.set_attn_processor(AttnProcessor())

	@apply_forward_hook
	def 							_SCREAMING_SNAKE_CASE   (     self:		List[Any]       ,			_SCREAMING_SNAKE_CASE:		torch.FloatTensor       ,			_SCREAMING_SNAKE_CASE:		bool = True)				->       AutoencoderKLOutput:

				"""simple docstring"""

				if self.use_tiling and (x.shape[-1] > self.tile_sample_min_size or x.shape[-2] > self.tile_sample_min_size):
							return self.tiled_encode(_SCREAMING_SNAKE_CASE       ,			return_dict=_SCREAMING_SNAKE_CASE)

				if self.use_slicing and x.shape[0] > 1:
							__lowerCAmelCase      :  Union[str, Any]												=       [self.encoder(_SCREAMING_SNAKE_CASE) for x_slice in x.split(1)]
							__lowerCAmelCase      :  str												=       torch.cat(_SCREAMING_SNAKE_CASE)
				else:
							__lowerCAmelCase      :  Tuple												=       self.encoder(_SCREAMING_SNAKE_CASE)

				__lowerCAmelCase      :  Union[str, Any]												=       self.quant_conv(_SCREAMING_SNAKE_CASE)
				__lowerCAmelCase      :  str												=       DiagonalGaussianDistribution(_SCREAMING_SNAKE_CASE)

				if not return_dict:
							return (posterior,)

				return AutoencoderKLOutput(latent_dist=_SCREAMING_SNAKE_CASE)

	def 							_SCREAMING_SNAKE_CASE   (     self:		Dict       ,			_SCREAMING_SNAKE_CASE:		torch.FloatTensor       ,			_SCREAMING_SNAKE_CASE:		bool = True)				->       Union[DecoderOutput, torch.FloatTensor]:

				"""simple docstring"""

				if self.use_tiling and (z.shape[-1] > self.tile_latent_min_size or z.shape[-2] > self.tile_latent_min_size):
							return self.tiled_decode(_SCREAMING_SNAKE_CASE       ,			return_dict=_SCREAMING_SNAKE_CASE)

				__lowerCAmelCase      :  Optional[Any]												=       self.post_quant_conv(_SCREAMING_SNAKE_CASE)
				__lowerCAmelCase      :  Dict												=       self.decoder(_SCREAMING_SNAKE_CASE)

				if not return_dict:
							return (dec,)

				return DecoderOutput(sample=_SCREAMING_SNAKE_CASE)

	@apply_forward_hook
	def 							_SCREAMING_SNAKE_CASE   (     self:		List[str]       ,			_SCREAMING_SNAKE_CASE:		torch.FloatTensor       ,			_SCREAMING_SNAKE_CASE:		bool = True)				->       Union[DecoderOutput, torch.FloatTensor]:

				"""simple docstring"""

				if self.use_slicing and z.shape[0] > 1:
							__lowerCAmelCase      :  List[str]												=       [self._decode(_SCREAMING_SNAKE_CASE).sample for z_slice in z.split(1)]
							__lowerCAmelCase      :  Tuple												=       torch.cat(_SCREAMING_SNAKE_CASE)
				else:
							__lowerCAmelCase      :  Tuple												=       self._decode(_SCREAMING_SNAKE_CASE).sample

				if not return_dict:
							return (decoded,)

				return DecoderOutput(sample=_SCREAMING_SNAKE_CASE)

	def 							_SCREAMING_SNAKE_CASE   (     self:		str       ,			_SCREAMING_SNAKE_CASE:		List[Any]       ,			_SCREAMING_SNAKE_CASE:		Any       ,			_SCREAMING_SNAKE_CASE:		Tuple)				->       Dict:

				"""simple docstring"""

				__lowerCAmelCase      :  List[str]												=       min(a.shape[2]       ,			b.shape[2]       ,			_SCREAMING_SNAKE_CASE)
				for y in range(_SCREAMING_SNAKE_CASE):
							__lowerCAmelCase      :  Dict												=       a[:, :, -blend_extent + y, :] * (1 - y / blend_extent) + b[:, :, y, :] * (y / blend_extent)
				return b

	def 							_SCREAMING_SNAKE_CASE   (     self:		Dict       ,			_SCREAMING_SNAKE_CASE:		List[str]       ,			_SCREAMING_SNAKE_CASE:		Dict       ,			_SCREAMING_SNAKE_CASE:		Dict)				->       Tuple:

				"""simple docstring"""

				__lowerCAmelCase      :  int												=       min(a.shape[3]       ,			b.shape[3]       ,			_SCREAMING_SNAKE_CASE)
				for x in range(_SCREAMING_SNAKE_CASE):
							__lowerCAmelCase      :  Optional[int]												=       a[:, :, :, -blend_extent + x] * (1 - x / blend_extent) + b[:, :, :, x] * (x / blend_extent)
				return b

	def 							_SCREAMING_SNAKE_CASE   (     self:		List[str]       ,			_SCREAMING_SNAKE_CASE:		torch.FloatTensor       ,			_SCREAMING_SNAKE_CASE:		bool = True)				->       AutoencoderKLOutput:

				"""simple docstring"""

				__lowerCAmelCase      :  List[str]												=       int(self.tile_sample_min_size * (1 - self.tile_overlap_factor))
				__lowerCAmelCase      :  Union[str, Any]												=       int(self.tile_latent_min_size * self.tile_overlap_factor)
				__lowerCAmelCase      :  Any												=       self.tile_latent_min_size - blend_extent

				# Split the image into 512x512 tiles and encode them separately.
				__lowerCAmelCase      :  Optional[int]												=       []
				for i in range(0       ,			x.shape[2]       ,			_SCREAMING_SNAKE_CASE):
							__lowerCAmelCase      :  int												=       []
							for j in range(0       ,			x.shape[3]       ,			_SCREAMING_SNAKE_CASE):
										__lowerCAmelCase      :  List[Any]												=       x[:, :, i : i + self.tile_sample_min_size, j : j + self.tile_sample_min_size]
										__lowerCAmelCase      :  Dict												=       self.encoder(_SCREAMING_SNAKE_CASE)
										__lowerCAmelCase      :  Union[str, Any]												=       self.quant_conv(_SCREAMING_SNAKE_CASE)
										row.append(_SCREAMING_SNAKE_CASE)
							rows.append(_SCREAMING_SNAKE_CASE)
				__lowerCAmelCase      :  str												=       []
				for i, row in enumerate(_SCREAMING_SNAKE_CASE):
							__lowerCAmelCase      :  int												=       []
							for j, tile in enumerate(_SCREAMING_SNAKE_CASE):
										# blend the above tile and the left tile
										# to the current tile and add the current tile to the result row
										if i > 0:
													__lowerCAmelCase      :  Any												=       self.blend_v(rows[i - 1][j]       ,			_SCREAMING_SNAKE_CASE       ,			_SCREAMING_SNAKE_CASE)
										if j > 0:
													__lowerCAmelCase      :  Optional[Any]												=       self.blend_h(row[j - 1]       ,			_SCREAMING_SNAKE_CASE       ,			_SCREAMING_SNAKE_CASE)
										result_row.append(tile[:, :, :row_limit, :row_limit])
							result_rows.append(torch.cat(_SCREAMING_SNAKE_CASE       ,			dim=3))

				__lowerCAmelCase      :  Dict												=       torch.cat(_SCREAMING_SNAKE_CASE       ,			dim=2)
				__lowerCAmelCase      :  Optional[Any]												=       DiagonalGaussianDistribution(_SCREAMING_SNAKE_CASE)

				if not return_dict:
							return (posterior,)

				return AutoencoderKLOutput(latent_dist=_SCREAMING_SNAKE_CASE)

	def 							_SCREAMING_SNAKE_CASE   (     self:		Union[str, Any]       ,			_SCREAMING_SNAKE_CASE:		torch.FloatTensor       ,			_SCREAMING_SNAKE_CASE:		bool = True)				->       Union[DecoderOutput, torch.FloatTensor]:

				"""simple docstring"""

				__lowerCAmelCase      :  Optional[int]												=       int(self.tile_latent_min_size * (1 - self.tile_overlap_factor))
				__lowerCAmelCase      :  Optional[int]												=       int(self.tile_sample_min_size * self.tile_overlap_factor)
				__lowerCAmelCase      :  Union[str, Any]												=       self.tile_sample_min_size - blend_extent

				# Split z into overlapping 64x64 tiles and decode them separately.
				# The tiles have an overlap to avoid seams between tiles.
				__lowerCAmelCase      :  List[str]												=       []
				for i in range(0       ,			z.shape[2]       ,			_SCREAMING_SNAKE_CASE):
							__lowerCAmelCase      :  Optional[int]												=       []
							for j in range(0       ,			z.shape[3]       ,			_SCREAMING_SNAKE_CASE):
										__lowerCAmelCase      :  Optional[int]												=       z[:, :, i : i + self.tile_latent_min_size, j : j + self.tile_latent_min_size]
										__lowerCAmelCase      :  List[Any]												=       self.post_quant_conv(_SCREAMING_SNAKE_CASE)
										__lowerCAmelCase      :  Any												=       self.decoder(_SCREAMING_SNAKE_CASE)
										row.append(_SCREAMING_SNAKE_CASE)
							rows.append(_SCREAMING_SNAKE_CASE)
				__lowerCAmelCase      :  Any												=       []
				for i, row in enumerate(_SCREAMING_SNAKE_CASE):
							__lowerCAmelCase      :  Union[str, Any]												=       []
							for j, tile in enumerate(_SCREAMING_SNAKE_CASE):
										# blend the above tile and the left tile
										# to the current tile and add the current tile to the result row
										if i > 0:
													__lowerCAmelCase      :  Optional[Any]												=       self.blend_v(rows[i - 1][j]       ,			_SCREAMING_SNAKE_CASE       ,			_SCREAMING_SNAKE_CASE)
										if j > 0:
													__lowerCAmelCase      :  Any												=       self.blend_h(row[j - 1]       ,			_SCREAMING_SNAKE_CASE       ,			_SCREAMING_SNAKE_CASE)
										result_row.append(tile[:, :, :row_limit, :row_limit])
							result_rows.append(torch.cat(_SCREAMING_SNAKE_CASE       ,			dim=3))

				__lowerCAmelCase      :  str												=       torch.cat(_SCREAMING_SNAKE_CASE       ,			dim=2)
				if not return_dict:
							return (dec,)

				return DecoderOutput(sample=_SCREAMING_SNAKE_CASE)







	def 							_SCREAMING_SNAKE_CASE   (     self:		Dict       ,			_SCREAMING_SNAKE_CASE:		torch.FloatTensor       ,			_SCREAMING_SNAKE_CASE:		bool = False       ,			_SCREAMING_SNAKE_CASE:		bool = True       ,			_SCREAMING_SNAKE_CASE:		Optional[torch.Generator] = None       ,			)				->       Union[DecoderOutput, torch.FloatTensor]:

				"""simple docstring"""

				__lowerCAmelCase      :  Any												=       sample
				__lowerCAmelCase      :  Union[str, Any]												=       self.encode(_SCREAMING_SNAKE_CASE).latent_dist
				if sample_posterior:
							__lowerCAmelCase      :  Union[str, Any]												=       posterior.sample(generator=_SCREAMING_SNAKE_CASE)
				else:
							__lowerCAmelCase      :  Union[str, Any]												=       posterior.mode()
				__lowerCAmelCase      :  List[str]												=       self.decode(_SCREAMING_SNAKE_CASE).sample

				if not return_dict:
							return (dec,)

				return DecoderOutput(sample=_SCREAMING_SNAKE_CASE)




"""simple docstring"""






import numpy as np
from scipy.spatial.distance import cdist
from sklearn.metrics import fa_score

import datasets


__snake_case							:   Optional[int]      =    '\\n    @inproceedings{kakwani2020indicnlpsuite,\n    title={{IndicNLPSuite: Monolingual Corpora, Evaluation Benchmarks and Pre-trained Multilingual Language Models for Indian Languages}},\n    author={Divyanshu Kakwani and Anoop Kunchukuttan and Satish Golla and Gokul N.C. and Avik Bhattacharyya and Mitesh M. Khapra and Pratyush Kumar},\n    year={2020},\n    booktitle={Findings of EMNLP},\n}\n'

__snake_case							:   str      =    '\\n    IndicGLUE is a natural language understanding benchmark for Indian languages. It contains a wide\n    variety of tasks and covers 11 major Indian languages - as, bn, gu, hi, kn, ml, mr, or, pa, ta, te.\n'

__snake_case							:   str      =    '\nCompute IndicGLUE evaluation metric associated to each IndicGLUE dataset.\nArgs:\n    predictions: list of predictions to score (as int64),\n        except for \'cvit-mkb-clsr\' where each prediction is a vector (of float32).\n    references: list of ground truth labels corresponding to the predictions (as int64),\n        except for \'cvit-mkb-clsr\' where each reference is a vector (of float32).\nReturns: depending on the IndicGLUE subset, one or several of:\n    "accuracy": Accuracy\n    "f1": F1 score\n    "precision": Precision@10\nExamples:\n\n    >>> indic_glue_metric = datasets.load_metric(\'indic_glue\', \'wnli\')  # \'wnli\' or any of ["copa", "sna", "csqa", "wstp", "inltkh", "bbca", "iitp-mr", "iitp-pr", "actsa-sc", "md"]\n    >>> references = [0, 1]\n    >>> predictions = [0, 1]\n    >>> results = indic_glue_metric.compute(predictions=predictions, references=references)\n    >>> print(results)\n    {\'accuracy\': 1.0}\n\n    >>> indic_glue_metric = datasets.load_metric(\'indic_glue\', \'wiki-ner\')\n    >>> references = [0, 1]\n    >>> predictions = [0, 1]\n    >>> results = indic_glue_metric.compute(predictions=predictions, references=references)\n    >>> print(results)\n    {\'accuracy\': 1.0, \'f1\': 1.0}\n\n    >>> indic_glue_metric = datasets.load_metric(\'indic_glue\', \'cvit-mkb-clsr\')\n    >>> references = [[0.5, 0.5, 0.5], [0.1, 0.2, 0.3]]\n    >>> predictions = [[0.5, 0.5, 0.5], [0.1, 0.2, 0.3]]\n    >>> results = indic_glue_metric.compute(predictions=predictions, references=references)\n    >>> print(results)\n    {\'precision@10\': 1.0}\n\n'


def 			_lowercase				(  __snake_case					,__snake_case	)						->   Union[str, Any]:
			return float((preds == labels).mean()	)


def 			_lowercase				(  __snake_case					,__snake_case	)						->   str:
			__lowerCAmelCase      :  str												=       simple_accuracy(__snake_case					,__snake_case	)
			__lowerCAmelCase      :  Any												=       float(fa_score(y_true=__snake_case					,y_pred=__snake_case	)	)
			return {
			    "accuracy": acc,
			    "f1": fa,
			}


def 			_lowercase				(  __snake_case					,__snake_case	)						->   int:
			__lowerCAmelCase      :  Union[str, Any]												=       np.array(__snake_case	)
			__lowerCAmelCase      :  Tuple												=       np.array(__snake_case	)
			__lowerCAmelCase      :  List[Any]												=       en_sentvecs.shape[0]

			# mean centering
			__lowerCAmelCase      :  Union[str, Any]												=       en_sentvecs - np.mean(__snake_case					,axis=0	)
			__lowerCAmelCase      :  int												=       in_sentvecs - np.mean(__snake_case					,axis=0	)

			__lowerCAmelCase      :  Optional[Any]												=       cdist(__snake_case					,__snake_case					,"cosine"	)
			__lowerCAmelCase      :  int												=       np.array(range(__snake_case	)	)
			__lowerCAmelCase      :  int												=       sim.argsort(axis=1	)[:, :10]
			__lowerCAmelCase      :  Optional[Any]												=       np.any(preds == actual[:, None]					,axis=1	)
			return float(matches.mean()	)





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




	'''simple docstring'''





	def 							_SCREAMING_SNAKE_CASE   (     self:		int)				->       str:

				"""simple docstring"""

				if self.config_name not in [
				    "wnli",
				    "copa",
				    "sna",
				    "csqa",
				    "wstp",
				    "inltkh",
				    "bbca",
				    "cvit-mkb-clsr",
				    "iitp-mr",
				    "iitp-pr",
				    "actsa-sc",
				    "md",
				    "wiki-ner",
				]:
							raise KeyError(
							    "You should supply a configuration name selected in "
							    "[\"wnli\", \"copa\", \"sna\", \"csqa\", \"wstp\", \"inltkh\", \"bbca\", "
							    "\"cvit-mkb-clsr\", \"iitp-mr\", \"iitp-pr\", \"actsa-sc\", \"md\", "
							    "\"wiki-ner\"]")
				return datasets.MetricInfo(
				    description=_DESCRIPTION       ,			citation=_CITATION       ,			inputs_description=_KWARGS_DESCRIPTION       ,			features=datasets.Features(
				        {
				            "predictions": datasets.Value("int64")
				            if self.config_name != "cvit-mkb-clsr"
				            else datasets.Sequence(datasets.Value("float32")),
				            "references": datasets.Value("int64")
				            if self.config_name != "cvit-mkb-clsr"
				            else datasets.Sequence(datasets.Value("float32")),
				        })       ,			codebase_urls=[]       ,			reference_urls=[]       ,			format="numpy" if self.config_name != "cvit-mkb-clsr" else None       ,			)







	def 							_SCREAMING_SNAKE_CASE   (     self:		List[str]       ,			_SCREAMING_SNAKE_CASE:		int       ,			_SCREAMING_SNAKE_CASE:		Optional[Any])				->       int:

				"""simple docstring"""

				if self.config_name == "cvit-mkb-clsr":
							return {"precision@10": precision_at_aa(_SCREAMING_SNAKE_CASE       ,			_SCREAMING_SNAKE_CASE)}
				elif self.config_name in ["wiki-ner"]:
							return acc_and_fa(_SCREAMING_SNAKE_CASE       ,			_SCREAMING_SNAKE_CASE)
				elif self.config_name in [
				    "wnli",
				    "copa",
				    "sna",
				    "csqa",
				    "wstp",
				    "inltkh",
				    "bbca",
				    "iitp-mr",
				    "iitp-pr",
				    "actsa-sc",
				    "md",
				]:
							return {"accuracy": simple_accuracy(_SCREAMING_SNAKE_CASE       ,			_SCREAMING_SNAKE_CASE)}
				else:
							raise KeyError(
							    "You should supply a configuration name selected in "
							    "[\"wnli\", \"copa\", \"sna\", \"csqa\", \"wstp\", \"inltkh\", \"bbca\", "
							    "\"cvit-mkb-clsr\", \"iitp-mr\", \"iitp-pr\", \"actsa-sc\", \"md\", "
							    "\"wiki-ner\"]")