-
Notifications
You must be signed in to change notification settings - Fork 3k
Open
Description
Documentation link: https://huggingface.co/docs/datasets/en/package_reference/main_classes
Link to method (docstring present):
datasets/src/datasets/arrow_dataset.py
Line 1029 in 6f2502c
def from_list( |
The docstring is present for the function, but seems missing from the official documentation for the Dataset
class on HuggingFace.
The method in question:
@classmethod
def from_dict(
cls,
mapping: dict,
features: Optional[Features] = None,
info: Optional[DatasetInfo] = None,
split: Optional[NamedSplit] = None,
) -> "Dataset":
"""
Convert `dict` to a `pyarrow.Table` to create a [`Dataset`].
Important: a dataset created with from_dict() lives in memory
and therefore doesn't have an associated cache directory.
This may change in the future, but in the meantime if you
want to reduce memory usage you should write it back on disk
and reload using e.g. save_to_disk / load_from_disk.
Args:
mapping (`Mapping`):
Mapping of strings to Arrays or Python lists.
features ([`Features`], *optional*):
Dataset features.
info (`DatasetInfo`, *optional*):
Dataset information, like description, citation, etc.
split (`NamedSplit`, *optional*):
Name of the dataset split.
Returns:
[`Dataset`]
"""
Metadata
Metadata
Assignees
Labels
No labels