milling_processes_LUH__testing_propuses.py
CHANGED
|
@@ -95,6 +95,7 @@ class MillingProcessesLUH(datasets.GeneratorBasedBuilder):
|
|
| 95 |
)
|
| 96 |
|
| 97 |
def _split_generators(self, dl_manager):
|
|
|
|
| 98 |
# TODO: This method is tasked with downloading/extracting the data and defining the splits depending on the configuration
|
| 99 |
# If several configurations are possible (listed in BUILDER_CONFIGS), the configuration selected by the user is in self.config.name
|
| 100 |
|
|
@@ -107,39 +108,27 @@ class MillingProcessesLUH(datasets.GeneratorBasedBuilder):
|
|
| 107 |
datasets.SplitGenerator(
|
| 108 |
name=datasets.Split.TRAIN,
|
| 109 |
# These kwargs will be passed to _generate_examples
|
| 110 |
-
gen_kwargs={
|
| 111 |
-
"p_data":urls,
|
| 112 |
-
"id_start":0,
|
| 113 |
-
"id_end":2
|
| 114 |
-
|
| 115 |
# "filepath": os.path.join(data_dir, "train.jsonl"),
|
| 116 |
# "split": "train",
|
| 117 |
},
|
| 118 |
),
|
| 119 |
-
datasets.SplitGenerator(
|
| 120 |
-
|
| 121 |
-
|
| 122 |
-
|
| 123 |
-
|
| 124 |
-
|
| 125 |
-
|
| 126 |
-
|
| 127 |
-
|
| 128 |
-
|
| 129 |
-
|
| 130 |
-
|
| 131 |
-
),
|
| 132 |
-
|
| 133 |
-
|
| 134 |
-
|
| 135 |
-
gen_kwargs={
|
| 136 |
-
"p_data":urls,
|
| 137 |
-
"id_start":3,
|
| 138 |
-
"id_end":4
|
| 139 |
-
# "filepath": os.path.join(data_dir, "test.jsonl"),
|
| 140 |
-
# "split": "test"
|
| 141 |
-
},
|
| 142 |
-
),
|
| 143 |
]
|
| 144 |
|
| 145 |
# method parameters are unpacked from `gen_kwargs` as given in `_split_generators`
|
|
|
|
| 95 |
)
|
| 96 |
|
| 97 |
def _split_generators(self, dl_manager):
|
| 98 |
+
# TODO fix the bug: what should urls be and how to split data correctly
|
| 99 |
# TODO: This method is tasked with downloading/extracting the data and defining the splits depending on the configuration
|
| 100 |
# If several configurations are possible (listed in BUILDER_CONFIGS), the configuration selected by the user is in self.config.name
|
| 101 |
|
|
|
|
| 108 |
datasets.SplitGenerator(
|
| 109 |
name=datasets.Split.TRAIN,
|
| 110 |
# These kwargs will be passed to _generate_examples
|
| 111 |
+
gen_kwargs={"filepaths": [os.path.join(data_dir,i) for i in os.listdir(data_dir)[0:6]],"split": "train"
|
|
|
|
|
|
|
|
|
|
|
|
|
| 112 |
# "filepath": os.path.join(data_dir, "train.jsonl"),
|
| 113 |
# "split": "train",
|
| 114 |
},
|
| 115 |
),
|
| 116 |
+
# datasets.SplitGenerator(
|
| 117 |
+
# name=datasets.Split.VALIDATION,
|
| 118 |
+
# # These kwargs will be passed to _generate_examples
|
| 119 |
+
# gen_kwargs={"filepaths": [i for i in os.listdir(data_dir)[6:7]],"split": "validation"
|
| 120 |
+
# # "filepath": os.path.join(data_dir, "dev.jsonl"),
|
| 121 |
+
# # "split": "dev",
|
| 122 |
+
# },
|
| 123 |
+
# ),
|
| 124 |
+
# datasets.SplitGenerator(
|
| 125 |
+
# name=datasets.Split.TEST,
|
| 126 |
+
# # These kwargs will be passed to _generate_examples
|
| 127 |
+
# gen_kwargs={"filepaths": [i for i in os.listdir(data_dir)[7:]], "split": "test"
|
| 128 |
+
# # "filepath": os.path.join(data_dir, "test.jsonl"),
|
| 129 |
+
# # "split": "test"
|
| 130 |
+
# },
|
| 131 |
+
# ),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 132 |
]
|
| 133 |
|
| 134 |
# method parameters are unpacked from `gen_kwargs` as given in `_split_generators`
|