Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Keras 3, but this is not yet supported #16

Closed
csmsm opened this issue May 16, 2024 · 5 comments · Fixed by #17
Closed

Keras 3, but this is not yet supported #16

csmsm opened this issue May 16, 2024 · 5 comments · Fixed by #17
Assignees
Labels
bug Something isn't working

Comments

@csmsm
Copy link

csmsm commented May 16, 2024

HI, I am running zero-shot with DistilRoBERTa and using "transformer_scores." But got the error message as follows:

"_impl(callable, call_args$unnamed, call_args$named) :
RuntimeError: Failed to import transformers.models.roberta.modeling_tf_roberta because of the following error (look up to see its traceback):
Your currently installed version of Keras is Keras 3, but this is not yet supported in Transformers. Please install the backwards-compatible tf-keras package with pip install tf-keras.
Run reticulate::py_last_error() for details."

Please advise and many thanks.

@atomashevic atomashevic self-assigned this May 18, 2024
@atomashevic atomashevic added the bug Something isn't working label May 18, 2024
@atomashevic
Copy link
Owner

Hi, thanks for opening this issue! This is a common new bug which is a result of mismatch between Keras and transformers. I will fix this is a few days (probably tomorrow) with new version of package first on github and then on CRAN.

I will post the instructions on how to avoid getting this error by installing new version.

@csmsm
Copy link
Author

csmsm commented May 18, 2024 via email

@atomashevic
Copy link
Owner

The new version is on GitHub, not yet on CRAN. To avoid any issues with the librariess I would suggest the following steps:

# remove minconda
reticulate::miniconda_uninstall()

# remove transforEmotion
remove.packages("transforEmotion")

# install from github
devtools::install_github("atomashevic/transforEmotion")

# load tE and setup miniconda
library(transforEmotion)

setup_miniconda()

After this, you should be good to go. Let me know if this solves your issue, so I can close it.

@atomashevic atomashevic reopened this May 18, 2024
@csmsm
Copy link
Author

csmsm commented May 20, 2024 via email

@atomashevic
Copy link
Owner

We are aligning all library versions according to what transformers need to do their job, because it's our main dependency. We will monitor future updates and adjust all versions accordingly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
2 participants