Repository navigation
Use protobuf 4 - #24599
Use protobuf 4#24599
Conversation
|
I have checked to make sure |
|
@Narsil mentioned we should keep the old/new version files, and determine which one to use (by the protobuf version numbers?). Let me know more details about this please. |
sgugger
left a comment
There was a problem hiding this comment.
I think we might need to keep the old one in case the user has an older version of protobuf, otherwise the conversion won't work. And then dynamically add either the old protobuf stuff or the new one depending on the version detected.
|
The documentation is not available anymore as the PR was closed or merged. |
|
Will merge once the CI for protobuf 4 a nd protobuf 3 both green. Don't hesitate to leave comments later if any @Narsil 🙏 |
|
Great PR. I hope this doesn't have any unforeseen consequence (I don't know what are the breaking changes between protobuf 3 and 4) |
Yeah, me neither. I just rely on our CI 🤞 |
|
@ydshieh I'm now getting with protobuf=4.23.4 & transformers main when doing |
|
Hi @fxmarty ! Hmm, I remember I got |
|
Hi again
|
|
Hm, there is something wrong and I am looking deeper. |
|
OK, PR #24622 makes this failing. |
|
Comes from #24690. More details: ! pip install protobuf=3.20.3
from transformers import AutoTokenizer
from seqio import SentencePieceVocabulary
TypeError: Couldn't build proto file into descriptor pool!
Invalid proto descriptor for file "sentencepiece_model.proto":
sentencepiece_model.proto: A file with this name is already in the pool. |
|
@fxmarty We are not able to reproduce the situation you have. Could you specify your transformers commit that is installed? Thanks. (The above discussion is another story) |
|
@ydshieh It appears I can't reproduce anymore the issue I had. Must have messed something up in my install that I fixed since then. Maybe the |
|
@ydshieh Oh, actually I have this issue only running in my scripting IDE pyzo, but not in a terminal. The same python env is used so quite weird. |
|
@ArthurZucker @ydshieh How does Specifically, how is generated? If I usedecode() on it python complains that 'utf-8' codec can't decode byte 0x80 in position 43.
|
|
Hi @fxmarty That file is being generated by protobuf compile. I don't have the courage to read it ... When I enable the support to use protobuf v4, I ran the whole CI (non-slow), and no failed test. Could you show us your usage (related to protobuf) that produce some failures - maybe I can help ? |
What does this PR do?
I move forward to generate the new
src/transformers/utils/sentencepiece_model_pb2.pyusing the protocol buffer compiler. No test failure but have a quality check fails. I can probably removed the undefined part_TRAINERSPECwhich doesn't seem used.