



'''simple docstring'''






import os
import sys
import unittest


A_							: Union[str, 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,
)


A_							: int						 =	os.path.join("""tests""", """models""", """bert""", """test_modeling_bert.py""")
A_							: Optional[Any]						 =	os.path.join("""tests""", """models""", """blip""", """test_modeling_blip.py""")



class 							lowercase       (  unittest.TestCase				):


 """simple docstring"""


 def _snake_case (							self							)		->   List[Any]:
        _UpperCAmelCase  :						Tuple			     = get_test_to_tester_mapping(a_							)
        _UpperCAmelCase  :						Tuple			     = get_test_to_tester_mapping(a_							)

        _UpperCAmelCase  :						Optional[Any]			     = {"""BertModelTest""": """BertModelTester"""}

        _UpperCAmelCase  :						int			     = {
            """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 _snake_case (							self							)		->   Union[str, Any]:
        _UpperCAmelCase  :						Dict			     = get_model_to_test_mapping(a_							)
        _UpperCAmelCase  :						Union[str, Any]			     = get_model_to_test_mapping(a_							)

        _UpperCAmelCase  :						str			     = {
            """BertForMaskedLM""": ["""BertModelTest"""],
            """BertForMultipleChoice""": ["""BertModelTest"""],
            """BertForNextSentencePrediction""": ["""BertModelTest"""],
            """BertForPreTraining""": ["""BertModelTest"""],
            """BertForQuestionAnswering""": ["""BertModelTest"""],
            """BertForSequenceClassification""": ["""BertModelTest"""],
            """BertForTokenClassification""": ["""BertModelTest"""],
            """BertLMHeadModel""": ["""BertModelTest"""],
            """BertModel""": ["""BertModelTest"""],
        }

        _UpperCAmelCase  :						List[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 _snake_case (							self							)		->   Optional[int]:
        _UpperCAmelCase  :						Union[str, Any]			     = get_model_to_tester_mapping(a_							)
        _UpperCAmelCase  :						Tuple			     = get_model_to_tester_mapping(a_							)

        _UpperCAmelCase  :						Tuple			     = {
            """BertForMaskedLM""": ["""BertModelTester"""],
            """BertForMultipleChoice""": ["""BertModelTester"""],
            """BertForNextSentencePrediction""": ["""BertModelTester"""],
            """BertForPreTraining""": ["""BertModelTester"""],
            """BertForQuestionAnswering""": ["""BertModelTester"""],
            """BertForSequenceClassification""": ["""BertModelTester"""],
            """BertForTokenClassification""": ["""BertModelTester"""],
            """BertLMHeadModel""": ["""BertModelTester"""],
            """BertModel""": ["""BertModelTester"""],
        }

        _UpperCAmelCase  :						Union[str, 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_torch_available


A_							: Optional[int]						 =	{"""configuration_ibert""": ["""IBERT_PRETRAINED_CONFIG_ARCHIVE_MAP""", """IBertConfig""", """IBertOnnxConfig"""]}

try:
   if not is_torch_available():
      raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
   pass
else:
   A_							: str						 =	[
       """IBERT_PRETRAINED_MODEL_ARCHIVE_LIST""",
       """IBertForMaskedLM""",
       """IBertForMultipleChoice""",
       """IBertForQuestionAnswering""",
       """IBertForSequenceClassification""",
       """IBertForTokenClassification""",
       """IBertModel""",
       """IBertPreTrainedModel""",
   ]

if TYPE_CHECKING:
   from .configuration_ibert import IBERT_PRETRAINED_CONFIG_ARCHIVE_MAP, IBertConfig, IBertOnnxConfig

   try:
      if not is_torch_available():
         raise OptionalDependencyNotAvailable()
   except OptionalDependencyNotAvailable:
      pass
   else:
      from .modeling_ibert import (
          IBERT_PRETRAINED_MODEL_ARCHIVE_LIST,
          IBertForMaskedLM,
          IBertForMultipleChoice,
          IBertForQuestionAnswering,
          IBertForSequenceClassification,
          IBertForTokenClassification,
          IBertModel,
          IBertPreTrainedModel,
      )

else:
   import sys

   A_							: str						 =	_LazyModule(__name__, globals()["""__file__"""], _import_structure, module_spec=__spec__)



