tomatotest / download_extract.py
XingjianLi's picture
Create download_extract.py
44f789f verified
raw
history blame contribute delete
466 Bytes
# download and extract all data to folders of .h5 files, will also remove the compressed tar and blobs (see the input arguments)
# chunk decides how many tars will be downloaded and extracted before removing them, num_proc allows multiple tar to be downloaded at once (limited by chunk)
from datasets import load_dataset
ds = load_dataset("xingjianli/tomatotest", name="full",split="train",trust_remote_code=True, extract=True, remove_tar=True, chunk=4, num_proc=4)