'''simple docstring'''





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


__lowerCamelCase    :				Dict							     =	logging.get_logger(__name__)

__lowerCamelCase    :				List[str]							     =	{"openai-gpt": "https://huggingface.co/openai-gpt/resolve/main/config.json"}







class __snake_case       (		__lowerCAmelCase	):
   lowerCAmelCase_														=							"openai-gpt"
   lowerCAmelCase_														=							{
       "max_position_embeddings": "n_positions",
       "hidden_size": "n_embd",
       "num_attention_heads": "n_head",
       "num_hidden_layers": "n_layer",
   }




   def __init__(					self    :       Any ,			_lowercase    :       str=4_04_78 ,			_lowercase    :       Optional[Any]=5_12 ,			_lowercase    :       Dict=7_68 ,			_lowercase    :       Dict=12 ,			_lowercase    :       Optional[Any]=12 ,			_lowercase    :       str="gelu" ,			_lowercase    :       Dict=0.1 ,			_lowercase    :       Optional[int]=0.1 ,			_lowercase    :       List[str]=0.1 ,			_lowercase    :       List[str]=1E-5 ,			_lowercase    :       Tuple=0.02 ,			_lowercase    :       int="cls_index" ,			_lowercase    :       Any=True ,			_lowercase    :       int=None ,			_lowercase    :       Dict=True ,			_lowercase    :       Dict=0.1 ,			**_lowercase    :       Union[str, Any] ,			):



     """simple docstring"""






     SCREAMING_SNAKE_CASE__    							=   vocab_size
     SCREAMING_SNAKE_CASE__    							=   n_positions
     SCREAMING_SNAKE_CASE__    							=   n_embd
     SCREAMING_SNAKE_CASE__    							=   n_layer
     SCREAMING_SNAKE_CASE__    							=   n_head
     SCREAMING_SNAKE_CASE__    							=   afn
     SCREAMING_SNAKE_CASE__    							=   resid_pdrop
     SCREAMING_SNAKE_CASE__    							=   embd_pdrop
     SCREAMING_SNAKE_CASE__    							=   attn_pdrop
     SCREAMING_SNAKE_CASE__    							=   layer_norm_epsilon
     SCREAMING_SNAKE_CASE__    							=   initializer_range
     SCREAMING_SNAKE_CASE__    							=   summary_type
     SCREAMING_SNAKE_CASE__    							=   summary_use_proj
     SCREAMING_SNAKE_CASE__    							=   summary_activation
     SCREAMING_SNAKE_CASE__    							=   summary_first_dropout
     SCREAMING_SNAKE_CASE__    							=   summary_proj_to_labels
     super().__init__(**lowerCamelCase__   )

import copy
from dataclasses import dataclass, field
from typing import ClassVar, Dict

from ..features import ClassLabel, Features, Value
from .base import TaskTemplate







@dataclass(frozen=lowerCamelCase_	)
class __snake_case       (		lowerCamelCase_	):
   # `task` is not a ClassVar since we want it to be part of the `asdict` output for JSON serialization
   lowerCAmelCase_														=							field(default="text-classification"     ,	metadata={"include_in_asdict_even_if_is_default": True}	)
   lowerCAmelCase_														=							Features({"text": Value("string"	)}	)
   lowerCAmelCase_														=							Features({"labels": ClassLabel}	)
   lowerCAmelCase_														=							"text"
   lowerCAmelCase_														=							"labels"




   def 			__a		(					self    :       Dict ,			_lowercase    :       List[Any]   ):



     """simple docstring"""






     if self.label_column not in features:
       raise ValueError(f"""Column {self.label_column} is not present in features."""   )
     if not isinstance(features[self.label_column] ,			_lowercase   ):
       raise ValueError(f"""Column {self.label_column} is not a ClassLabel."""   )
     SCREAMING_SNAKE_CASE__    							=   copy.deepcopy(self   )
     SCREAMING_SNAKE_CASE__    							=   self.label_schema.copy()
     SCREAMING_SNAKE_CASE__    							=   features[self.label_column]
     SCREAMING_SNAKE_CASE__    							=   label_schema
     return task_template




   @property
   def 			__a		(					self    :       List[Any]   ):



     """simple docstring"""






     return {
         self.text_column: "text",
         self.label_column: "labels",
     }
