Closed ndgnuh closed 2 years ago
I also encountered this error when upgrading Transformers from version 3.5.1 --> 4.12.2. Can confirm @ndgnuh's proposed fix works!
Can this fix be incorporated into the bug fixes?
Nice catch, do you want to open a PR with the fix?
Sorry but I have a potato computer and I'm too lazy for the full PR procedure :smile:
cc @Rocketknight1
This looks like the same issue as #14404, it definitely needs a fix
This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.
Please note that issues that do not follow the contributing guidelines are likely to be ignored.
Environment info
Who can help
Information
I'm sorry for not being able to give more information about this, since I don't directly works with the model. I believe the model is bert-base-multilingual-cased. I'm trying to create a chat bot with Rasa.
To reproduce
Steps to reproduce the behavior: Run the chat bot, either use
rasa shell
orrasa run --enable-api
andcurl
to chat with the bot.Error log:
Line 1831 of
transformers/modeling_tf_utils.py
:After printing out stuff in
transformers/modeling_tf_utils.py
, I found out that sometimetensor
is a numpy array, thereforetensor.shape
is a tuple and indeed doesn't haveas_list
.Proposed fix:
Expected behavior
No error.