Fix the error message in run_t5_mlm_flax.py (#19282)

This commit is contained in:
Kaiyu Yang 2022-10-10 06:51:11 -07:00 committed by GitHub
parent e3f028f3af
commit e150c4e2fe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -349,7 +349,7 @@ class FlaxDataCollatorForT5MLM:
if batch["input_ids"].shape[-1] != self.input_length:
raise ValueError(
f"`input_ids` are incorrectly preprocessed. `input_ids` length is {batch['input_ids'].shape[-1]}, but"
f" should be {self.target_length}."
f" should be {self.input_length}."
)
if batch["labels"].shape[-1] != self.target_length: