Closed wenfeixiang1991 closed 4 years ago
Hi! Indeed, I can reproduce. This seems to be an edge-case we were not testing for in late v2+ versions. It does run correctly on v2.3.0, as you've shown, and on recent versions (v3+) as well.
After looking a bit deeper into it, it seems to have happened because of the introduction of BatchEncoding
, in version v2.9.0. It was later patched in v3.0.0 so the blacklisted versions for using a parallelization mechanism (here the dataloader) with batch_encode_plus
would be the versions between v2.9.0
and v3.0.0
. That would be v2.9.x
, v2.10.x
and v2.11.x
.
Hope this helps, and sorry for the inconvenience.
🐛 Bug
Information
Model I am using (Bert, XLNet ...): Bert
Language I am using the model on (English, Chinese ...): Chinese
The problem arises when using:
The tasks I am working on is:
To reproduce
Steps to reproduce the behavior:
My problem is
return encoded
Error with transformers-2.9.1! but with transformers-2.3.0 was fine! Which way is Right? Very Confused!My code as following:
Expected behavior
Environment info
transformers
version:2.9.1