JeremyAlain
commited on
Commit
•
b4f9bf6
1
Parent(s):
93364fd
loading script created
Browse files- 123_test.py +2 -3
123_test.py
CHANGED
@@ -116,18 +116,17 @@ class FewshotPretraining(datasets.GeneratorBasedBuilder):
|
|
116 |
extracted_paths = dl_manager.download_and_extract(urls)
|
117 |
return [
|
118 |
datasets.SplitGenerator(
|
119 |
-
name=
|
120 |
# These kwargs will be passed to _generate_examples
|
121 |
gen_kwargs={
|
122 |
"file_paths": extracted_paths,
|
123 |
-
"split": "train",
|
124 |
},
|
125 |
)
|
126 |
]
|
127 |
|
128 |
|
129 |
# method parameters are unpacked from `gen_kwargs` as given in `_split_generators`
|
130 |
-
def _generate_examples(self, file_paths
|
131 |
# The `key` is for legacy reasons (tfds) and is not important in itself, but must be unique for each example.
|
132 |
for file_idx, file_path in enumerate(file_paths):
|
133 |
data = pd.read_json(file_path, orient="records", lines=True)
|
|
|
116 |
extracted_paths = dl_manager.download_and_extract(urls)
|
117 |
return [
|
118 |
datasets.SplitGenerator(
|
119 |
+
name="train",
|
120 |
# These kwargs will be passed to _generate_examples
|
121 |
gen_kwargs={
|
122 |
"file_paths": extracted_paths,
|
|
|
123 |
},
|
124 |
)
|
125 |
]
|
126 |
|
127 |
|
128 |
# method parameters are unpacked from `gen_kwargs` as given in `_split_generators`
|
129 |
+
def _generate_examples(self, file_paths):
|
130 |
# The `key` is for legacy reasons (tfds) and is not important in itself, but must be unique for each example.
|
131 |
for file_idx, file_path in enumerate(file_paths):
|
132 |
data = pd.read_json(file_path, orient="records", lines=True)
|