Felix
commited on
Commit
•
bd4b9b1
1
Parent(s):
931a667
change to .jsonl
Browse files- superlim-2.py +2 -5
superlim-2.py
CHANGED
@@ -327,7 +327,7 @@ class SuperLim(datasets.GeneratorBasedBuilder):
|
|
327 |
)
|
328 |
|
329 |
def _split_generators(self, dl_manager):
|
330 |
-
file_format = '
|
331 |
splits = []
|
332 |
data_dir_test = dl_manager.download_and_extract(os.path.join(_URL,_TASKS[self.config.name],f"test.{file_format}"))
|
333 |
split_test = datasets.SplitGenerator(
|
@@ -366,10 +366,7 @@ class SuperLim(datasets.GeneratorBasedBuilder):
|
|
366 |
def _generate_examples(self, filepath, split):
|
367 |
# TODO: This method handles input defined in _split_generators to yield (key, example) tuples from the dataset.
|
368 |
# The `key` is for legacy reasons (tfds) and is not important in itself, but must be unique for each example.
|
369 |
-
|
370 |
-
df = pd.read_json(filepath, lines=True)
|
371 |
-
else:
|
372 |
-
df = pd.read_csv(filepath, delimiter='\t')
|
373 |
for key, row in df.iterrows():
|
374 |
if self.config.name == "dalaj":
|
375 |
# Yields examples as (key, example) tuples
|
|
|
327 |
)
|
328 |
|
329 |
def _split_generators(self, dl_manager):
|
330 |
+
file_format = 'jsonl'
|
331 |
splits = []
|
332 |
data_dir_test = dl_manager.download_and_extract(os.path.join(_URL,_TASKS[self.config.name],f"test.{file_format}"))
|
333 |
split_test = datasets.SplitGenerator(
|
|
|
366 |
def _generate_examples(self, filepath, split):
|
367 |
# TODO: This method handles input defined in _split_generators to yield (key, example) tuples from the dataset.
|
368 |
# The `key` is for legacy reasons (tfds) and is not important in itself, but must be unique for each example.
|
369 |
+
df = pd.read_json(filepath, lines=True)
|
|
|
|
|
|
|
370 |
for key, row in df.iterrows():
|
371 |
if self.config.name == "dalaj":
|
372 |
# Yields examples as (key, example) tuples
|