lucas-morin commited on
Commit
9908244
·
verified ·
1 Parent(s): beb84ef

Update markushgrapher-datasets.py

Browse files
Files changed (1) hide show
  1. markushgrapher-datasets.py +4 -0
markushgrapher-datasets.py CHANGED
@@ -87,10 +87,14 @@ class MarkushGrapherDataset(GeneratorBasedBuilder):
87
  return splits
88
 
89
  def _generate_examples(self, data_dir):
 
 
 
90
  for root, _, files in os.walk(data_dir):
91
  for fname in files:
92
  if fname.endswith(".arrow"):
93
  fpath = os.path.join(root, fname)
 
94
  dataset = Dataset.from_file(fpath)
95
  for i, row in enumerate(dataset):
96
  yield f"{fpath}_{i}", row
 
87
  return splits
88
 
89
  def _generate_examples(self, data_dir):
90
+ print(f"[DEBUG] LOADING CONFIG: {self.config.name}")
91
+ print(f"[DEBUG] Looking for arrow files under: {data_dir}")
92
+
93
  for root, _, files in os.walk(data_dir):
94
  for fname in files:
95
  if fname.endswith(".arrow"):
96
  fpath = os.path.join(root, fname)
97
+ print(f"[DEBUG] Reading file: {fpath}") # <--- KEY
98
  dataset = Dataset.from_file(fpath)
99
  for i, row in enumerate(dataset):
100
  yield f"{fpath}_{i}", row