






'''simple docstring'''






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


__A    	=   {
    '''debug''': logging.DEBUG,
    '''info''': logging.INFO,
    '''warning''': logging.WARNING,
    '''error''': logging.ERROR,
    '''critical''': logging.CRITICAL,
}

__A    	=   logging.WARNING




def        _SCREAMING_SNAKE_CASE  (				)    -> Tuple:







   """simple docstring"""
   __snake_case				:      int     							= 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        _SCREAMING_SNAKE_CASE  (				)    -> str:







   """simple docstring"""
   return __name__.split('.'  )[0]




def        _SCREAMING_SNAKE_CASE  (				)    -> logging.Logger:







   """simple docstring"""
   return logging.getLogger(_get_library_name()  )




def        _SCREAMING_SNAKE_CASE  (				)    -> None:







   """simple docstring"""
   # Apply our default configuration to the library root logger.
   __snake_case				:      List[Any]     							= _get_library_root_logger()
   library_root_logger.setLevel(_get_default_logging_level()  )




def        _SCREAMING_SNAKE_CASE  (				)    -> None:







   """simple docstring"""
   __snake_case				:      Optional[int]     							= _get_library_root_logger()
   library_root_logger.setLevel(logging.NOTSET  )




def        _SCREAMING_SNAKE_CASE  (				A  :       Union[str, Any] = None  )    -> logging.Logger:







   """simple docstring"""
   if name is None:
      __snake_case				:      List[Any]     							= _get_library_name()
   return logging.getLogger(_SCREAMING_SNAKE_CASE  )




def        _SCREAMING_SNAKE_CASE  (				)    -> int:







   """simple docstring"""
   return _get_library_root_logger().getEffectiveLevel()




def        _SCREAMING_SNAKE_CASE  (				A  :       Dict  )    -> None:







   """simple docstring"""
   _get_library_root_logger().setLevel(_SCREAMING_SNAKE_CASE  )




def        _SCREAMING_SNAKE_CASE  (				)    -> Dict:







   """simple docstring"""
   return set_verbosity(_SCREAMING_SNAKE_CASE  )




def        _SCREAMING_SNAKE_CASE  (				)    -> List[str]:







   """simple docstring"""
   return set_verbosity(_SCREAMING_SNAKE_CASE  )




def        _SCREAMING_SNAKE_CASE  (				)    -> Optional[Any]:







   """simple docstring"""
   return set_verbosity(_SCREAMING_SNAKE_CASE  )




def        _SCREAMING_SNAKE_CASE  (				)    -> str:







   """simple docstring"""
   return set_verbosity(_SCREAMING_SNAKE_CASE  )




def        _SCREAMING_SNAKE_CASE  (				)    -> None:







   """simple docstring"""
   __snake_case				:      List[str]     							= False




def        _SCREAMING_SNAKE_CASE  (				)    -> None:







   """simple docstring"""
   __snake_case				:      List[Any]     							= True


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




class a_    :







   def __init__(self					,   *__a					,   **__a)			->      Union[str, Any]:  # pylint: disable=unused-argument
      """simple docstring"""






      __snake_case				:      Optional[int]     							= args[0] if args else None







   def __iter__(self)			->      int:
      """simple docstring"""






      return iter(self._iterator)







   def __getattr__(self					,   __a)			->      Optional[Any]:
      """simple docstring"""






      def empty_fn(*__a					,   **__a):  # pylint: disable=unused-argument
         return

      return empty_fn







   def __enter__(self)			->      List[Any]:
      """simple docstring"""






      return self







   def __exit__(self					,   __a					,   __a					,   __a)			->      Tuple:
      """simple docstring"""






      return


__A    	=   True




class a_    :







   def __call__(self					,   *__a					,   __a=False					,   **__a)			->      Dict:
      """simple docstring"""






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







   def     SCREAMING_SNAKE_CASE__					(self					,   *__a					,   **__a)			->      Optional[Any]:
      """simple docstring"""






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







   def     SCREAMING_SNAKE_CASE__					(self)			->      List[str]:
      """simple docstring"""






      if _tqdm_active:
         return tqdm_lib.tqdm.get_lock()


__A    	=   _tqdm_cls()




def        _SCREAMING_SNAKE_CASE  (				)    -> bool:







   """simple docstring"""
   global _tqdm_active
   return bool(_tqdm_active  )




def        _SCREAMING_SNAKE_CASE  (				)    -> List[str]:







   """simple docstring"""
   global _tqdm_active
   __snake_case				:      Tuple     							= True





def        _SCREAMING_SNAKE_CASE  (				)    -> Any:







   """simple docstring"""
   global _tqdm_active
   __snake_case				:      List[Any]     							= False







'''simple docstring'''






from ...configuration_utils import PretrainedConfig
from ...utils import logging


__A    	=   logging.get_logger(__name__)

__A    	=   {
    '''sayakpaul/vit-msn-base''': '''https://huggingface.co/sayakpaul/vit-msn-base/resolve/main/config.json''',
    # See all ViT MSN models at https://huggingface.co/models?filter=vit_msn
}




class a_    (    UpperCamelCase_							):
   _snake_case        =							"""vit_msn"""







   def __init__(self					,   __a=7_6_8					,   __a=1_2					,   __a=1_2					,   __a=3_0_7_2					,   __a="gelu"					,   __a=0.0					,   __a=0.0					,   __a=0.02					,   __a=1E-06					,   __a=2_2_4					,   __a=1_6					,   __a=3					,   __a=True					,   **__a					,   )			->      Any:
      """simple docstring"""






      super().__init__(**__a)

      __snake_case				:      List[str]     							= hidden_size
      __snake_case				:      Optional[int]     							= num_hidden_layers
      __snake_case				:      Optional[Any]     							= num_attention_heads
      __snake_case				:      str     							= intermediate_size
      __snake_case				:      List[str]     							= hidden_act
      __snake_case				:      List[Any]     							= hidden_dropout_prob
      __snake_case				:      Tuple     							= attention_probs_dropout_prob
      __snake_case				:      List[str]     							= initializer_range
      __snake_case				:      Optional[int]     							= layer_norm_eps
      __snake_case				:      Dict     							= image_size
      __snake_case				:      int     							= patch_size
      __snake_case				:      Dict     							= num_channels
      __snake_case				:      Tuple     							= qkv_bias