"""simple docstring"""



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


_UpperCamelCase         =		logging.get_logger(__name__)

_UpperCamelCase         =		{
    "openbmb/cpm-ant-10b": "https://huggingface.co/openbmb/cpm-ant-10b/blob/main/config.json"
    # See all CPMAnt models at https://huggingface.co/models?filter=cpmant
}
class 	__UpperCAmelCase						(__A    ):







			'''simple docstring'''
			_UpperCamelCase     :	Optional[Any]				    =							'''cpmant'''





			def __init__( self      ,			snake_case_ = 30_720      ,			snake_case_ = 4_096      ,			snake_case_ = 32      ,			snake_case_ = 128      ,			snake_case_ = 10_240      ,			snake_case_ = 48      ,			snake_case_ = 0.0      ,			snake_case_ = 512      ,			snake_case_ = 2_048      ,			snake_case_ = 1E-6      ,			snake_case_ = 1.0      ,			snake_case_ = 32      ,			snake_case_ = 32      ,			snake_case_ = 32      ,			snake_case_ = True      ,			**snake_case_      ,			):







										'''simple docstring'''


										super().__init__(**a_       )
										A__					:    Dict														= prompt_types
										A__					:    List[str]														= prompt_length
										A__					:    List[Any]														= segment_types
										A__					:    str														= hidden_size
										A__					:    str														= num_attention_heads
										A__					:    int														= dim_head
										A__					:    Optional[int]														= dim_ff
										A__					:    str														= num_hidden_layers
										A__					:    List[Any]														= position_bias_num_buckets
										A__					:    Union[str, Any]														= position_bias_max_distance
										A__					:    Optional[int]														= dropout_p
										A__					:    List[Any]														= eps
										A__					:    int														= use_cache
										A__					:    Optional[int]														= vocab_size
										A__					:    str														= init_std






"""simple docstring"""



import enum
import inspect
import warnings
from functools import wraps
from typing import Callable, Optional

from .logging import get_logger


_UpperCamelCase         =		set()
_UpperCamelCase         =		get_logger(__name__)

def    _A(		lowerCAmelCase = None       ):

							def decorator(lowerCAmelCase       ):
														global _emitted_deprecation_warnings

														if inspect.isclass(lowerCAmelCase       ):
																					A__					:    List[Any]														= deprecated_class_or_function.__init__
																					A__					:    Any														= deprecated_class_or_function.__name__
														else:
																					A__					:    Dict														= deprecated_class_or_function
																					A__					:    Optional[int]														= deprecated_function.__name__
																					# Support deprecating __init__ class method: class name instead
																					A__					:    List[str]														= name if name != """__init__""" else deprecated_function.__qualname__.split("""."""       )[-2]

														A__					:    Union[str, Any]														= (
														    F'''{name} is deprecated and will be removed in the next major version of datasets.''' + F''' {help_message}'''
														    if help_message
														    else """"""
														)

														@wraps(lowerCAmelCase       )
														def wrapper(*lowerCAmelCase ,     **lowerCAmelCase       ):
																					A__					:    Tuple														= hash(lowerCAmelCase       )
																					if func_hash not in _emitted_deprecation_warnings:
																												warnings.warn(lowerCAmelCase ,     category=lowerCAmelCase ,     stacklevel=2       )
																												_emitted_deprecation_warnings.add(lowerCAmelCase       )
																					return deprecated_function(*lowerCAmelCase ,     **lowerCAmelCase       )

														A__					:    int														= """deprecated"""

														if inspect.isclass(lowerCAmelCase       ):
																					A__					:    Union[str, Any]														= wrapper
																					return deprecated_class_or_function
														else:
																					return wrapper

							return decorator
class 	__UpperCAmelCase						(enum.EnumMeta    ):







			'''simple docstring'''





			def __getattribute__( cls      ,			snake_case_       ):







										'''simple docstring'''


										A__					:    Union[str, Any]														= super().__getattribute__(snake_case_       )
										if isinstance(snake_case_      ,			enum.Enum       ) and obj._on_access:
																	obj._on_access()
										return obj





			def __getitem__( cls      ,			snake_case_       ):







										'''simple docstring'''


										A__					:    Tuple														= super().__getitem__(snake_case_       )
										if member._on_access:
																	member._on_access()
										return member





			def __call__( cls      ,			snake_case_      ,			snake_case_=None      ,			*, snake_case_=None      ,			snake_case_=None      ,			snake_case_=None      ,			snake_case_=1       ):







										'''simple docstring'''


										A__					:    List[Any]														= super().__call__(snake_case_      ,			snake_case_      ,			module=snake_case_      ,			qualname=snake_case_      ,			type=snake_case_      ,			start=snake_case_       )
										if isinstance(snake_case_      ,			enum.Enum       ) and obj._on_access:
																	obj._on_access()
										return obj





class 	__UpperCAmelCase						(enum.Enum       ,      metaclass=__A    ):







			'''simple docstring'''





			def __new__( cls      ,			snake_case_       ):







										'''simple docstring'''


										A__					:    Tuple														= object.__new__(cls       )
										A__					:    int														= value
										A__					:    Optional[int]														= member.deprecate
										return member





			@property
			def 		lowerCamelCase				( self       ):







										'''simple docstring'''


										return ""





			def 		lowerCamelCase				( self       ):







										'''simple docstring'''


										A__					:    Tuple														= F''' {self.help_message}''' if self.help_message else """"""
										warnings.warn(
										    F'''\'{self.__objclass__.__name__}\' is deprecated and will be removed in the next major version of datasets.'''
										    + help_message      ,			snake_case_      ,			stacklevel=3      ,			)





