keras-team / keras

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

scikit-learn wrappers in keras #20399

Open adrinjalali opened 1 month ago

adrinjalali commented 1 month 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 4 weeks 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 4 weeks 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 3 weeks ago

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

adrinjalali commented 3 weeks ago

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

adriangb commented 2 weeks ago

Thanks folks.

François I appreciate your help maintaining SciKeras over the years, it had a great impact on my career to be able to work with kind, knowledgable folks such as yourself.

Unfortunately I have not used Keras or SciKeras in at my day job in years (I'm more on the data engineering side now) so I agree someone else taking over the project or it being moved back into Keras would be best. I think the latter is the better move, if it can be done.