


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_     :       Any   							={
    """debug""": logging.DEBUG,
    """info""": logging.INFO,
    """warning""": logging.WARNING,
    """error""": logging.ERROR,
    """critical""": logging.CRITICAL,
}

A_     :       List[str]   							=logging.WARNING




def 	lowerCamelCase_							(       ):



						"""simple docstring"""




						a_		      =		os.getenv("""DATASETS_VERBOSITY"""							,     __lowercase   )
						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 	lowerCamelCase_							(       ):



						"""simple docstring"""




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




def 	lowerCamelCase_							(       ):



						"""simple docstring"""




						return logging.getLogger(_get_library_name()   )




def 	lowerCamelCase_							(       ):



						"""simple docstring"""




						a_		      =		_get_library_root_logger()
						library_root_logger.setLevel(_get_default_logging_level()   )




def 	lowerCamelCase_							(       ):



						"""simple docstring"""




						a_		      =		_get_library_root_logger()
						library_root_logger.setLevel(logging.NOTSET   )




def 	lowerCamelCase_							(       UpperCAmelCase__ = None   ):



						"""simple docstring"""




						if name is None:
												a_		      =		_get_library_name()
						return logging.getLogger(__lowercase   )




def 	lowerCamelCase_							(       ):



						"""simple docstring"""




						return _get_library_root_logger().getEffectiveLevel()




def 	lowerCamelCase_							(       UpperCAmelCase__   ):



						"""simple docstring"""




						_get_library_root_logger().setLevel(__lowercase   )




def 	lowerCamelCase_							(       ):



						"""simple docstring"""




						return set_verbosity(__lowercase   )




def 	lowerCamelCase_							(       ):



						"""simple docstring"""




						return set_verbosity(__lowercase   )




def 	lowerCamelCase_							(       ):



						"""simple docstring"""




						return set_verbosity(__lowercase   )




def 	lowerCamelCase_							(       ):



						"""simple docstring"""




						return set_verbosity(__lowercase   )




def 	lowerCamelCase_							(       ):



						"""simple docstring"""




						a_		      =		False




def 	lowerCamelCase_							(       ):



						"""simple docstring"""




						a_		      =		True


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





class 							lowercase_					:






							"""simple docstring"""







							def __init__( self      ,     *_UpperCAmelCase      ,     **_UpperCAmelCase		):  # pylint: disable=unused-argument







													"""simple docstring"""


													a_		      =		args[0] if args else None


							def __iter__( self		):







													"""simple docstring"""


													return iter(self._iterator		)


							def __getattr__( self      ,     _UpperCAmelCase		):







													"""simple docstring"""


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

													return empty_fn


							def __enter__( self		):







													"""simple docstring"""


													return self






							def __exit__( self      ,     _UpperCAmelCase      ,     _UpperCAmelCase      ,     _UpperCAmelCase		):







													"""simple docstring"""


													return




A_     :       Optional[Any]   							=True





class 							lowercase_					:






							"""simple docstring"""







							def __call__( self      ,     *_UpperCAmelCase      ,     _UpperCAmelCase=False      ,     **_UpperCAmelCase		):







													"""simple docstring"""


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


							def     lowercase__  ( self      ,     *_UpperCAmelCase      ,     **_UpperCAmelCase		):







													"""simple docstring"""


													a_		      =		None
													if _tqdm_active:
																			return tqdm_lib.tqdm.set_lock(*__a      ,     **__a		)






							def     lowercase__  ( self		):







													"""simple docstring"""


													if _tqdm_active:
																			return tqdm_lib.tqdm.get_lock()




A_     :       Optional[Any]   							=_tqdm_cls()




def 	lowerCamelCase_							(       ):



						"""simple docstring"""




						global _tqdm_active
						return bool(_tqdm_active   )




def 	lowerCamelCase_							(       ):



						"""simple docstring"""




						global _tqdm_active
						a_		      =		True




def 	lowerCamelCase_							(       ):



						"""simple docstring"""




						global _tqdm_active
						a_		      =		False





'''simple docstring'''







import logging

from transformers.configuration_utils import PretrainedConfig


lowercase      :   int      =       logging.getLogger(__name__)







class 					_a (a__	):





     '''simple docstring'''



     lowerCAmelCase_  :     Union[str, Any]          =					"""masked_bert"""







     def __init__(				self							,__a=30_522							,__a=768							,__a=12							,__a=12							,__a=3_072							,__a="gelu"							,__a=0.1							,__a=0.1							,__a=512							,__a=2							,__a=0.02							,__a=1E-12							,__a=0							,__a="topK"							,__a="constant"							,__a=0.0							,**__a							,)      ->				List[str]:
          super().__init__(pad_token_id=__a							,**__a							)

          snake_case			:      Dict        =			vocab_size
          snake_case			:      Optional[Any]        =			hidden_size
          snake_case			:      Dict        =			num_hidden_layers
          snake_case			:      List[Any]        =			num_attention_heads
          snake_case			:      Dict        =			hidden_act
          snake_case			:      Any        =			intermediate_size
          snake_case			:      Optional[int]        =			hidden_dropout_prob
          snake_case			:      Optional[Any]        =			attention_probs_dropout_prob
          snake_case			:      List[Any]        =			max_position_embeddings
          snake_case			:      int        =			type_vocab_size
          snake_case			:      int        =			initializer_range
          snake_case			:      int        =			layer_norm_eps
          snake_case			:      Any        =			pruning_method
          snake_case			:      Union[str, Any]        =			mask_init
          snake_case			:      int        =			mask_scale



