change to glob
Browse files- ChessBot-Dataset.py +3 -5
ChessBot-Dataset.py
CHANGED
@@ -18,19 +18,17 @@ class ChessPGNDataset(GeneratorBasedBuilder):
|
|
18 |
)
|
19 |
|
20 |
def _split_generators(self, dl_manager):
|
21 |
-
import
|
22 |
# data_dir is the root of your dataset repo
|
23 |
data_dir = self.config.data_dir
|
24 |
return [
|
25 |
SplitGenerator(
|
26 |
name=Split.TRAIN,
|
27 |
-
gen_kwargs={"shards":
|
28 |
-
# gen_kwargs={"shards": glob.glob(os.path.join(data_dir,"train","*.pgn"))}
|
29 |
),
|
30 |
SplitGenerator(
|
31 |
name=Split.TEST,
|
32 |
-
gen_kwargs={"shards":
|
33 |
-
# gen_kwargs={"shards": glob.glob(os.path.join(data_dir,"test","*.pgn"))}
|
34 |
),
|
35 |
]
|
36 |
|
|
|
18 |
)
|
19 |
|
20 |
def _split_generators(self, dl_manager):
|
21 |
+
import glob
|
22 |
# data_dir is the root of your dataset repo
|
23 |
data_dir = self.config.data_dir
|
24 |
return [
|
25 |
SplitGenerator(
|
26 |
name=Split.TRAIN,
|
27 |
+
gen_kwargs={"shards": glob.glob(os.path.join(data_dir,"train","*.pgn"))}
|
|
|
28 |
),
|
29 |
SplitGenerator(
|
30 |
name=Split.TEST,
|
31 |
+
gen_kwargs={"shards": glob.glob(os.path.join(data_dir,"test","*.pgn"))}
|
|
|
32 |
),
|
33 |
]
|
34 |
|