/usr/local/lib/python3.6/site-packages/datasets/__pycache__
Edit: /usr/local/lib/python3.6/site-packages/datasets/__pycache__/inspect.cpython-36.pyc (18583B)
3
<%EgP
@ sr d Z ddlZddlZddlZddlmZ ddlmZmZm Z m
Z
mZmZ ddl
Z
ddlmZ ddlmZ ddlmZ dd lmZ dd
lmZmZmZmZ ddlmZ ddlmZ dd
lm Z ee!Z"G dd de#Z$d'ddZ%d(ddZ&d)e'e'e
e dddZ(d*e'e'e
e dddZ)d+e'e
eeee'f e
e e
e e
ee'e f e
ee*e'f dddZ+d,e'e
ee'e f e
e e
e e
e' e
eeee'f ddd Z,d-e'e
e' e
ee'ee' e e'ee'ee' f f f e
e e
e e
ee'e f e
ee*e'f ed!d"d#Z-d.e'e
e' e
ee'ee' e e'ee'ee' f f f e
e e
e e
ee'e f e
ee*e'f d$d%d&Z.dS )/z' List and inspect datasets and metrics. N)PurePath)DictListMappingOptionalSequenceUnion )DownloadConfig)DownloadMode)StreamingDownloadManager)DatasetInfo)dataset_module_factoryimport_main_classload_dataset_buildermetric_module_factory)relative_to_absolute_path)
get_logger)Versionc @ s e Zd ZdS )SplitsNotFoundErrorN)__name__
__module____qualname__ r r :/usr/local/lib/python3.6/site-packages/datasets/inspect.pyr ' s r TFc C s4 t j|d}| sdd |D }|s0dd |D }|S )aG List all the datasets scripts available on the Hugging Face Hub.
Args:
with_community_datasets (:obj:`bool`, optional, default ``True``): Include the community provided datasets.
with_details (:obj:`bool`, optional, default ``False``): Return the full details on the datasets instead of only the short name.
Example:
```py
>>> from datasets import list_datasets
>>> list_datasets()
['acronym_identification',
'ade_corpus_v2',
'adversarial_qa',
'aeslc',
'afrikaans_ner_corpus',
'ag_news',
...
]
```
)fullc S s g | ]}d |j kr|qS )/)id).0datasetr r r
C s z!list_datasets..c S s g | ]
}|j qS r )r )r r r r r r E s )huggingface_hub
list_datasets)Zwith_community_datasetswith_detailsZdatasetsr r r r" + s r" c C s0 t j }| sdd |D }|s,dd |D }|S )a List all the metrics script available on the Hugging Face Hub.
Args:
with_community_metrics (:obj:`bool`, optional, default ``True``): Include the community provided metrics.
with_details (:obj:`bool`, optional, default ``False``): Return the full details on the metrics instead of only the short name.
Example:
```py
>>> from datasets import list_metrics
>>> list_metrics()
['accuracy',
'bertscore',
'bleu',
'bleurt',
'cer',
'chrf',
...
]
```
c S s g | ]}d |j kr|qS )r )r )r metricr r r r a s z list_metrics..c S s g | ]
}|j qS r )r )r r$ r r r r c s )r! list_metrics)Zwith_community_metricsr# Zmetricsr r r r% I s r% )path
local_pathdownload_configc
K s t | fd|i|}t|jdd}tj|}tjj|}xtj|D ]\}} }
tjj |tjj
||}tj|dd dd | D | dd<