Update ldkp3k.py
Browse files
ldkp3k.py
CHANGED
@@ -48,8 +48,9 @@ class LDKP3k(datasets.GeneratorBasedBuilder):
|
|
48 |
DEFAULT_CONFIG_NAME = "small"
|
49 |
|
50 |
def _info(self):
|
51 |
-
print(os.listdir())
|
52 |
-
_URLS['train']=[os.path.join('data/'+self.config.name,filename) for filename in os.listdir('data/'+self.config.name+"/") if filename.startswith('train') and filename.endswith('.jsonl')]
|
|
|
53 |
|
54 |
|
55 |
features = datasets.Features(
|
@@ -83,7 +84,7 @@ class LDKP3k(datasets.GeneratorBasedBuilder):
|
|
83 |
name=datasets.Split.TRAIN,
|
84 |
# These kwargs will be passed to _generate_examples
|
85 |
gen_kwargs={
|
86 |
-
"filepaths":
|
87 |
"split": "train",
|
88 |
},
|
89 |
),
|
|
|
48 |
DEFAULT_CONFIG_NAME = "small"
|
49 |
|
50 |
def _info(self):
|
51 |
+
#print(os.listdir())
|
52 |
+
#_URLS['train']=[os.path.join('data/'+self.config.name,filename) for filename in os.listdir('data/'+self.config.name+"/") if filename.startswith('train') and filename.endswith('.jsonl')]
|
53 |
+
_URLS['train']="data/"+self.config.name
|
54 |
|
55 |
|
56 |
features = datasets.Features(
|
|
|
84 |
name=datasets.Split.TRAIN,
|
85 |
# These kwargs will be passed to _generate_examples
|
86 |
gen_kwargs={
|
87 |
+
"filepaths": [os.path.join(data['train'],filename) for filename in os.listdir(data['train']) if filename.startswith('train') and filename.endswith('.jsonl')],
|
88 |
"split": "train",
|
89 |
},
|
90 |
),
|