-
Notifications
You must be signed in to change notification settings - Fork 328
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
Keras 3 compatibility #2170
Keras 3 compatibility #2170
Conversation
* Keras3 tests (#2152) * Update requirements for Keras 3 * Update Requirements * Update Requirements * Add randint for keras3 compatibility * remove force generator * fix few tests * fix tests * fix more tests * Update actions.yml * Tf generator changes (#2162) * Keras3 tests (#2152) * Update requirements for Keras 3 * Update Requirements * Update Requirements * Add randint for keras3 compatibility * remove force generator * fix few tests * fix tests * fix more tests * Revert "Replace `RandomGenerator` with `SeedGenerator` (#2150)" (#2161) This reverts commit 365a675. * Update actions.yml --------- Co-authored-by: Ramesh Sampath <1437573+sampathweb@users.noreply.github.com> * updates to rescaling * fix import * code reformat * namescope * update name_scope * correct ops.random * update base aug layer * code reformat * skip rand_augment test * disable random shear test * skip test * update import * fix format and base layer * ads smart resize * undo last commit * smart_resize update * update imports * correct shameful spelling mistake * update resizing * update resizing * update imports * disable ragged tensor test * skip tests * change back translation and zoom test * revert test changes * update * skip repeated augmentation tests * disable random shear test * code reformat * remove legacy_seed * code reformat * revert updates to tests * update tests * fix mock test --------- Co-authored-by: Ramesh Sampath <1437573+sampathweb@users.noreply.github.com>
/gcbrun |
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.
Looks good! Don't have great visibility into what layers we need to disable for Keras 3 temporarily. But code overall looks clean!
from keras_cv.layers import preprocessing_3d | ||
from keras_cv.layers.preprocessing_3d import base_augmentation_layer_3d | ||
from keras_cv.tests.test_case import TestCase | ||
|
||
POINT_CLOUDS = base_augmentation_layer_3d.POINT_CLOUDS | ||
BOUNDING_BOXES = base_augmentation_layer_3d.BOUNDING_BOXES | ||
if not 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.
is there a reason we can't just do this with the pytest annotation like elsewhere?
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.
The TEST_CONDITIONS list would also need to be moved inside the tests since those layers are also not compatible with Keras 3. So left it as-is for now. We can update it once we make them keras 3 compatible.
/gcbrun |
* Tf generator changes (keras-team#2168) * Keras3 tests (keras-team#2152) * Update requirements for Keras 3 * Update Requirements * Update Requirements * Add randint for keras3 compatibility * remove force generator * fix few tests * fix tests * fix more tests * Update actions.yml * Tf generator changes (keras-team#2162) * Keras3 tests (keras-team#2152) * Update requirements for Keras 3 * Update Requirements * Update Requirements * Add randint for keras3 compatibility * remove force generator * fix few tests * fix tests * fix more tests * Revert "Replace `RandomGenerator` with `SeedGenerator` (keras-team#2150)" (keras-team#2161) This reverts commit 365a675. * Update actions.yml --------- Co-authored-by: Ramesh Sampath <1437573+sampathweb@users.noreply.github.com> * updates to rescaling * fix import * code reformat * namescope * update name_scope * correct ops.random * update base aug layer * code reformat * skip rand_augment test * disable random shear test * skip test * update import * fix format and base layer * ads smart resize * undo last commit * smart_resize update * update imports * correct shameful spelling mistake * update resizing * update resizing * update imports * disable ragged tensor test * skip tests * change back translation and zoom test * revert test changes * update * skip repeated augmentation tests * disable random shear test * code reformat * remove legacy_seed * code reformat * revert updates to tests * update tests * fix mock test --------- Co-authored-by: Ramesh Sampath <1437573+sampathweb@users.noreply.github.com> * Skip keras 3 incompatible layers (keras-team#2169) * Update requirements.txt * disable flaky test * code reformat * fixes tests on coco metric and serialization * code reformat * Skip test on RandAugment * Skip test on RandAugment --------- Co-authored-by: Ramesh Sampath <1437573+sampathweb@users.noreply.github.com>
Uses tf.random.Generator instead of keras.backend.RandomGenerator
removed legacy_make_seed
Tests disabled - #2167
all 3d preprocessing tests - has legacy baserandomlayer
rand_augment_test - need to investigate
random_shear_test - need to investigate
repeated_augmentation_test - need to investigate
resizing_test - has ragged tensor tests and is failing on jax and torch
SqueezeAndExcite2D - serialization test