






import pytest

from datasets import inspect_metric, list_metrics, load_metric





@pytest.fixture
def 	lowerCAmelCase_		(lowercase__						:       Dict       )		->    Union[str, Any]:


				'''simple docstring'''




				monkeypatch.setattr('''datasets.utils.deprecation_utils._emitted_deprecation_warnings'''     ,					set()       )





@pytest.fixture
def 	lowerCAmelCase_		(lowercase__						:       Dict       )		->    Dict:


				'''simple docstring'''




				class  lowerCAmelCase_       :




											def __init__(   self     :   Optional[Any] ,							SCREAMING_SNAKE_CASE_     :   int	):
															lowerCAmelCase__      			=						metric_id



				class  lowerCAmelCase_       :
											UpperCamelCase_		:Optional[int]		      =    [MetricMock(snake_case__					) for metric_id in ['accuracy', 'mse', 'precision', 'codeparrot/apps_metric']]




											def 						__snake_case					(   self     :   Optional[int]	):
															return self._metrics



				monkeypatch.setattr('''datasets.inspect.huggingface_hub'''     ,					HfhMock()       )





@pytest.mark.parametrize(
    '''func, args'''     ,					[(load_metric, ('''metrics/mse''',)), (list_metrics, ()), (inspect_metric, ('''metrics/mse''', '''tmp_path'''))]       )
def 	lowerCAmelCase_		(lowercase__						:       Any     ,					lowercase__						:       str     ,					lowercase__						:       Optional[Any]     ,					lowercase__						:       int     ,					lowercase__						:       Optional[int]       )		->    Union[str, Any]:


				'''simple docstring'''




				if "tmp_path" in args:
								lowerCAmelCase__      			=						tuple(arg if arg != '''tmp_path''' else tmp_path for arg in args       )
				with pytest.warns(lowercase__     ,					match='''https://huggingface.co/docs/evaluate'''       ):
								func(*lowercase__       )













from typing import TYPE_CHECKING

from ....utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available


_UpperCAmelCase			:		Optional[Any]   				=    {
    "configuration_mctct": ["MCTCT_PRETRAINED_CONFIG_ARCHIVE_MAP", "MCTCTConfig"],
    "feature_extraction_mctct": ["MCTCTFeatureExtractor"],
    "processing_mctct": ["MCTCTProcessor"],
}


try:
			if not is_torch_available():
						raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
			pass
else:
			_UpperCAmelCase			:		str   				=    [
			    "MCTCT_PRETRAINED_MODEL_ARCHIVE_LIST",
			    "MCTCTForCTC",
			    "MCTCTModel",
			    "MCTCTPreTrainedModel",
			]


if TYPE_CHECKING:
			from .configuration_mctct import MCTCT_PRETRAINED_CONFIG_ARCHIVE_MAP, MCTCTConfig
			from .feature_extraction_mctct import MCTCTFeatureExtractor
			from .processing_mctct import MCTCTProcessor

			try:
						if not is_torch_available():
									raise OptionalDependencyNotAvailable()
			except OptionalDependencyNotAvailable:
						pass
			else:
						from .modeling_mctct import MCTCT_PRETRAINED_MODEL_ARCHIVE_LIST, MCTCTForCTC, MCTCTModel, MCTCTPreTrainedModel

else:
			import sys

			_UpperCAmelCase			:		List[str]   				=    _LazyModule(__name__, globals()["__file__"], _import_structure, module_spec=__spec__)





