


import logging
import os
from logging import (
    CRITICAL,  # NOQA
    DEBUG,  # NOQA
    ERROR,  # NOQA
    FATAL,  # NOQA
    INFO,  # NOQA
    NOTSET,  # NOQA
    WARN,  # NOQA
    WARNING,  # NOQA
)
from typing import Optional

from tqdm import auto as tqdm_lib


__UpperCamelCase       :       int						       =				{
    "debug": logging.DEBUG,
    "info": logging.INFO,
    "warning": logging.WARNING,
    "error": logging.ERROR,
    "critical": logging.CRITICAL,
}

__UpperCamelCase       :       Dict						       =				logging.WARNING

def 			_a  (				):







 """simple docstring"""



 UpperCamelCase__					:    Any          =   os.getenv('''DATASETS_VERBOSITY'''    , SCREAMING_SNAKE_CASE     )
 if env_level_str:
  if env_level_str in log_levels:
   return log_levels[env_level_str]
  else:
   logging.getLogger().warning(
       F"Unknown option DATASETS_VERBOSITY={env_level_str}, "
       F"has to be one of: { ', '.join(log_levels.keys()     ) }"     )
 return _default_log_level

def 			_a  (				):







 """simple docstring"""



 return __name__.split('''.'''     )[0]

def 			_a  (				):







 """simple docstring"""



 return logging.getLogger(_get_library_name()     )

def 			_a  (				):







 """simple docstring"""



 UpperCamelCase__					:    str          =   _get_library_root_logger()
 library_root_logger.setLevel(_get_default_logging_level()     )

def 			_a  (				):







 """simple docstring"""



 UpperCamelCase__					:    Dict          =   _get_library_root_logger()
 library_root_logger.setLevel(logging.NOTSET     )

def 			_a  (				SCREAMING_SNAKE_CASE	:				Optional[str] = None     ):







 """simple docstring"""



 if name is None:
  UpperCamelCase__					:    int          =   _get_library_name()
 return logging.getLogger(SCREAMING_SNAKE_CASE     )

def 			_a  (				):







 """simple docstring"""



 return _get_library_root_logger().getEffectiveLevel()

def 			_a  (				SCREAMING_SNAKE_CASE	:				int     ):







 """simple docstring"""



 _get_library_root_logger().setLevel(SCREAMING_SNAKE_CASE     )

def 			_a  (				):







 """simple docstring"""



 return set_verbosity(SCREAMING_SNAKE_CASE     )

def 			_a  (				):







 """simple docstring"""



 return set_verbosity(SCREAMING_SNAKE_CASE     )

def 			_a  (				):







 """simple docstring"""



 return set_verbosity(SCREAMING_SNAKE_CASE     )

def 			_a  (				):







 """simple docstring"""



 return set_verbosity(SCREAMING_SNAKE_CASE     )

def 			_a  (				):







 """simple docstring"""



 UpperCamelCase__					:    Any          =   False

def 			_a  (				):







 """simple docstring"""



 UpperCamelCase__					:    Dict          =   True


# Configure the library root logger at the module level (singleton-like)
_configure_library_root_logger()

class       __magic_name__	:


     def __init__(      self							:     str							,	*lowerCamelCase__							:     Union[str, Any]							,	**lowerCamelCase__							:     int			)  ->      Optional[int]:  # pylint: disable=unused-argument





      '''simple docstring'''






      UpperCamelCase__					:    List[Any]          =   args[0] if args else None


     def __iter__(      self							:     Dict			)  ->      List[Any]:





      '''simple docstring'''






      return iter(self._iterator			)


     def __getattr__(      self							:     List[str]							,	lowerCamelCase__							:     List[Any]			)  ->      str:





      '''simple docstring'''






      def empty_fn(*lowerCamelCase__							:     Any							,	**lowerCamelCase__							:     List[str]			):  # pylint: disable=unused-argument
       return

      return empty_fn


     def __enter__(      self							:     List[Any]			)  ->      Tuple:





      '''simple docstring'''






      return self


     def __exit__(      self							:     str							,	lowerCamelCase__							:     Dict							,	lowerCamelCase__							:     str							,	lowerCamelCase__							:     Tuple			)  ->      Any:





      '''simple docstring'''






      return



__UpperCamelCase       :       Dict						       =				True

class       __magic_name__	:


     def __call__(      self							:     Optional[Any]							,	*lowerCamelCase__							:     Dict							,	lowerCamelCase__							:     Dict=False							,	**lowerCamelCase__							:     List[str]			)  ->      Union[str, Any]:





      '''simple docstring'''






      if _tqdm_active and not disable:
       return tqdm_lib.tqdm(*lowerCamelCase__							,	**lowerCamelCase__			)
      else:
       return EmptyTqdm(*lowerCamelCase__							,	**lowerCamelCase__			)


     def      UpperCAmelCase__	(      self							:     Tuple							,	*lowerCamelCase__							:     List[Any]							,	**lowerCamelCase__							:     Any			)  ->      Dict:





      '''simple docstring'''






      UpperCamelCase__					:    List[Any]          =   None
      if _tqdm_active:
       return tqdm_lib.tqdm.set_lock(*lowerCamelCase__							,	**lowerCamelCase__			)


     def      UpperCAmelCase__	(      self							:     Dict			)  ->      Union[str, Any]:





      '''simple docstring'''






      if _tqdm_active:
       return tqdm_lib.tqdm.get_lock()



__UpperCamelCase       :       Tuple						       =				_tqdm_cls()

def 			_a  (				):







 """simple docstring"""



 global _tqdm_active
 return bool(_tqdm_active     )

def 			_a  (				):







 """simple docstring"""



 global _tqdm_active
 UpperCamelCase__					:    List[Any]          =   True






def 			_a  (				):







 """simple docstring"""



 global _tqdm_active
 UpperCamelCase__					:    Optional[int]          =   False






from typing import TYPE_CHECKING

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


__UpperCamelCase       :       Dict						       =				{
    "configuration_mobilevit": ["MOBILEVIT_PRETRAINED_CONFIG_ARCHIVE_MAP", "MobileViTConfig", "MobileViTOnnxConfig"],
}

try:
       if not is_vision_available():
              raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
       pass
else:
       __UpperCamelCase       :       str						       =				["MobileViTFeatureExtractor"]
       __UpperCamelCase       :       Optional[Any]						       =				["MobileViTImageProcessor"]

try:
       if not is_torch_available():
              raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
       pass
else:
       __UpperCamelCase       :       Union[str, Any]						       =				[
           "MOBILEVIT_PRETRAINED_MODEL_ARCHIVE_LIST",
           "MobileViTForImageClassification",
           "MobileViTForSemanticSegmentation",
           "MobileViTModel",
           "MobileViTPreTrainedModel",
       ]

try:
       if not is_tf_available():
              raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
       pass
else:
       __UpperCamelCase       :       Optional[int]						       =				[
           "TF_MOBILEVIT_PRETRAINED_MODEL_ARCHIVE_LIST",
           "TFMobileViTForImageClassification",
           "TFMobileViTForSemanticSegmentation",
           "TFMobileViTModel",
           "TFMobileViTPreTrainedModel",
       ]

if TYPE_CHECKING:
       from .configuration_mobilevit import MOBILEVIT_PRETRAINED_CONFIG_ARCHIVE_MAP, MobileViTConfig, MobileViTOnnxConfig

       try:
              if not is_vision_available():
                     raise OptionalDependencyNotAvailable()
       except OptionalDependencyNotAvailable:
              pass
       else:
              from .feature_extraction_mobilevit import MobileViTFeatureExtractor
              from .image_processing_mobilevit import MobileViTImageProcessor

       try:
              if not is_torch_available():
                     raise OptionalDependencyNotAvailable()
       except OptionalDependencyNotAvailable:
              pass
       else:
              from .modeling_mobilevit import (
                  MOBILEVIT_PRETRAINED_MODEL_ARCHIVE_LIST,
                  MobileViTForImageClassification,
                  MobileViTForSemanticSegmentation,
                  MobileViTModel,
                  MobileViTPreTrainedModel,
              )

       try:
              if not is_tf_available():
                     raise OptionalDependencyNotAvailable()
       except OptionalDependencyNotAvailable:
              pass
       else:
              from .modeling_tf_mobilevit import (
                  TF_MOBILEVIT_PRETRAINED_MODEL_ARCHIVE_LIST,
                  TFMobileViTForImageClassification,
                  TFMobileViTForSemanticSegmentation,
                  TFMobileViTModel,
                  TFMobileViTPreTrainedModel,
              )


else:
       import sys

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


