
'''simple docstring'''





import unittest
from pathlib import Path
from tempfile import TemporaryDirectory
from unittest.mock import Mock, patch

import diffusers.utils.hub_utils






class        UpperCAmelCase_       (						unittest.TestCase							):

 '''simple docstring'''







 @patch("diffusers.utils.hub_utils.get_full_repo_name"   )
 def        UpperCamelCase     (				self		:     Optional[Any] ,							snake_case__		:     Mock   ):



   '''simple docstring'''




   UpperCAmelCase__			:				Tuple												=       "full_repo_name"
   with TemporaryDirectory() as tmpdir:
     # Dummy args values
     UpperCAmelCase__			:				Union[str, Any]												=       Mock()
     UpperCAmelCase__			:				Any												=       tmpdir
     UpperCAmelCase__			:				Any												=       0
     UpperCAmelCase__			:				Any												=       "hub_token"
     UpperCAmelCase__			:				str												=       "dataset_name"
     UpperCAmelCase__			:				List[Any]												=       0.01
     UpperCAmelCase__			:				Tuple												=       10_00_00
     UpperCAmelCase__			:				Any												=       1_00_00
     UpperCAmelCase__			:				Dict												=       0.01
     UpperCAmelCase__			:				Optional[Any]												=       0.02
     UpperCAmelCase__			:				List[Any]												=       0.03
     UpperCAmelCase__			:				Any												=       0.0005
     UpperCAmelCase__			:				int												=       0.000001
     UpperCAmelCase__			:				Dict												=       1
     UpperCAmelCase__			:				int												=       10
     UpperCAmelCase__			:				Tuple												=       0.001
     UpperCAmelCase__			:				List[Any]												=       0.1
     UpperCAmelCase__			:				str												=       0.2
     UpperCAmelCase__			:				int												=       True

     # Model card mush be rendered and saved
     diffusers.utils.hub_utils.create_model_card(snake_case__ ,							model_name="model_name"   )
     self.assertTrue((Path(snake_case__   ) / "README.md").is_file()   )








'''simple docstring'''





from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available


SCREAMING_SNAKE_CASE    =					{"""configuration_visual_bert""": ["""VISUAL_BERT_PRETRAINED_CONFIG_ARCHIVE_MAP""", """VisualBertConfig"""]}

try:
      if not is_torch_available():
            raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
      pass
else:
      SCREAMING_SNAKE_CASE    =					[
          """VISUAL_BERT_PRETRAINED_MODEL_ARCHIVE_LIST""",
          """VisualBertForMultipleChoice""",
          """VisualBertForPreTraining""",
          """VisualBertForQuestionAnswering""",
          """VisualBertForRegionToPhraseAlignment""",
          """VisualBertForVisualReasoning""",
          """VisualBertLayer""",
          """VisualBertModel""",
          """VisualBertPreTrainedModel""",
      ]


if TYPE_CHECKING:
      from .configuration_visual_bert import VISUAL_BERT_PRETRAINED_CONFIG_ARCHIVE_MAP, VisualBertConfig

      try:
            if not is_torch_available():
                  raise OptionalDependencyNotAvailable()
      except OptionalDependencyNotAvailable:
            pass
      else:
            from .modeling_visual_bert import (
                VISUAL_BERT_PRETRAINED_MODEL_ARCHIVE_LIST,
                VisualBertForMultipleChoice,
                VisualBertForPreTraining,
                VisualBertForQuestionAnswering,
                VisualBertForRegionToPhraseAlignment,
                VisualBertForVisualReasoning,
                VisualBertLayer,
                VisualBertModel,
                VisualBertPreTrainedModel,
            )


else:
      import sys

      SCREAMING_SNAKE_CASE    =					_LazyModule(__name__, globals()["""__file__"""], _import_structure, module_spec=__spec__)



