Hi,do you know how to load the dataset from local file now?
Hi, if I want to load the dataset from local file, then how to specify the configuration name?
Originally posted by @WHU-gentle in https://github.com/huggingface/datasets/issues/2976#issuecomment-1333455222
@Gera001
Loading Dataset from Local Files Using 🤗Hugging Face.
To load a dataset from local files using the Hugging Face datasets library, you can use the load_dataset function.
from datasets import load_dataset
dataset = load_dataset('csv', data_files={'train': 'path/to/train.csv',
'test': 'path/to/test.csv'})
Reference to HF Datasets docs for loading from local.
@albertvillanova this issue can be closed here.
like this: from datasets import load_from_disk dataset = load_from_disk(data_path)
@ge00009
like this: from datasets import load_from_disk dataset = load_from_disk(data_path)
Loads a dataset that was previously saved using save_to_disk().
Reference link: https://huggingface.co/docs/datasets/en/package_reference/loading_methods#datasets.load_from_disk.example