Just to give additional context, I was attempting to create a BART pipeline when it failed, I believe the some of the relevant lines of code that led to this error are: https://github.com/huggingface/transformers/blob/41925e42135257361b7f02aa20e3bbdab3f7b923/src/transformers/modeling_tf_utils.py#L91-L103
And yes, setting the TF_USE_LEGACY_KERAS environment variable did not work, for me, at least. The environment variable and the try: import tf_keras
bits seem to try to fix the same problem but in two different ways, I'll try to go to upstream and try to figure the approach out.
Pinned Comments
daskol commented on 2025-04-07 08:09 (UTC) (edited on 2025-04-07 08:09 (UTC) by daskol)
NOTE The next v4.51.0 requires
xet-core
(transitive throughpython-huggingface-hub>=1:0.30.0
). It is now under testing in extra-testing.