



'''simple docstring'''



from typing import TYPE_CHECKING

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


lowerCAmelCase	:		Optional[Any]				=   {
    '''configuration_gpt_bigcode''': ['''GPT_BIGCODE_PRETRAINED_CONFIG_ARCHIVE_MAP''', '''GPTBigCodeConfig'''],
}

try:
 if not is_torch_available():
  raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
 pass
else:
 lowerCAmelCase	:		Tuple				=   [
     '''GPT_BIGCODE_PRETRAINED_MODEL_ARCHIVE_LIST''',
     '''GPTBigCodeForSequenceClassification''',
     '''GPTBigCodeForTokenClassification''',
     '''GPTBigCodeForCausalLM''',
     '''GPTBigCodeModel''',
     '''GPTBigCodePreTrainedModel''',
 ]

if TYPE_CHECKING:
 from .configuration_gpt_bigcode import GPT_BIGCODE_PRETRAINED_CONFIG_ARCHIVE_MAP, GPTBigCodeConfig

 try:
  if not is_torch_available():
   raise OptionalDependencyNotAvailable()
 except OptionalDependencyNotAvailable:
  pass
 else:
  from .modeling_gpt_bigcode import (
      GPT_BIGCODE_PRETRAINED_MODEL_ARCHIVE_LIST,
      GPTBigCodeForCausalLM,
      GPTBigCodeForSequenceClassification,
      GPTBigCodeForTokenClassification,
      GPTBigCodeModel,
      GPTBigCodePreTrainedModel,
  )


else:
 import sys

 lowerCAmelCase	:		str				=   _LazyModule(__name__, globals()['''__file__'''], _import_structure, module_spec=__spec__)




'''simple docstring'''



import os
import sys
import unittest


lowerCAmelCase	:		str				=   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	:		Tuple				=   os.path.join('''tests''', '''models''', '''bert''', '''test_modeling_bert.py''')
lowerCAmelCase	:		Tuple				=   os.path.join('''tests''', '''models''', '''blip''', '''test_modeling_blip.py''')






class 					UpperCAmelCase__	(		unittest.TestCase ):



					def        UpperCAmelCase_ (    self     )     ->			str:
						__lowerCAmelCase												=  get_test_to_tester_mapping(UpperCamelCase     )
						__lowerCAmelCase												=  get_test_to_tester_mapping(UpperCamelCase     )

						__lowerCAmelCase												=  {"BertModelTest": "BertModelTester"}

						__lowerCAmelCase												=  {
						    "BlipModelTest": "BlipModelTester",
						    "BlipTextImageModelTest": "BlipTextImageModelsModelTester",
						    "BlipTextModelTest": "BlipTextModelTester",
						    "BlipTextRetrievalModelTest": "BlipTextRetrievalModelTester",
						    "BlipVQAModelTest": "BlipVQAModelTester",
						    "BlipVisionModelTest": "BlipVisionModelTester",
						}

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



					def        UpperCAmelCase_ (    self     )     ->			List[Any]:
						__lowerCAmelCase												=  get_model_to_test_mapping(UpperCamelCase     )
						__lowerCAmelCase												=  get_model_to_test_mapping(UpperCamelCase     )

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

						__lowerCAmelCase												=  {
						    "BlipForConditionalGeneration": ["BlipTextImageModelTest"],
						    "BlipForImageTextRetrieval": ["BlipTextRetrievalModelTest"],
						    "BlipForQuestionAnswering": ["BlipVQAModelTest"],
						    "BlipModel": ["BlipModelTest"],
						    "BlipTextModel": ["BlipTextModelTest"],
						    "BlipVisionModel": ["BlipVisionModelTest"],
						}

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



					def        UpperCAmelCase_ (    self     )     ->			str:
						__lowerCAmelCase												=  get_model_to_tester_mapping(UpperCamelCase     )
						__lowerCAmelCase												=  get_model_to_tester_mapping(UpperCamelCase     )

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

						__lowerCAmelCase												=  {
						    "BlipForConditionalGeneration": ["BlipTextImageModelsModelTester"],
						    "BlipForImageTextRetrieval": ["BlipTextRetrievalModelTester"],
						    "BlipForQuestionAnswering": ["BlipVQAModelTester"],
						    "BlipModel": ["BlipModelTester"],
						    "BlipTextModel": ["BlipTextModelTester"],
						    "BlipVisionModel": ["BlipVisionModelTester"],
						}

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