keras-team / keras

Deep Learning for humans
http://keras.io/
Apache License 2.0
61.97k stars 19.46k forks source link

scikit-learn wrappers in keras #20399

Open adrinjalali opened 1 week ago

adrinjalali commented 1 week ago

tf.keras.wrappers used to have scikit-learn wrappers, which were then deprecated and https://github.com/adriangb/scikeras was born at the same time.

However, scikeras doesn't seem to be maintained much at the moment (https://github.com/adriangb/scikeras/issues/329), and keras has left TF namespace in the meantime. I was wondering if you'd consider adding those wrappers back. I'd be happy to help (as a scikit-learn maintainer) if y'all decide to add them again.

I couldn't find this discussion in the repo, sorry if I've missed it.

fchollet commented 6 days ago

Thanks for the suggestion! I think these wrappers do provide value to the community.

I'd be happy to help (as a scikit-learn maintainer) if y'all decide to add them again.

Maybe you could take over the scikeras repo / package if the initial author is ok with that? I still think this functionality works better as a 3rd party package. But also open to have it in core Keras if there's a good reason for that.

adrinjalali commented 6 days ago

It seems a major part of the work on the scikeras part has been to keep it up-to-date with the latest keras versions, and seems challenging to support multiple versions of keras at the same time. One can of course lock the versions against keras versions, but it seems an easier thing to maintain if it were inside the keras repo and released together. This way whatever code in the wrapper, needs to support only a single version of keras since they're packaged together; so that's something to consider.

fchollet commented 5 days ago

Ok, that's a good argument. If you'd like to open a PR, we'll review it.

adrinjalali commented 4 days ago

Cool. Will work on a PR then. Thanks 🙏🏼