






'''simple docstring'''
import pytest

import datasets


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




def 		__SCREAMING_SNAKE_CASE       (	_UpperCamelCase    ,		_UpperCamelCase				):


   """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 		__SCREAMING_SNAKE_CASE       (	_UpperCamelCase				):


   """simple docstring"""




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




@pytest.fixture(autouse=_UpperCamelCase				)
def 		__SCREAMING_SNAKE_CASE       (	_UpperCamelCase    ,		_UpperCamelCase				):


   """simple docstring"""




   lowercase_						:     List[Any]							     =  tmp_path_factory.getbasetemp() / "cache"
   lowercase_						:     Tuple							     =  test_hf_cache_home / "datasets"
   lowercase_						:     Dict							     =  test_hf_cache_home / "metrics"
   lowercase_						:     str							     =  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				)				)
   lowercase_						:     Union[str, Any]							     =  test_hf_datasets_cache / "downloads"
   monkeypatch.setattr("datasets.config.DOWNLOADED_DATASETS_PATH"    ,		str(_UpperCamelCase				)				)
   lowercase_						:     List[str]							     =  test_hf_datasets_cache / "downloads" / "extracted"
   monkeypatch.setattr("datasets.config.EXTRACTED_DATASETS_PATH"    ,		str(_UpperCamelCase				)				)




@pytest.fixture(autouse=_UpperCamelCase    ,		scope="session"				)
def 		__SCREAMING_SNAKE_CASE       (	):


   """simple docstring"""




   datasets.disable_progress_bar()




@pytest.fixture(autouse=_UpperCamelCase				)
def 		__SCREAMING_SNAKE_CASE       (	_UpperCamelCase				):


   """simple docstring"""




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





@pytest.fixture
def 		__SCREAMING_SNAKE_CASE       (	_UpperCamelCase				):


   """simple docstring"""




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












'''simple docstring'''
from typing import TYPE_CHECKING

from ...utils import (
    OptionalDependencyNotAvailable,
    _LazyModule,
    is_tf_available,
    is_tokenizers_available,
    is_torch_available,
)


UpperCamelCase__			=      {
    'configuration_funnel': ['FUNNEL_PRETRAINED_CONFIG_ARCHIVE_MAP', 'FunnelConfig'],
    'convert_funnel_original_tf_checkpoint_to_pytorch': [],
    'tokenization_funnel': ['FunnelTokenizer'],
}

try:
 if not is_tokenizers_available():
  raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
 pass
else:
 UpperCamelCase__			=      ['FunnelTokenizerFast']

try:
 if not is_torch_available():
  raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
 pass
else:
 UpperCamelCase__			=      [
     'FUNNEL_PRETRAINED_MODEL_ARCHIVE_LIST',
     'FunnelBaseModel',
     'FunnelForMaskedLM',
     'FunnelForMultipleChoice',
     'FunnelForPreTraining',
     'FunnelForQuestionAnswering',
     'FunnelForSequenceClassification',
     'FunnelForTokenClassification',
     'FunnelModel',
     'FunnelPreTrainedModel',
     'load_tf_weights_in_funnel',
 ]

try:
 if not is_tf_available():
  raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
 pass
else:
 UpperCamelCase__			=      [
     'TF_FUNNEL_PRETRAINED_MODEL_ARCHIVE_LIST',
     'TFFunnelBaseModel',
     'TFFunnelForMaskedLM',
     'TFFunnelForMultipleChoice',
     'TFFunnelForPreTraining',
     'TFFunnelForQuestionAnswering',
     'TFFunnelForSequenceClassification',
     'TFFunnelForTokenClassification',
     'TFFunnelModel',
     'TFFunnelPreTrainedModel',
 ]


if TYPE_CHECKING:
 from .configuration_funnel import FUNNEL_PRETRAINED_CONFIG_ARCHIVE_MAP, FunnelConfig
 from .tokenization_funnel import FunnelTokenizer

 try:
  if not is_tokenizers_available():
   raise OptionalDependencyNotAvailable()
 except OptionalDependencyNotAvailable:
  pass
 else:
  from .tokenization_funnel_fast import FunnelTokenizerFast

 try:
  if not is_torch_available():
   raise OptionalDependencyNotAvailable()
 except OptionalDependencyNotAvailable:
  pass
 else:
  from .modeling_funnel import (
      FUNNEL_PRETRAINED_MODEL_ARCHIVE_LIST,
      FunnelBaseModel,
      FunnelForMaskedLM,
      FunnelForMultipleChoice,
      FunnelForPreTraining,
      FunnelForQuestionAnswering,
      FunnelForSequenceClassification,
      FunnelForTokenClassification,
      FunnelModel,
      FunnelPreTrainedModel,
      load_tf_weights_in_funnel,
  )

 try:
  if not is_tf_available():
   raise OptionalDependencyNotAvailable()
 except OptionalDependencyNotAvailable:
  pass
 else:
  from .modeling_tf_funnel import (
      TF_FUNNEL_PRETRAINED_MODEL_ARCHIVE_LIST,
      TFFunnelBaseModel,
      TFFunnelForMaskedLM,
      TFFunnelForMultipleChoice,
      TFFunnelForPreTraining,
      TFFunnelForQuestionAnswering,
      TFFunnelForSequenceClassification,
      TFFunnelForTokenClassification,
      TFFunnelModel,
      TFFunnelPreTrainedModel,
  )

else:
 import sys

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




