





import os
import sys
import unittest


__lowerCamelCase :  Dict										=  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,
)


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



class       A__     ( unittest.TestCase    ):





      def  __UpperCamelCase(				self     ):
       '''simple docstring'''




       UpperCamelCase			:      Optional[int] 			=     get_test_to_tester_mapping(A_     )
       UpperCamelCase			:      List[str] 			=     get_test_to_tester_mapping(A_     )

       UpperCamelCase			:      int 			=     {"BertModelTest": "BertModelTester"}

       UpperCamelCase			:      List[Any] 			=     {
           "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     ):
       '''simple docstring'''




       UpperCamelCase			:      List[Any] 			=     get_model_to_test_mapping(A_     )
       UpperCamelCase			:      List[str] 			=     get_model_to_test_mapping(A_     )

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

       UpperCamelCase			:      int 			=     {
           "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     ):
       '''simple docstring'''




       UpperCamelCase			:      List[str] 			=     get_model_to_tester_mapping(A_     )
       UpperCamelCase			:      Tuple 			=     get_model_to_tester_mapping(A_     )

       UpperCamelCase			:      Union[str, Any] 			=     {
           "BertForMaskedLM": ["BertModelTester"],
           "BertForMultipleChoice": ["BertModelTester"],
           "BertForNextSentencePrediction": ["BertModelTester"],
           "BertForPreTraining": ["BertModelTester"],
           "BertForQuestionAnswering": ["BertModelTester"],
           "BertForSequenceClassification": ["BertModelTester"],
           "BertForTokenClassification": ["BertModelTester"],
           "BertLMHeadModel": ["BertModelTester"],
           "BertModel": ["BertModelTester"],
       }

       UpperCamelCase			:      Tuple 			=     {
           "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_     )







from typing import TYPE_CHECKING

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


__lowerCamelCase :  int										=  {
    """configuration_convbert""": ["""CONVBERT_PRETRAINED_CONFIG_ARCHIVE_MAP""", """ConvBertConfig""", """ConvBertOnnxConfig"""],
    """tokenization_convbert""": ["""ConvBertTokenizer"""],
}

try:
    if not is_tokenizers_available():
        raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
    pass
else:
    __lowerCamelCase :  Dict										=  ["""ConvBertTokenizerFast"""]

try:
    if not is_torch_available():
        raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
    pass
else:
    __lowerCamelCase :  int										=  [
        """CONVBERT_PRETRAINED_MODEL_ARCHIVE_LIST""",
        """ConvBertForMaskedLM""",
        """ConvBertForMultipleChoice""",
        """ConvBertForQuestionAnswering""",
        """ConvBertForSequenceClassification""",
        """ConvBertForTokenClassification""",
        """ConvBertLayer""",
        """ConvBertModel""",
        """ConvBertPreTrainedModel""",
        """load_tf_weights_in_convbert""",
    ]


try:
    if not is_tf_available():
        raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
    pass
else:
    __lowerCamelCase :  str										=  [
        """TF_CONVBERT_PRETRAINED_MODEL_ARCHIVE_LIST""",
        """TFConvBertForMaskedLM""",
        """TFConvBertForMultipleChoice""",
        """TFConvBertForQuestionAnswering""",
        """TFConvBertForSequenceClassification""",
        """TFConvBertForTokenClassification""",
        """TFConvBertLayer""",
        """TFConvBertModel""",
        """TFConvBertPreTrainedModel""",
    ]


if TYPE_CHECKING:
    from .configuration_convbert import CONVBERT_PRETRAINED_CONFIG_ARCHIVE_MAP, ConvBertConfig, ConvBertOnnxConfig
    from .tokenization_convbert import ConvBertTokenizer

    try:
        if not is_tokenizers_available():
            raise OptionalDependencyNotAvailable()
    except OptionalDependencyNotAvailable:
        pass
    else:
        from .tokenization_convbert_fast import ConvBertTokenizerFast

    try:
        if not is_torch_available():
            raise OptionalDependencyNotAvailable()
    except OptionalDependencyNotAvailable:
        pass
    else:
        from .modeling_convbert import (
            CONVBERT_PRETRAINED_MODEL_ARCHIVE_LIST,
            ConvBertForMaskedLM,
            ConvBertForMultipleChoice,
            ConvBertForQuestionAnswering,
            ConvBertForSequenceClassification,
            ConvBertForTokenClassification,
            ConvBertLayer,
            ConvBertModel,
            ConvBertPreTrainedModel,
            load_tf_weights_in_convbert,
        )

    try:
        if not is_tf_available():
            raise OptionalDependencyNotAvailable()
    except OptionalDependencyNotAvailable:
        pass
    else:
        from .modeling_tf_convbert import (
            TF_CONVBERT_PRETRAINED_MODEL_ARCHIVE_LIST,
            TFConvBertForMaskedLM,
            TFConvBertForMultipleChoice,
            TFConvBertForQuestionAnswering,
            TFConvBertForSequenceClassification,
            TFConvBertForTokenClassification,
            TFConvBertLayer,
            TFConvBertModel,
            TFConvBertPreTrainedModel,
        )


else:
    import sys

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