Skip to content
Snippets Groups Projects
Commit 4426a3d4 authored by Hsien-Chin Lin's avatar Hsien-Chin Lin
Browse files

fix decode bug because new huggingface version

parent 51def061
No related branches found
No related tags found
No related merge requests found
......@@ -201,6 +201,7 @@ def compute_metrics(eval_preds):
preds, labels = eval_preds
if isinstance(preds, tuple):
preds = preds[0]
preds = np.where(preds != -100, preds, TOKENIZER.pad_token_id)
decoded_preds = TOKENIZER.batch_decode(
preds, skip_special_tokens=True, max_length=400)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment