-
Notifications
You must be signed in to change notification settings - Fork 246
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
Simplify running KerasNLP with Keras 3 #1308
Simplify running KerasNLP with Keras 3 #1308
Conversation
/gcbrun |
_USE_KERAS_3 = detect_if_tensorflow_uses_keras_3() | ||
if _USE_KERAS_3: | ||
_MULTI_BACKEND = True | ||
if not _USE_KERAS_3: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is totally optional. We don't need to have it, but since we used to switch to keras core if KERAS_BACKEND
was set, this seems like a useful signpost.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is good to have IMO!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thank you
_USE_KERAS_3 = detect_if_tensorflow_uses_keras_3() | ||
if _USE_KERAS_3: | ||
_MULTI_BACKEND = True | ||
if not _USE_KERAS_3: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is good to have IMO!
raise ValueError( | ||
"Lora only works with multi-backend Keras 3. Please set the " | ||
"`KERAS_BACKEND` environment variable to use this API." | ||
"Lora requires with Keras 3, and Keras 2 is installed. Please " |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
requires Keras 3, but
3cce43b
to
7e4c66e
Compare
We should not land this until Keras 3, TensorFlow 2.15, and keras-nlp-nightly are released.
7e4c66e
to
e214d43
Compare
/gcbrun |
* Simplify running KerasNLP with Keras 3 We should not land this until Keras 3, TensorFlow 2.15, and keras-nlp-nightly are released. * Address comments * Tweaks * Add link * fix link
* Simplify running KerasNLP with Keras 3 We should not land this until Keras 3, TensorFlow 2.15, and keras-nlp-nightly are released. * Address comments * Tweaks * Add link * fix link
* Simplify running KerasNLP with Keras 3 We should not land this until Keras 3, TensorFlow 2.15, and keras-nlp-nightly are released. * Address comments * Tweaks * Add link * fix link
We should not land this until Keras 3 and TensorFlow 2.15 are released.
This deprecates any public use of
keras_core
,keras_core
becomes an internal shim solely to backportskeras.ops
to Keras 2. This updates our installation instructions for the Keras 3 world.