






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


SCREAMING_SNAKE_CASE								=  logging.get_logger(__name__)

SCREAMING_SNAKE_CASE								=  {
    'google/reformer-crime-and-punishment': (
        'https://huggingface.co/google/reformer-crime-and-punishment/resolve/main/config.json'
    ),
    'google/reformer-enwik8': 'https://huggingface.co/google/reformer-enwik8/resolve/main/config.json',
}
class 							A_      (  __lowercase     ):






 '''simple docstring'''




 _SCREAMING_SNAKE_CASE							:     Tuple	=   "reformer"
 _SCREAMING_SNAKE_CASE							:     Dict	=   ["past_buckets_states"]
 _SCREAMING_SNAKE_CASE							:     Optional[Any]	=   {}


 def __init__(		self							,					_A=64							,					_A=["local", "lsh", "local", "lsh", "local", "lsh"]							,					_A=1.0							,					_A=True							,					_A=[64, 64]							,					_A=[64, 192]							,					_A=0							,					_A=2							,					_A=512							,					_A=None							,					_A="relu"							,					_A=0.05							,					_A=256							,					_A=0.02							,					_A=False							,					_A=1e-12							,					_A=1							,					_A=0							,					_A=0.05							,					_A=64							,					_A=64							,					_A=0.0							,					_A=1							,					_A=0							,					_A=4096							,					_A=12							,					_A=None							,					_A=1							,					_A=0							,					_A=320							,					_A=False							,					_A=True							,					_A=None							,					**_A							,					)	->						Tuple:

     """simple docstring"""



     _UpperCAmelCase			: Tuple     					=			hash_seed
     _UpperCAmelCase			: List[Any]     					=			vocab_size
     _UpperCAmelCase			: Dict     					=			attention_head_size
     _UpperCAmelCase			: Optional[int]     					=			hidden_size
     _UpperCAmelCase			: Dict     					=			num_attention_heads
     _UpperCAmelCase			: Union[str, Any]     					=			num_hashes
     _UpperCAmelCase			: Optional[int]     					=			len(_A)
     _UpperCAmelCase			: Any     					=			tuple(_A) if isinstance(_A							,					_A) else num_buckets
     _UpperCAmelCase			: str     					=			lsh_attn_chunk_length
     _UpperCAmelCase			: Optional[Any]     					=			local_attn_chunk_length
     _UpperCAmelCase			: Optional[int]     					=			lsh_num_chunks_after
     _UpperCAmelCase			: Optional[Any]     					=			lsh_num_chunks_before
     _UpperCAmelCase			: str     					=			local_num_chunks_after
     _UpperCAmelCase			: Tuple     					=			local_num_chunks_before
     _UpperCAmelCase			: List[Any]     					=			hidden_act
     _UpperCAmelCase			: Optional[Any]     					=			feed_forward_size
     _UpperCAmelCase			: int     					=			hidden_dropout_prob
     _UpperCAmelCase			: str     					=			lsh_attention_probs_dropout_prob
     _UpperCAmelCase			: Union[str, Any]     					=			local_attention_probs_dropout_prob
     _UpperCAmelCase			: List[str]     					=			max_position_embeddings
     _UpperCAmelCase			: Optional[int]     					=			initializer_range
     _UpperCAmelCase			: List[Any]     					=			layer_norm_eps
     _UpperCAmelCase			: Union[str, Any]     					=			axial_pos_embds
     _UpperCAmelCase			: Tuple     					=			tuple(_A)
     _UpperCAmelCase			: str     					=			tuple(_A)
     _UpperCAmelCase			: int     					=			axial_norm_std
     _UpperCAmelCase			: str     					=			chunk_size_lm_head
     _UpperCAmelCase			: List[Any]     					=			attn_layers
     _UpperCAmelCase			: str     					=			use_cache
     _UpperCAmelCase			: Union[str, Any]     					=			classifier_dropout
     super().__init__(
         pad_token_id=_A							,					eos_token_id=_A							,					is_decoder=_A							,					tie_word_embeddings=_A							,					**_A							,					)












from unittest.mock import patch

import datasets
from datasets import Dataset

def        _lowerCamelCase		(  ) ->   Tuple:
    _UpperCAmelCase			: Union[str, Any]     					=			Dataset.from_dict({'''col_1''': [3, 2, 0, 1]}	)

    with patch('''tqdm.auto.tqdm'''	) as mock_tqdm:
        datasets.disable_progress_bar()
        dset.map(lambda __A	: {"col_2": x["col_1"] + 1}	)
        mock_tqdm.assert_not_called()

        mock_tqdm.reset_mock()

        datasets.enable_progress_bar()
        dset.map(lambda __A	: {"col_2": x["col_1"] + 1}	)
        mock_tqdm.assert_called()




