Datasets:
Create download_extract.py
Browse files- download_extract.py +4 -0
download_extract.py
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# download and extract all data to folders of .h5 files, will also remove the compressed tar and blobs (see the input arguments)
|
| 2 |
+
# 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)
|
| 3 |
+
from datasets import load_dataset
|
| 4 |
+
ds = load_dataset("xingjianli/tomatotest", name="full",split="train",trust_remote_code=True, extract=True, remove_tar=True, chunk=4, num_proc=4)
|