


"""simple docstring"""






import pytest

import datasets


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


def __lowercase     (      lowerCamelCase_  :      str						,					lowerCamelCase_  :      List[Any]  ):
				# Mark tests as "unit" by default if not marked as "integration" (or already marked as "unit")
				for item in items:
								if any(marker in item.keywords for marker in ["integration", "unit"]  ):
												continue
								item.add_marker(pytest.mark.unit  )


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


@pytest.fixture(autouse=lowerCamelCase_  )
def __lowercase     (      lowerCamelCase_  :      Optional[int]						,					lowerCamelCase_  :      str  ):
				# test_hf_cache_home = tmp_path_factory.mktemp("cache")  # TODO: why a cache dir per test function does not work?
				SCREAMING_SNAKE_CASE__     							=				tmp_path_factory.getbasetemp() / "cache"
				SCREAMING_SNAKE_CASE__     							=				test_hf_cache_home / "datasets"
				SCREAMING_SNAKE_CASE__     							=				test_hf_cache_home / "metrics"
				SCREAMING_SNAKE_CASE__     							=				test_hf_cache_home / "modules"
				monkeypatch.setattr("datasets.config.HF_DATASETS_CACHE"						,					str(lowerCamelCase_  )  )
				monkeypatch.setattr("datasets.config.HF_METRICS_CACHE"						,					str(lowerCamelCase_  )  )
				monkeypatch.setattr("datasets.config.HF_MODULES_CACHE"						,					str(lowerCamelCase_  )  )
				SCREAMING_SNAKE_CASE__     							=				test_hf_datasets_cache / "downloads"
				monkeypatch.setattr("datasets.config.DOWNLOADED_DATASETS_PATH"						,					str(lowerCamelCase_  )  )
				SCREAMING_SNAKE_CASE__     							=				test_hf_datasets_cache / "downloads" / "extracted"
				monkeypatch.setattr("datasets.config.EXTRACTED_DATASETS_PATH"						,					str(lowerCamelCase_  )  )


@pytest.fixture(autouse=lowerCamelCase_						,					scope="session"  )
def __lowercase     (      ):
				datasets.disable_progress_bar()


@pytest.fixture(autouse=lowerCamelCase_  )
def __lowercase     (      lowerCamelCase_  :      int  ):
				# don't take tests into account when counting downloads
				monkeypatch.setattr("datasets.config.HF_UPDATE_DOWNLOAD_COUNTS"						,					lowerCamelCase_  )


@pytest.fixture
def __lowercase     (      lowerCamelCase_  :      str  ):
				# Required to suppress RemovedIn20Warning when feature(s) are not compatible with SQLAlchemy 2.0
				# To be removed once SQLAlchemy 2.0 supported
				monkeypatch.setattr("sqlalchemy.util.deprecations.SILENCE_UBER_WARNING"						,					lowerCamelCase_  )




"""simple docstring"""






from typing import TYPE_CHECKING

# rely on isort to merge the imports
from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available


_lowerCamelCase     =  {
    'configuration_autoformer': [
        'AUTOFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP',
        'AutoformerConfig',
    ],
}

try:
	if not is_torch_available():
		raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
	pass
else:
	_lowerCamelCase     =  [
	    'AUTOFORMER_PRETRAINED_MODEL_ARCHIVE_LIST',
	    'AutoformerForPrediction',
	    'AutoformerModel',
	    'AutoformerPreTrainedModel',
	]


if TYPE_CHECKING:
	from .configuration_autoformer import (
	    AUTOFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP,
	    AutoformerConfig,
	)

	try:
		if not is_torch_available():
			raise OptionalDependencyNotAvailable()
	except OptionalDependencyNotAvailable:
		pass
	else:
		from .modeling_autoformer import (
		    AUTOFORMER_PRETRAINED_MODEL_ARCHIVE_LIST,
		    AutoformerForPrediction,
		    AutoformerModel,
		    AutoformerPreTrainedModel,
		)

else:
	import sys

	_lowerCamelCase     =  _LazyModule(__name__, globals()['__file__'], _import_structure, module_spec=__spec__)
