"""simple docstring"""






import pytest

from datasets import inspect_metric, list_metrics, load_metric



@pytest.fixture
def   a_						(					lowerCamelCase       ):
				monkeypatch.setattr('datasets.utils.deprecation_utils._emitted_deprecation_warnings'					,			set()       )



@pytest.fixture
def   a_						(					lowerCamelCase       ):
				class 				snake_case       :




									"""simple docstring"""

									def __init__(				self   :	Any    ,lowerCamelCase__   :	Union[str, Any]			):
													UpperCAmelCase__             =							metric_id






				class 				snake_case       :




									"""simple docstring"""

									snake_case__				    = [MetricMock(__UpperCAmelCase				) for metric_id in ["accuracy", "mse", "precision", "codeparrot/apps_metric"]]







									def 		__lowerCAmelCase						(				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   a_						(					lowerCamelCase					,			lowerCamelCase					,			lowerCamelCase					,			lowerCamelCase					,			lowerCamelCase       ):
				if "tmp_path" in args:
								UpperCAmelCase__             =							tuple(arg if arg != 'tmp_path' else tmp_path for arg in args       )
				with pytest.warns(lowerCamelCase					,			match='https://huggingface.co/docs/evaluate'       ):
								func(*lowerCamelCase       )




"""simple docstring"""






from typing import TYPE_CHECKING

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


lowerCAmelCase__  :  str						     =	{
    '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:
						lowerCAmelCase__  :  Any						     =	[
						    '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

						lowerCAmelCase__  :  Any						     =	_LazyModule(__name__, globals()['__file__'], _import_structure, module_spec=__spec__)



