"""simple docstring"""





import os
import sys
import unittest


_UpperCamelCase   :						Optional[Any]      =    os.path.abspath(os.path.dirname(os.path.dirname(os.path.dirname(__file__))))
sys.path.append(os.path.join(git_repo_path, "utils"))

import get_test_info  # noqa: E402
from get_test_info import (  # noqa: E402
    get_model_to_test_mapping,
    get_model_to_tester_mapping,
    get_test_to_tester_mapping,
)


_UpperCamelCase   :						str      =    os.path.join("tests", "models", "bert", "test_modeling_bert.py")
_UpperCamelCase   :						Any      =    os.path.join("tests", "models", "blip", "test_modeling_blip.py")


class      UpperCAmelCase_	(    unittest.TestCase):


      def 		_UpperCAmelCase       (   self							)       ->					Optional[Any]:
             lowercase__			:		Optional[int]       =	get_test_to_tester_mapping(_a							)
             lowercase__			:		Optional[int]       =	get_test_to_tester_mapping(_a							)

             lowercase__			:		Tuple       =	{'BertModelTest': 'BertModelTester'}

             lowercase__			:		Dict       =	{
                 'BlipModelTest': 'BlipModelTester',
                 'BlipTextImageModelTest': 'BlipTextImageModelsModelTester',
                 'BlipTextModelTest': 'BlipTextModelTester',
                 'BlipTextRetrievalModelTest': 'BlipTextRetrievalModelTester',
                 'BlipVQAModelTest': 'BlipVQAModelTester',
                 'BlipVisionModelTest': 'BlipVisionModelTester',
             }

             self.assertEqual(get_test_info.to_json(_a							)		,			_a							)
             self.assertEqual(get_test_info.to_json(_a							)		,			_a							)


      def 		_UpperCAmelCase       (   self							)       ->					int:
             lowercase__			:		int       =	get_model_to_test_mapping(_a							)
             lowercase__			:		Dict       =	get_model_to_test_mapping(_a							)

             lowercase__			:		Optional[int]       =	{
                 'BertForMaskedLM': ['BertModelTest'],
                 'BertForMultipleChoice': ['BertModelTest'],
                 'BertForNextSentencePrediction': ['BertModelTest'],
                 'BertForPreTraining': ['BertModelTest'],
                 'BertForQuestionAnswering': ['BertModelTest'],
                 'BertForSequenceClassification': ['BertModelTest'],
                 'BertForTokenClassification': ['BertModelTest'],
                 'BertLMHeadModel': ['BertModelTest'],
                 'BertModel': ['BertModelTest'],
             }

             lowercase__			:		str       =	{
                 'BlipForConditionalGeneration': ['BlipTextImageModelTest'],
                 'BlipForImageTextRetrieval': ['BlipTextRetrievalModelTest'],
                 'BlipForQuestionAnswering': ['BlipVQAModelTest'],
                 'BlipModel': ['BlipModelTest'],
                 'BlipTextModel': ['BlipTextModelTest'],
                 'BlipVisionModel': ['BlipVisionModelTest'],
             }

             self.assertEqual(get_test_info.to_json(_a							)		,			_a							)
             self.assertEqual(get_test_info.to_json(_a							)		,			_a							)


      def 		_UpperCAmelCase       (   self							)       ->					Tuple:
             lowercase__			:		Any       =	get_model_to_tester_mapping(_a							)
             lowercase__			:		int       =	get_model_to_tester_mapping(_a							)

             lowercase__			:		Dict       =	{
                 'BertForMaskedLM': ['BertModelTester'],
                 'BertForMultipleChoice': ['BertModelTester'],
                 'BertForNextSentencePrediction': ['BertModelTester'],
                 'BertForPreTraining': ['BertModelTester'],
                 'BertForQuestionAnswering': ['BertModelTester'],
                 'BertForSequenceClassification': ['BertModelTester'],
                 'BertForTokenClassification': ['BertModelTester'],
                 'BertLMHeadModel': ['BertModelTester'],
                 'BertModel': ['BertModelTester'],
             }

             lowercase__			:		Optional[Any]       =	{
                 'BlipForConditionalGeneration': ['BlipTextImageModelsModelTester'],
                 'BlipForImageTextRetrieval': ['BlipTextRetrievalModelTester'],
                 'BlipForQuestionAnswering': ['BlipVQAModelTester'],
                 'BlipModel': ['BlipModelTester'],
                 'BlipTextModel': ['BlipTextModelTester'],
                 'BlipVisionModel': ['BlipVisionModelTester'],
             }

             self.assertEqual(get_test_info.to_json(_a							)		,			_a							)
             self.assertEqual(get_test_info.to_json(_a							)		,			_a							)




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

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


lowerCamelCase :      Any					 =     {
    "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:
     lowerCamelCase :      Optional[Any]					 =     ["FunnelTokenizerFast"]

try:
     if not is_torch_available():
          raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
     pass
else:
     lowerCamelCase :      List[str]					 =     [
         "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:
     lowerCamelCase :      Union[str, Any]					 =     [
         "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

     lowerCamelCase :      Optional[Any]					 =     _LazyModule(__name__, globals()["__file__"], _import_structure, module_spec=__spec__)
