/usr/local/lib/python3.6/site-packages/datasets/__pycache__
Edit: /usr/local/lib/python3.6/site-packages/datasets/__pycache__/info.cpython-36.pyc (17359B)
3
<%Eg$E @ sJ d Z ddlZddlZddlZddlZddlmZmZ ddlmZm Z m
Z
mZ ddlm
Z
ddlmZmZ ddlmZ dd lmZmZ dd
lmZ ddlmZ ddlmZmZ eeZeG d
d dZeG dd dZ G dd de!Z"G dd de!Z#eG dd dZ$eG dd dZ%G dd dee&e%f Z'eG dd dZ(dS )a DatasetInfo and MetricInfo record information we know about a dataset and a metric.
This includes things that we know about the dataset statically, i.e.:
- description
- canonical location
- does it have validation and tests splits
- size
- etc.
This also includes the things that can and should be computed once we've
processed the dataset as well:
- number of examples (in each split)
- etc.
N) dataclassfield)DictListOptionalUnion )config)FeaturesValue) SplitDict)TaskTemplatetask_template_from_dict)Version)
get_logger)asdict
unique_valuesc @ s e Zd ZU dZedZedS )SupervisedKeysData N)__name__
__module____qualname__inputstroutput r r 7/usr/local/lib/python3.6/site-packages/datasets/info.pyr 2 s
r c @ s e Zd ZU dZedZedS )DownloadChecksumsEntryDatar N)r r r keyr valuer r r r r 8 s
r c @ s e Zd ZdZdS )MissingCachedSizesConfigErrorz;The expected cached sizes of the download file are missing.N)r r r __doc__r r r r r > s r c @ s e Zd ZdZdS )NonMatchingCachedSizesErrorz/The prepared split doesn't have expected sizes.N)r r r r! r r r r r" B s r" c @ sB e Zd ZU dZee dZee dd Ze ed dddZ
dS )PostProcessedInfoNc C s* | j d k r&t| j t r&tj| j | _ d S )N)features
isinstancer
from_dict)selfr r r
__post_init__K s zPostProcessedInfo.__post_init__)post_processed_info_dictreturnc s0 dd t j| D | f fdd|j D S )Nc S s h | ]
}|j qS r )name).0fr r r
R s z.PostProcessedInfo.from_dict..c s i | ]\}}| kr||qS r r )r, kv)field_namesr r
S s z/PostProcessedInfo.from_dict..)dataclassesfieldsitems)clsr) r )r1 r r&