Datasets:
Witold Wydmański commited on
Commit ·
acc8baa
1
Parent(s): 97280cf
fix
Browse files- reuters10k.py +8 -3
reuters10k.py
CHANGED
|
@@ -31,18 +31,23 @@ class Reuters10K(datasets.GeneratorBasedBuilder):
|
|
| 31 |
train_url = "train.npy"
|
| 32 |
test_url = "test.npy"
|
| 33 |
|
| 34 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 35 |
return [
|
| 36 |
datasets.SplitGenerator(
|
| 37 |
name=datasets.Split.TRAIN,
|
| 38 |
gen_kwargs={
|
| 39 |
-
"filepath":
|
| 40 |
},
|
| 41 |
),
|
| 42 |
datasets.SplitGenerator(
|
| 43 |
name=datasets.Split.TEST,
|
| 44 |
gen_kwargs={
|
| 45 |
-
"filepath":
|
| 46 |
},
|
| 47 |
)
|
| 48 |
]
|
|
|
|
| 31 |
train_url = "train.npy"
|
| 32 |
test_url = "test.npy"
|
| 33 |
|
| 34 |
+
downloaded_files = dl_manager.download_and_extract({
|
| 35 |
+
"train": train_url,
|
| 36 |
+
"test": test_url
|
| 37 |
+
})
|
| 38 |
+
print(downloaded_files)
|
| 39 |
+
|
| 40 |
return [
|
| 41 |
datasets.SplitGenerator(
|
| 42 |
name=datasets.Split.TRAIN,
|
| 43 |
gen_kwargs={
|
| 44 |
+
"filepath": downloaded_files["train"]
|
| 45 |
},
|
| 46 |
),
|
| 47 |
datasets.SplitGenerator(
|
| 48 |
name=datasets.Split.TEST,
|
| 49 |
gen_kwargs={
|
| 50 |
+
"filepath": downloaded_files["test"]
|
| 51 |
},
|
| 52 |
)
|
| 53 |
]
|