joelniklaus commited on
Commit
1947019
1 Parent(s): 9707291

added more information in case of failure

Browse files
Files changed (1) hide show
  1. Multi_Legal_Pile.py +4 -6
Multi_Legal_Pile.py CHANGED
@@ -166,7 +166,7 @@ _PILE_OF_LAW_NAMES = {
166
  "validation": ["validation.constitutions"]
167
  },
168
  },
169
- "other": { # analyses
170
  "oig": {
171
  "train": ["train.oig"],
172
  "validation": ["validation.oig"]
@@ -178,12 +178,9 @@ _PILE_OF_LAW_NAMES = {
178
  },
179
  }
180
 
181
-
182
-
183
  _LANGUAGES = ["bg", "cs", "da", "de", "el", "en", "es", "et", "fi", "fr", "ga", "hr",
184
  "hu", "it", "lt", "lv", "mt", "nl", "pl", "pt", "ro", "sk", "sl", "sv"]
185
 
186
-
187
  _TYPES = ["caselaw", "contracts", "legislation", "other"]
188
 
189
  _JURISDICTONS = ["Austria", "Belgium", "Bulgaria", "Croatia", "Czechia", "Denmark", "Estonia", "Finland",
@@ -313,5 +310,6 @@ class MultiLegalPile(datasets.GeneratorBasedBuilder):
313
  "text": example.get("text", ""),
314
  }
315
  id_ += 1
316
- except:
317
- print("Error reading file:", data_info["filepath"])
 
 
166
  "validation": ["validation.constitutions"]
167
  },
168
  },
169
+ "other": { # analyses
170
  "oig": {
171
  "train": ["train.oig"],
172
  "validation": ["validation.oig"]
 
178
  },
179
  }
180
 
 
 
181
  _LANGUAGES = ["bg", "cs", "da", "de", "el", "en", "es", "et", "fi", "fr", "ga", "hr",
182
  "hu", "it", "lt", "lv", "mt", "nl", "pl", "pt", "ro", "sk", "sl", "sv"]
183
 
 
184
  _TYPES = ["caselaw", "contracts", "legislation", "other"]
185
 
186
  _JURISDICTONS = ["Austria", "Belgium", "Bulgaria", "Croatia", "Czechia", "Denmark", "Estonia", "Finland",
 
310
  "text": example.get("text", ""),
311
  }
312
  id_ += 1
313
+ except Exception as e:
314
+ logger.error("Error while processing file %s", data_info["filepath"])
315
+ logger.error(e)