Skip to content
This repository was archived by the owner on Jun 3, 2025. It is now read-only.

Commit b4e0e08

Browse files
KSGulinbfineran
authored andcommitted
Update: datasets update to 18.4 (#595)
1 parent af6aab2 commit b4e0e08

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/sparseml/transformers/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ def _install_transformers_and_deps():
6060
"pip",
6161
"install",
6262
transformers_requirement,
63-
"datasets<1.18.0",
63+
"datasets<=1.18.4",
6464
"sklearn",
6565
"seqeval",
6666
]

src/sparseml/transformers/sparsification/question_answering.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,9 @@ def postprocess_qa_predictions(
299299
start_index >= len(offset_mapping)
300300
or end_index >= len(offset_mapping)
301301
or offset_mapping[start_index] is None
302+
or len(offset_mapping[start_index]) < 2
302303
or offset_mapping[end_index] is None
304+
or len(offset_mapping[end_index]) < 2
303305
):
304306
continue
305307
# Don't consider answers with a length that is either < 0 or >

0 commit comments

Comments
 (0)