Skip to content

Commit

Permalink
[QuestionAnswering] catch extra exception for retry in custom file lo…
Browse files Browse the repository at this point in the history
…ading (#1669)
  • Loading branch information
bfineran authored Jul 13, 2023
1 parent 6d836ed commit a0fcc1f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/sparseml/transformers/question_answering.py
Original file line number Diff line number Diff line change
Expand Up @@ -922,7 +922,7 @@ def _get_raw_dataset(data_args, cache_dir: Optional[str] = None):
field="data",
cache_dir=cache_dir,
)
except json.JSONDecodeError:
except (json.JSONDecodeError, datasets.builder.DatasetGenerationError):
# run without `field="data"` - JSONL files will not always have each
# line nested under a top level field
raw_datasets = load_dataset(
Expand Down

0 comments on commit a0fcc1f

Please sign in to comment.