Closed LoveMeWithoutAll closed 3 years ago
Hello!
Thanks for reporting this, we will apply a fix for the next release!
@LoveMeWithoutAll thanks for issue!
Could you specific your use case here a bit? Do you want to convert a PyTorch model to a tensorflow model and consequently train the tensorflow model? Why do we need to forward ndarray
types?
@patrickvonplaten Hello
I'm using Rasa framework that embedding HuggingFace. Rasa is not yet support Pytorch model, so I must convert from Pytorch to TF model for using pre-trained model. Then ndarray
is needed for convert model.
@LoveMeWithoutAll Hi, I am also using the Rasa framework with HFTransformers and Language Models in pipeline config. Faced the same issue with the latest transformers, but it works with lower versions, transformers-2.9.0. I haven't tested out on other versions (probably some 3.x might work too!), but 2.9.0 shall work fine if your project setup allows lower version transformers.
@LoveMeWithoutAll Hi, I am also using the Rasa framework with HFTransformers and Language Models in pipeline config. Faced the same issue with the latest transformers, but it works with lower versions, transformers-2.9.0. I haven't tested out on other versions (probably some 3.x might work too!), but 2.9.0 shall work fine if your project setup allows lower version transformers.
thank you for your advice! i'll try it as you did
This was fixed on master
: https://github.com/huggingface/transformers/pull/9294
We'll release a new version tomorrow, which will benefit from this change. Thanks for reporting it!
Thank you for your effort!
Environment info
transformers
version: 4.1.1Who can help
tensorflow: @jplu
Information
Model I am using (Bert, XLNet ...): Bert
The problem arises when using:
Changed 1 line that
from_pt
's default value fromFalse
toTrue
((https://github.com/huggingface/transformers/blob/ec07da65e25562040581febaf9b400a462962961/src/transformers/modeling_tf_utils.py#L947))The tasks I am working on is:
HuggingFace: monologg/kobert
I loaded my pertained pytorch model, and an error occurred on input_processing function
To reproduce
Steps to reproduce the behavior:
Expected behavior
Train success!