/usr/local/lib/python3.6/site-packages/datasets/commands/__pycache__
Edit: /usr/local/lib/python3.6/site-packages/datasets/commands/__pycache__/convert.cpython-36.pyc (6175B)
3
<%Eg @ s d dl Z d dlZd dlZd dlmZmZ d dlmZ d dlm Z dZ
dZddd d
ddgZd(d)d*d+d,d-d.d/d0d1d2gZ
ed#d$d%ZG d&d' d'eZdS )3 N)ArgumentParser Namespace)BaseDatasetsCLICommand)
get_loggerz><<<<<<< This should probably be modified because it mentions: z=======
>>>>>>>
ZTextEncoderConfigZByteTextEncoderZSubwordTextEncoderZencoder_configZmaybe_build_from_corpusZ
manual_dir
tfds\.coredatasetstf\.io\.gfile\.GFileopen
tf\.([\w\d]+)datasets.Value('\1')tfds\.features\.Text\(\)datasets.Value('string')tfds\.features\.Text\(datasets.Value('string'),+features\s*=\s*tfds.features.FeaturesDict\(features=datasets.Features(tfds\.features\.FeaturesDict\(dict(The TensorFlow Datasets AuthorsDThe TensorFlow Datasets Authors and the HuggingFace Datasets Authorstfds\. datasets.dl_manager\.manual_dirself.config.data_dirself\.builder_configself.config)argsc C s t | j| jS )zz
Factory function used to convert a model TF 1.0 checkpoint in a PyTorch checkpoint.
Returns: ConvertCommand
)ConvertCommand tfds_pathdatasets_directory)r r C/usr/local/lib/python3.6/site-packages/datasets/commands/convert.pyconvert_command_factory* s r" c @ s6 e Zd ZeedddZeedddZdd Zd S )
r )parserc C sB | j ddd}|jdtddd |jdtdd d |jtd
dS )z
Register this command to argparse so it's available for the datasets-cli
Args:
parser: Root parser to register command-specific arguments
convertzHConvert a TensorFlow Datasets dataset to a HuggingFace Datasets dataset.)helpz--tfds_pathTzQPath to a TensorFlow Datasets folder to convert or a single tfds file to convert.)typerequiredr% z--datasets_directoryz(Path to the HuggingFace Datasets folder.)funcN)
add_parseradd_argumentstrset_defaultsr" )r# Ztrain_parserr r r! register_subcommand4 s z"ConvertCommand.register_subcommand)r r c G s t d| _|| _|| _d S )Nzdatasets-cli/converting)r _logger
_tfds_path_datasets_directory)selfr r r r r r! __init__K s
zConvertCommand.__init__c sj t jj| jrt jj| j}n&t