No module named 'keras.saving.legacy'
Getting this exception when trying to run the examples from the documentation
Hey @fccoelho , could you share which example you're trying to run?
Hi @fccoelho , TF engineer here! Can you also share the version of TensorFlow and the version of Transformers you're using? We'll try to reproduce the problem here.
Transformers: 4.25.1
tensorflow: 2.11.0
Hi
@fccoelho
- we think this might be an incompatibility with TF 2.11 and that version of Transformers. We've added some patches to enable 2.11 support in Transformers but they haven't been released yet. Can you try installing transformers from main with the following code, and seeing if that resolves the issue? pip install --upgrade git+https://github.com/huggingface/transformers.git
Thanks @Rocketknight1 , I tried again, after installing the version from main, but I am still getting the same Exception.
I tried the same example as we are now in 2024 and still the same error.
Transformers version: 4.28.1
Tensorflow version: 2.16.1