kiddothe2b commited on
Commit
27aa183
·
1 Parent(s): f3af2fc

Update the_legal_pile_preprocessed.py

Browse files
Files changed (1) hide show
  1. the_legal_pile_preprocessed.py +5 -9
the_legal_pile_preprocessed.py CHANGED
@@ -147,12 +147,8 @@ class LegalPile(datasets.GeneratorBasedBuilder):
147
  logger.info("⏳ Generating examples from = %s", filepath)
148
  with xz.open(open(filepath, "rb"), "rt", encoding='utf-8') as f:
149
  for row in f:
150
- try:
151
- data = json.loads(row)
152
- yield id_, {
153
- "text": data["text"]
154
- }
155
- id_ += 1
156
- except:
157
- continue
158
-
 
147
  logger.info("⏳ Generating examples from = %s", filepath)
148
  with xz.open(open(filepath, "rb"), "rt", encoding='utf-8') as f:
149
  for row in f:
150
+ data = json.loads(row)
151
+ yield id_, {
152
+ "text": data["text"]
153
+ }
154
+ id_ += 1