'''simple docstring'''




from typing import List

import datasets
from datasets.tasks import ImageClassification

from ..folder_based_builder import folder_based_builder


__snake_case  : Tuple		       =    datasets.utils.logging.get_logger(__name__)




class       __UpperCAmelCase							(							folder_based_builder.FolderBasedBuilderConfig	):





       '''simple docstring'''



       __lowercase   :   bool  					=							None
       __lowercase   :   bool  					=							None




class       __UpperCAmelCase							(							folder_based_builder.FolderBasedBuilder	):





       '''simple docstring'''



       __lowercase   :   Union[str, Any]  					=							datasets.Image()
       __lowercase   :   Tuple  					=							'image'
       __lowercase   :   Dict  					=							ImageFolderConfig
       __lowercase   :   List[str]  # definition at the bottom of the script
       __lowercase   :   int  					=							ImageClassification(image_column='image'		, label_column='label'	)
__snake_case  : List[str]		       =    [
    '.blp',
    '.bmp',
    '.dib',
    '.bufr',
    '.cur',
    '.pcx',
    '.dcx',
    '.dds',
    '.ps',
    '.eps',
    '.fit',
    '.fits',
    '.fli',
    '.flc',
    '.ftc',
    '.ftu',
    '.gbr',
    '.gif',
    '.grib',
    '.h5',
    '.hdf',
    '.png',
    '.apng',
    '.jp2',
    '.j2k',
    '.jpc',
    '.jpf',
    '.jpx',
    '.j2c',
    '.icns',
    '.ico',
    '.im',
    '.iim',
    '.tif',
    '.tiff',
    '.jfif',
    '.jpe',
    '.jpg',
    '.jpeg',
    '.mpg',
    '.mpeg',
    '.msp',
    '.pcd',
    '.pxr',
    '.pbm',
    '.pgm',
    '.ppm',
    '.pnm',
    '.psd',
    '.bw',
    '.rgb',
    '.rgba',
    '.sgi',
    '.ras',
    '.tga',
    '.icb',
    '.vda',
    '.vst',
    '.webp',
    '.wmf',
    '.emf',
    '.xbm',
    '.xpm',
]
__snake_case  : Optional[int]		       =    IMAGE_EXTENSIONS







'''simple docstring'''




from typing import Optional, Tuple

from ...tokenization_utils_fast import PreTrainedTokenizerFast
from ...utils import logging
from .tokenization_openai import OpenAIGPTTokenizer


__snake_case  : Union[str, Any]		       =    logging.get_logger(__name__)

__snake_case  : Union[str, Any]		       =    {'vocab_file': 'vocab.json', 'merges_file': 'merges.txt', 'tokenizer_file': 'tokenizer.json'}

__snake_case  : List[str]		       =    {
    'vocab_file': {'openai-gpt': 'https://huggingface.co/openai-gpt/resolve/main/vocab.json'},
    'merges_file': {'openai-gpt': 'https://huggingface.co/openai-gpt/resolve/main/merges.txt'},
    'tokenizer_file': {'openai-gpt': 'https://huggingface.co/openai-gpt/resolve/main/tokenizer.json'},
}

__snake_case  : Optional[int]		       =    {
    'openai-gpt': 512,
}




class       __UpperCAmelCase							(							_UpperCamelCase	):





       '''simple docstring'''



       __lowercase   :   int  					=							VOCAB_FILES_NAMES
       __lowercase   :   int  					=							PRETRAINED_VOCAB_FILES_MAP
       __lowercase   :   str  					=							PRETRAINED_POSITIONAL_EMBEDDINGS_SIZES
       __lowercase   :   Optional[Any]  					=							['input_ids', 'attention_mask']
       __lowercase   :   List[Any]  					=							OpenAIGPTTokenizer

       def __init__( self       ,	_SCREAMING_SNAKE_CASE=None       ,	_SCREAMING_SNAKE_CASE=None       ,	_SCREAMING_SNAKE_CASE=None       ,	_SCREAMING_SNAKE_CASE="<unk>"       ,	**_SCREAMING_SNAKE_CASE					)						->	Optional[Any]:
           super().__init__(_SCREAMING_SNAKE_CASE       ,	_SCREAMING_SNAKE_CASE       ,	tokenizer_file=_SCREAMING_SNAKE_CASE       ,	unk_token=_SCREAMING_SNAKE_CASE       ,	**_SCREAMING_SNAKE_CASE					)

       @property
       def    __A			( self					)						->	Optional[Any]:
           return True

       def    __A			( self       ,	_SCREAMING_SNAKE_CASE       ,	_SCREAMING_SNAKE_CASE = None					)						->	Tuple[str]:
           A_      =  self._tokenizer.model.save(_SCREAMING_SNAKE_CASE       ,	name=_SCREAMING_SNAKE_CASE					)
           return tuple(_SCREAMING_SNAKE_CASE					)






