Update ldkp3k.py
Browse files
ldkp3k.py
CHANGED
@@ -50,8 +50,9 @@ class LDKP3k(datasets.GeneratorBasedBuilder):
|
|
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(
|
57 |
{
|
@@ -85,7 +86,7 @@ class LDKP3k(datasets.GeneratorBasedBuilder):
|
|
85 |
name=datasets.Split.TRAIN,
|
86 |
# These kwargs will be passed to _generate_examples
|
87 |
gen_kwargs={
|
88 |
-
"filepaths": [
|
89 |
"split": "train",
|
90 |
},
|
91 |
),
|
|
|
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+"/train.jsonl"]
|
54 |
+
if self.config.name =='large':
|
55 |
+
_URLS['train']+= ["data/"+self.config.name+"/train_"+str(x)+".jsonl" for x in range(1,5)]
|
56 |
|
57 |
features = datasets.Features(
|
58 |
{
|
|
|
86 |
name=datasets.Split.TRAIN,
|
87 |
# These kwargs will be passed to _generate_examples
|
88 |
gen_kwargs={
|
89 |
+
"filepaths": data_dir['train'],
|
90 |
"split": "train",
|
91 |
},
|
92 |
),
|