






'''simple docstring'''







import importlib
import os
from dataclasses import dataclass
from enum import Enum
from typing import Any, Dict, Optional, Union

import torch

from ..utils import BaseOutput


SCREAMING_SNAKE_CASE_      =			'scheduler_config.json'


class  lowerCAmelCase_						(       SCREAMING_SNAKE_CASE_      ):





  """simple docstring"""



  a_       :str												=1
  a_       :Tuple												=2
  a_       :Any												=3
  a_       :Any												=4
  a_       :Dict												=5
  a_       :List[str]												=6
  a_       :Union[str, Any]												=7
  a_       :str												=8
  a_       :str												=9
  a_       :Optional[int]												=10
  a_       :str												=11
  a_       :str												=12
  a_       :Tuple												=13
  a_       :Optional[int]												=14


@dataclass
class  lowerCAmelCase_						(       SCREAMING_SNAKE_CASE_      ):





  """simple docstring"""



  a_       :int												=42


class  lowerCAmelCase_						:





  """simple docstring"""



  a_       :List[str]												=SCHEDULER_CONFIG_NAME
  a_       :List[str]												=[]
  a_       :str												=True

  @classmethod
  def __a						(					cls     :							int				,							SCREAMING_SNAKE_CASE__     :							List[str] = None				,							SCREAMING_SNAKE_CASE__     :							Dict = None				,							SCREAMING_SNAKE_CASE__     :							Dict=False				,							**SCREAMING_SNAKE_CASE__     :							Optional[Any]				,							):





       '''simple docstring'''

       __a       =   cls.load_config(
           pretrained_model_name_or_path=UpperCamelCase__				,							subfolder=UpperCamelCase__				,							return_unused_kwargs=UpperCamelCase__				,							return_commit_hash=UpperCamelCase__				,							**UpperCamelCase__				,							)
       return cls.from_config(UpperCamelCase__				,							return_unused_kwargs=UpperCamelCase__				,							**UpperCamelCase__						)

  def __a						(					self     :							Union[str, Any]				,							SCREAMING_SNAKE_CASE__     :							Any				,							SCREAMING_SNAKE_CASE__     :							Any = False				,							**SCREAMING_SNAKE_CASE__     :							Optional[Any]						):





       '''simple docstring'''

       self.save_config(save_directory=UpperCamelCase__				,							push_to_hub=UpperCamelCase__				,							**UpperCamelCase__						)

  @property
  def __a						(					self     :							Dict						):





       '''simple docstring'''

       return self._get_compatibles()


  @classmethod
  def __a						(					cls     :							Tuple						):





       '''simple docstring'''

       __a       =   list(set([cls.__name__] + cls._compatibles						)						)
       __a       =   importlib.import_module(__name__.split("""."""						)[0]						)
       __a       =   [
           getattr(UpperCamelCase__				,							UpperCamelCase__						) for c in compatible_classes_str if hasattr(UpperCamelCase__				,							UpperCamelCase__						)
       ]
       return compatible_classes










'''simple docstring'''







from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available, is_vision_available


SCREAMING_SNAKE_CASE_      =			{
    'configuration_bridgetower': [
        'BRIDGETOWER_PRETRAINED_CONFIG_ARCHIVE_MAP',
        'BridgeTowerConfig',
        'BridgeTowerTextConfig',
        'BridgeTowerVisionConfig',
    ],
    'processing_bridgetower': ['BridgeTowerProcessor'],
}

try:
 if not is_vision_available():
  raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
 pass
else:
 SCREAMING_SNAKE_CASE_      =			['BridgeTowerImageProcessor']

try:
 if not is_torch_available():
  raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
 pass
else:
 SCREAMING_SNAKE_CASE_      =			[
     'BRIDGETOWER_PRETRAINED_MODEL_ARCHIVE_LIST',
     'BridgeTowerForContrastiveLearning',
     'BridgeTowerForImageAndTextRetrieval',
     'BridgeTowerForMaskedLM',
     'BridgeTowerModel',
     'BridgeTowerPreTrainedModel',
 ]


if TYPE_CHECKING:
 from .configuration_bridgetower import (
     BRIDGETOWER_PRETRAINED_CONFIG_ARCHIVE_MAP,
     BridgeTowerConfig,
     BridgeTowerTextConfig,
     BridgeTowerVisionConfig,
 )
 from .processing_bridgetower import BridgeTowerProcessor

 try:
  if not is_vision_available():
   raise OptionalDependencyNotAvailable()
 except OptionalDependencyNotAvailable:
  pass
 else:
  from .image_processing_bridgetower import BridgeTowerImageProcessor

 try:
  if not is_torch_available():
   raise OptionalDependencyNotAvailable()
 except OptionalDependencyNotAvailable:
  pass
 else:
  from .modeling_bridgetower import (
      BRIDGETOWER_PRETRAINED_MODEL_ARCHIVE_LIST,
      BridgeTowerForContrastiveLearning,
      BridgeTowerForImageAndTextRetrieval,
      BridgeTowerForMaskedLM,
      BridgeTowerModel,
      BridgeTowerPreTrainedModel,
  )


else:
 import sys

 SCREAMING_SNAKE_CASE_      =			_LazyModule(__name__, globals()['__file__'], _import_structure)






