


import pytest

import datasets


# Import fixture modules as plugins
__UpperCamelCase    :						int     =							['tests.fixtures.files', 'tests.fixtures.hub', 'tests.fixtures.fsspec']





def   _UpperCAmelCase       (     UpperCAmelCase      :			Optional[Any]						,	UpperCAmelCase      :			Optional[int]      ):
      """simple docstring"""




      for item in items:
            if any(marker in item.keywords for marker in ["""integration""", """unit"""]      ):
                  continue
            item.add_marker(pytest.mark.unit      )





def   _UpperCAmelCase       (     UpperCAmelCase      :			Dict      ):
      """simple docstring"""




      config.addinivalue_line("""markers"""						,	"""torchaudio_latest: mark test to run with torchaudio>=0.12"""      )





@pytest.fixture(autouse=UpperCAmelCase      )
def   _UpperCAmelCase       (     UpperCAmelCase      :			Any						,	UpperCAmelCase      :			int      ):
      """simple docstring"""




      __lowerCamelCase     :      Optional[int]       						=						tmp_path_factory.getbasetemp() / """cache"""
      __lowerCamelCase     :      List[Any]       						=						test_hf_cache_home / """datasets"""
      __lowerCamelCase     :      Union[str, Any]       						=						test_hf_cache_home / """metrics"""
      __lowerCamelCase     :      Any       						=						test_hf_cache_home / """modules"""
      monkeypatch.setattr("""datasets.config.HF_DATASETS_CACHE"""						,	str(UpperCAmelCase      )      )
      monkeypatch.setattr("""datasets.config.HF_METRICS_CACHE"""						,	str(UpperCAmelCase      )      )
      monkeypatch.setattr("""datasets.config.HF_MODULES_CACHE"""						,	str(UpperCAmelCase      )      )
      __lowerCamelCase     :      Tuple       						=						test_hf_datasets_cache / """downloads"""
      monkeypatch.setattr("""datasets.config.DOWNLOADED_DATASETS_PATH"""						,	str(UpperCAmelCase      )      )
      __lowerCamelCase     :      int       						=						test_hf_datasets_cache / """downloads""" / """extracted"""
      monkeypatch.setattr("""datasets.config.EXTRACTED_DATASETS_PATH"""						,	str(UpperCAmelCase      )      )





@pytest.fixture(autouse=UpperCAmelCase						,	scope="""session"""      )
def   _UpperCAmelCase       (     ):
      """simple docstring"""




      datasets.disable_progress_bar()





@pytest.fixture(autouse=UpperCAmelCase      )
def   _UpperCAmelCase       (     UpperCAmelCase      :			List[str]      ):
      """simple docstring"""




      monkeypatch.setattr("""datasets.config.HF_UPDATE_DOWNLOAD_COUNTS"""						,	UpperCAmelCase      )





@pytest.fixture
def   _UpperCAmelCase       (     UpperCAmelCase      :			Any      ):
      """simple docstring"""




      monkeypatch.setattr("""sqlalchemy.util.deprecations.SILENCE_UBER_WARNING"""						,	UpperCAmelCase      )







from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available


__UpperCamelCase    :						Any     =							{
    'configuration_timesformer': ['TIMESFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP', 'TimesformerConfig'],
}

try:
    if not is_torch_available():
        raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
    pass
else:
    __UpperCamelCase    :						int     =							[
        'TIMESFORMER_PRETRAINED_MODEL_ARCHIVE_LIST',
        'TimesformerModel',
        'TimesformerForVideoClassification',
        'TimesformerPreTrainedModel',
    ]

if TYPE_CHECKING:
    from .configuration_timesformer import TIMESFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP, TimesformerConfig

    try:
        if not is_torch_available():
            raise OptionalDependencyNotAvailable()
    except OptionalDependencyNotAvailable:
        pass
    else:
        from .modeling_timesformer import (
            TIMESFORMER_PRETRAINED_MODEL_ARCHIVE_LIST,
            TimesformerForVideoClassification,
            TimesformerModel,
            TimesformerPreTrainedModel,
        )

else:
    import sys

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



