-
Notifications
You must be signed in to change notification settings - Fork 110
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
TF-DF Compatibility with Keras 3? #210
Comments
Yes, we are planning to make TF-DF compatible with Keras 3, but there is no timeline yet, since it might be a non-trivial change. |
Ive been trying and failing to tune hyperameters for tfdf.CartModels in line with the google developer course practice https://developers.google.com/machine-learning/decision-forests/practice but i get a FatalTypeError after the keras_tuner builds the hypermodel as its not a keras.model.Model instance. My guess is that now keras_tuner uses keras 3 (Release v1.4.6), it doesnt recognise these as keras modes? Heres a notebook replicating the issue |
Hi, looks like we have to update this class - thank you for notifying us. Very likely, you only need to add
at the top of the colab (note that I cannot access yours, since it's not shared with the world). |
Thank you for the quick reply, , ive updated access to the notebook, with that potential fix unfortunately not working https://colab.research.google.com/drive/183uPNtxGXn7TI8c9CDbrJ3sD0KWr-3ms?usp=sharing |
Fixed with versioning keras_tuner AND setting legacy env variable. Il share this feedback this the course. Im not really familiar with keras, but maybe the backward compatibility introduced here doesn't get the right backend? im not quite sure where to open a bug report, is a keras_tuner or tfdf issue?
|
Sorry to hear about your issue. Let me explain the situation and the available solutions. I hope this helps. Keras in TF Keras 3 is a rewrite from scratch of Keras 2. The previous version of Keras, previously called There are two ways to force TensorFlow to use Keras 2:
TF-DF with Keras TensorFlow Decision Forests is, at the moment, only compatible with Keras 2 i.e. TF-DF is not compatible with Keras 3.
YDF While we make TF-DF compatible with Keras 3, you can use the YDF library. The TF-DF and YDF APIs relatively similar. A few functions have changed names. You can learn about those difference here: https://ydf.readthedocs.io/en/latest/tutorial/migrating_to_ydf/ Tuner YDF contains a specialized tuner which will be faster than Keras Tuner when using decision forests. See: https://ydf.readthedocs.io/en/latest/tutorial/tuning/ Class The decision forest practice class is currently being updated to use YDF. |
According to the known issues, "TF-DF is not compatible with Keras 3 at this time." Are efforts underway to update TF-DF to be compatible with Keras 3?
The text was updated successfully, but these errors were encountered: