



'''simple docstring'''





import os
import sys
import unittest


lowercase_	 =						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,
)


lowercase_	 =						os.path.join("tests", "models", "bert", "test_modeling_bert.py")
lowercase_	 =						os.path.join("tests", "models", "blip", "test_modeling_blip.py")






class __A    (						unittest.TestCase		):



 '''simple docstring'''







 def       a__						(self )					->  str:


      """simple docstring"""



      _a											=						get_test_to_tester_mapping(A )
      _a											=						get_test_to_tester_mapping(A )

      _a											=						{'''BertModelTest''': '''BertModelTester'''}

      _a											=						{
          '''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       a__						(self )					->  int:


      """simple docstring"""



      _a											=						get_model_to_test_mapping(A )
      _a											=						get_model_to_test_mapping(A )

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

      _a											=						{
          '''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       a__						(self )					->  Tuple:


      """simple docstring"""



      _a											=						get_model_to_tester_mapping(A )
      _a											=						get_model_to_tester_mapping(A )

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

      _a											=						{
          '''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 __future__ import annotations

import typing
from collections.abc import Iterable

import numpy as np

lowercase_	 =						typing.Union[Iterable[float], Iterable[int], np.ndarray]  # noqa: UP007
lowercase_	 =						typing.Union[np.floataa, int, float]  # noqa: UP007




def lowerCAmelCase						(__A						,			__A):



     """simple docstring"""



     return np.sqrt(np.sum((np.asarray(__A) - np.asarray(__A)) ** 2))




def lowerCAmelCase						(__A						,			__A):



     """simple docstring"""



     return sum((va - va) ** 2 for va, va in zip(__A						,			__A)) ** (1 / 2)


if __name__ == "__main__":




  def lowerCAmelCase						():



       """simple docstring"""



       from timeit import timeit

       print('''Without Numpy''')
       print(
           timeit(
               '''euclidean_distance_no_np([1, 2, 3], [4, 5, 6])'''						,			number=10_000						,			globals=globals()						,			))
       print('''With Numpy''')
       print(
           timeit(
               '''euclidean_distance([1, 2, 3], [4, 5, 6])'''						,			number=10_000						,			globals=globals()						,			))
  benchmark()



