





import pytest

from datasets import inspect_metric, list_metrics, load_metric


@pytest.fixture
def 					A__	(       SCREAMING_SNAKE_CASE_		)   ->     Union[str, Any]:
  monkeypatch.setattr('''datasets.utils.deprecation_utils._emitted_deprecation_warnings'''							,       set()		)


@pytest.fixture
def 					A__	(       SCREAMING_SNAKE_CASE_		)   ->     List[Any]:
  class        snake_case_		:







    def __init__(		self			,     __lowercase   )				->   Tuple:
      lowerCamelCase   : Tuple								=metric_id

  class        snake_case_		:
    lowerCamelCase    :List[Any]						=     [MetricMock(__SCREAMING_SNAKE_CASE) for metric_id in ["accuracy", "mse", "precision", "codeparrot/apps_metric"]]







    def 			__lowercase   (		self   )				->   List[str]:
      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__	(       SCREAMING_SNAKE_CASE_							,       SCREAMING_SNAKE_CASE_							,       SCREAMING_SNAKE_CASE_							,       SCREAMING_SNAKE_CASE_							,       SCREAMING_SNAKE_CASE_		)   ->     List[str]:
  if "tmp_path" in args:
    lowerCamelCase   : Any								=tuple(arg if arg != '''tmp_path''' else tmp_path for arg in args		)
  with pytest.warns(a_							,       match='''https://huggingface.co/docs/evaluate'''		):
    func(*a_		)








from ...configuration_utils import PretrainedConfig
from ...utils import logging


snake_case_							=			logging.get_logger(__name__)

snake_case_							=			{
    '''facebook/timesformer''': '''https://huggingface.co/facebook/timesformer/resolve/main/config.json''',
}
class        snake_case_		(			_A):
		lowerCamelCase    :Union[str, Any]						=     "timesformer"







		def __init__(		self			,     __lowercase=2_2_4			,     __lowercase=1_6			,     __lowercase=3			,     __lowercase=8			,     __lowercase=7_6_8			,     __lowercase=1_2			,     __lowercase=1_2			,     __lowercase=3_0_7_2			,     __lowercase="gelu"			,     __lowercase=0.0			,     __lowercase=0.0			,     __lowercase=0.0_2			,     __lowercase=1e-6			,     __lowercase=True			,     __lowercase="divided_space_time"			,     __lowercase=0			,     **__lowercase			,     )				->   List[Any]:
				super().__init__(**__lowercase   )

				lowerCamelCase   : int								=image_size
				lowerCamelCase   : List[str]								=patch_size
				lowerCamelCase   : Union[str, Any]								=num_channels
				lowerCamelCase   : str								=num_frames

				lowerCamelCase   : Dict								=hidden_size
				lowerCamelCase   : int								=num_hidden_layers
				lowerCamelCase   : Dict								=num_attention_heads
				lowerCamelCase   : Dict								=intermediate_size
				lowerCamelCase   : Union[str, Any]								=hidden_act
				lowerCamelCase   : str								=hidden_dropout_prob
				lowerCamelCase   : Union[str, Any]								=attention_probs_dropout_prob
				lowerCamelCase   : List[Any]								=initializer_range
				lowerCamelCase   : List[Any]								=layer_norm_eps
				lowerCamelCase   : List[str]								=qkv_bias

				lowerCamelCase   : Tuple								=attention_type
				lowerCamelCase   : List[Any]								=drop_path_rate

