scikit-learn wrappers

29 views
Skip to first unread message

Donatien Hainaut

unread,
Apr 21, 2025, 8:29:51 AMApr 21
to Keras-users
Hi,

the scikit-learn wrappers (keras.wrappers) in tensorflow 2.18 are not compatible anymore with scikit-learn 1.6.1. There are very useful for applying interpretability tools from scikit-learn to keras models. The issue seems to come from the system of tags implemented in the recent version of scikit-learn. The error message is:

AttributeError: 'super' object has no attribute '__sklearn_tags__'

The only solution that I've found is to downgrade scikit-learn to version 1.5.1. Maybe that some of you have found another solution?

Many thanks!

Donatien

 

François Chollet

unread,
Apr 21, 2025, 11:17:05 AMApr 21
to Donatien Hainaut, Keras-users
Do you have a notebook to reproduce this issue?

--
You received this message because you are subscribed to the Google Groups "Keras-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to keras-users...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/keras-users/05d14442-f312-4fce-aadd-8ed13a953e97n%40googlegroups.com.

Hainaut

unread,
Apr 21, 2025, 2:46:17 PMApr 21
to François Chollet, keras...@googlegroups.com
Cc to the group.

Le lun. 21 avr. 2025, 19:54, Hainaut <das.h...@gmail.com> a écrit :
Dear François,

Many thanks for your message. Unfortunately, I do not have a notebook (just a py file). I've done several tests and finally reinstalled Anaconda, installed tensorflow 2.19 and scikit-learn 1.6.1. With these versions, I do not have anymore this bug. Probably a problem of versioning on my pc. Sorry for disturbing.

Kind regards 
Donatien Hainaut 

Rahul Reddy M.L

unread,
Apr 21, 2025, 5:03:36 PMApr 21
to Keras-users
Try upgrading all the dependencies may be they are outdated.
Just check 

Reply all
Reply to author
Forward
0 new messages