Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
972 commits
Select commit Hold shift + click to select a range
be1191f
Add random_posterization processing layer (#20688)
shashaka Dec 27, 2024
2b073b6
Fix torch gpu CI (#20696)
james77777778 Dec 28, 2024
6ce93a4
Add random_sharpness processing layer (#20697)
shashaka Dec 29, 2024
3c9fee7
Add random_shear processing layer (#20702)
shashaka Dec 31, 2024
c8c2c6f
Fix the aggregation in the codebase (#20703)
james77777778 Dec 31, 2024
59d3025
Bump the github-actions group with 2 updates (#20707)
dependabot[bot] Jan 2, 2025
476a664
fix: Torch MPS backend failing test (#20709)
kas2020-commits Jan 2, 2025
5b29974
implement transform_bounding_boxes for random_shear (#20704)
shashaka Jan 2, 2025
2c95bfe
Fix torch GPU CI
fchollet Jan 2, 2025
a91d006
Update BackupAndRestore class example (#20714)
mehtamansi29 Jan 2, 2025
41c429e
Update version number
fchollet Jan 3, 2025
94977dd
Refactor `keras/src/export/export_lib` and add `export_onnx` (#20710)
james77777778 Jan 4, 2025
881d8da
Patch `tf2onnx` to ensure compatibility with `numpy>=2.0.0` (#20725)
james77777778 Jan 5, 2025
1adaaec
Add build method to supress warning (#20729)
shashaka Jan 6, 2025
8f04616
Specify window_length dtype requirement in tf.keras.ops.istft in math…
LakshmiKalaKadali Jan 6, 2025
ab3c8f5
Add rand_augment processing layer (#20716)
shashaka Jan 7, 2025
fbf0af7
Fixing batch_dim_name attribute (#20674)
martin-gorner Jan 7, 2025
26e71f5
Add support for `dtype` / `DTypePolicy` to `JaxLayer` and `FlaxLayer`…
hertschuh Jan 7, 2025
f97be63
Allow dynamic shape in `STFTSpectrogram` layer. (#20736)
hertschuh Jan 8, 2025
fd2955f
Remove duplicate export tests in `model_test`. (#20735)
hertschuh Jan 8, 2025
5fcd9b4
Add OpenVINO into README.md (#20739)
rkazants Jan 8, 2025
97c1c00
Multiple Example Title has removed in metrics.MeanIoU method (#20738)
LavanyaKV1234 Jan 8, 2025
3d20616
Fix JAX GPU CI and make formatter happy (#20749)
james77777778 Jan 10, 2025
e67ac8f
Add checks to deserialization. (#20751)
hertschuh Jan 12, 2025
cdbe4fb
feat(ops): Add keras.ops.numpy.rot90 operation (#20723) (#20745)
harshaljanjani Jan 13, 2025
509c92b
Fix code format
fchollet Jan 13, 2025
78dda1c
Fix code format following ruff update
fchollet Jan 13, 2025
8e6cdf2
Fix Torch GPU CI
fchollet Jan 13, 2025
e010829
Update API ref
fchollet Jan 13, 2025
7d4b7bb
Fix flaky `JaxLayer` test. (#20756)
hertschuh Jan 13, 2025
bb340d6
Fix serialization of domain packages. (#20755)
hertschuh Jan 13, 2025
f70fd8a
Preliminary parts needed for ragged support, including densification.…
hertschuh Jan 14, 2025
57c94f3
Disallow pickle loading in npz files
fchollet Jan 14, 2025
e37ee79
Implemented more generic asset tracking mechanism in saved model expo…
hertschuh Jan 15, 2025
617b821
[Keras Ops] Add einops-style `rearrange()` to `keras.ops` (#20733)
DavidLandup0 Jan 15, 2025
e345cbd
Remove all type annotations for consistency. (#20762)
hertschuh Jan 15, 2025
6557961
Porting TF fake_quant_with_min_max functions (#20641)
doncarlos999 Jan 15, 2025
0454f06
Add aug_mix processing layer (#20759)
shashaka Jan 15, 2025
25d6d80
`JaxLayer` now uses the global dtype policy by default. (#20767)
hertschuh Jan 16, 2025
5ca3d3a
fix(ops): Fix issue with map_coordinates for uint8 dtype (#20768)
harshaljanjani Jan 17, 2025
dca9e61
Multiple Example Title has been removed in metrics.BinaryIoU (#20775)
sonali-kumari1 Jan 17, 2025
69d7eff
fix(ops): Fix inconsistent padding calculation in PyTorch backend ops…
harshaljanjani Jan 17, 2025
6c9dfca
Improve `fake_quant_with_min_max_vars` (#20772)
james77777778 Jan 17, 2025
a25881c
Fix memory leaks in `model.evaluate`. (#20779)
hertschuh Jan 17, 2025
35f76b8
fix(applications): Improve validation and error handling for ConvNeXt…
harshaljanjani Jan 20, 2025
70125d4
fix ciou implementation bug (#20784)
Surya2k1 Jan 20, 2025
e0464a9
Add cut_mix processing layer (#20776)
shashaka Jan 21, 2025
5df8fb9
Add random_invert layer (#20787)
shashaka Jan 21, 2025
90568da
fix(metrics): Fix BinaryAccuracy metric to handle boolean inputs (#20…
harshaljanjani Jan 22, 2025
592c118
Fix issue with Masking layer with Tensor as `mask_value` (#20791)
Surya2k1 Jan 23, 2025
6097d53
Fix reference to nonexistent namespace (#20810)
jurca Jan 24, 2025
8d292da
extract metrics update logic into a helper method (#20805)
zskendall Jan 24, 2025
d7d2e43
Turn the attribute `_return_attention_scores` into an argument (#20803)
apehex Jan 24, 2025
3de2270
Add random_erasing layer (#20798)
shashaka Jan 24, 2025
d0b27d0
fix torch backend resize with `pad_to_aspectio_ratio` is set to `True…
sineeli Jan 25, 2025
71ad1d9
Update fill_mode argument default value in RandomZoom class (#20796)
mehtamansi29 Jan 25, 2025
aee7dce
fix(ops): Handle floating-point edge cases in ops.argmax() (#20808)
harshaljanjani Jan 25, 2025
734cd03
fix(ops): Fix ops.argmin() handling of subnormal float values in Kera…
harshaljanjani Jan 26, 2025
3e52ce9
Add random_gaussian_blur layer (#20817)
shashaka Jan 27, 2025
871ad7a
fix(layers): Fix incorrect masked mean/variance in BatchNormalization…
harshaljanjani Jan 28, 2025
9c8da1f
Update SECURITY.md
fchollet Jan 28, 2025
14d9256
Fix for deserializing custom functions serialized with Keras <= 3.6. …
hertschuh Jan 29, 2025
79a74a1
Fix jax version (#20827)
divyashreepathihalli Jan 30, 2025
af0c2d2
Fix CI breakage with torch-xla. (#20828)
hertschuh Jan 30, 2025
738c313
Add `signbit` and fix `argmin` and `argmax` (#20821)
james77777778 Jan 30, 2025
295fdcc
Pin version of torch-xla to 2.5.1. (#20834)
hertschuh Jan 31, 2025
fc1b26d
fix(trainers): Add support for DistributedDatasetsFromFunction in dat…
harshaljanjani Jan 31, 2025
81cc595
Bump the github-actions group with 2 updates (#20840)
dependabot[bot] Feb 1, 2025
06fb0ae
update random_erasing factor description. (#20837)
shashaka Feb 1, 2025
00aeab3
[OpenVINO backend] Provide more granular tests exclusion mechanism (#…
rkazants Feb 2, 2025
b0fc0a3
Use Python 3.10 for testing environment (#20846)
james77777778 Feb 3, 2025
2638115
Update requirements-jax-cuda.txt (#20852)
divyashreepathihalli Feb 4, 2025
3b0d4de
Don't duplicate frozen parameters during predict() (#20851)
mattdangerw Feb 4, 2025
c5c2768
provided y_true or y_pred add labels for plot image gallery method (#…
sineeli Feb 4, 2025
c49f487
Fix convnext to work with any custom input tensors (#20854)
Inquisitive-ME Feb 5, 2025
e106d23
Prevent information leakage and improve the ONNX export for the torch…
james77777778 Feb 5, 2025
4447add
Add Rematerialization to Keras (#20743)
divyashreepathihalli Feb 5, 2025
93b393f
Add random_perspective layer (#20836)
shashaka Feb 5, 2025
c04cf9d
Clear JAX state sharding after `fit`, `evaluate` and `predict`. (#20865)
hertschuh Feb 6, 2025
43f40d8
add backticks to docstring string code keywords (#20863)
divyashreepathihalli Feb 6, 2025
3906e32
fix(layers): Update Conv2D docstring to clarify numerical precision a…
harshaljanjani Feb 6, 2025
b2d5b88
Remove `torchvision` dep and simplify `resize` and `rgb_to_grayscale`…
james77777778 Feb 7, 2025
cc46776
fix time_distributed layer with mask and partial_batch_size (#20765)
Surya2k1 Feb 7, 2025
084ac36
Fix Torch GPU CI (#20877)
james77777778 Feb 8, 2025
b9a49ea
fix solve method on linalg (#20879)
shashaka Feb 8, 2025
a41827d
[OpenVINO backend] Support numpy.amax and numpy.amin (#20883)
rkazants Feb 9, 2025
04ca9c8
`HashedCrossing` layer preserves the static batch size when known. (#…
hertschuh Feb 10, 2025
b5261a0
`TextVectorization` with `output_sequence_length` returns outputs wit…
hertschuh Feb 11, 2025
6b4a4df
fix(ops): Fix TensorFlow backend keras.ops.rot90 shape transformation…
harshaljanjani Feb 14, 2025
d7bb2f3
fix ifft2 op with TF backend (#20905)
Surya2k1 Feb 14, 2025
4ad808d
docs: add params to Sequential.pop docstring (#20896)
nikolasavic3 Feb 14, 2025
e739db3
Always allow `ExportArchive.track` to track TensorFlow resources. (#2…
hertschuh Feb 15, 2025
ecf5760
Add iterations property to LossScaleOptimizer (#20901)
jeffcarp Feb 15, 2025
e045b6a
Fix cloning with compiled sequential model (#20888)
Surya2k1 Feb 16, 2025
86873b5
Add perspective_transform for ops (#20899)
shashaka Feb 17, 2025
da07901
Update random_perspective to use ops.perspective_transform (#20915)
shashaka Feb 17, 2025
996bc9d
Only load OpenVINO excludes file when backend is "openvino". (#20923)
hertschuh Feb 18, 2025
7670305
Fix `masking_test.py` saving a file in the current folder. (#20924)
hertschuh Feb 18, 2025
39e39cd
Recognize placer as a remote location (#20926)
ibraaaa Feb 19, 2025
a4b0f64
[OpenVINO backend] Support arctan2. (#29010) (#20921)
AsVoider Feb 19, 2025
259e20b
[OpenVINO Backend] Include NumpyDtype tests (#20929)
rkazants Feb 20, 2025
00a8e07
Remove unused dependency (#20932)
abheesht17 Feb 20, 2025
1eee113
Fix failing jax remat test (#20935)
divyashreepathihalli Feb 20, 2025
12a41b1
[Keras Ops] Add `keras.ops.polar` operation (#20930)
DavidLandup0 Feb 22, 2025
7146c57
merge conflicts (#20934)
Mohamed-Ashraf273 Feb 24, 2025
c03ae35
[Openvino Backend] support arange, modify dtype check (#20941)
AsVoider Feb 24, 2025
1510e70
Fix mean metrics to allow non-tensor inputs (#20954)
abheesht17 Feb 24, 2025
31047f6
Fix tril/triu ops (#20900)
abheesht17 Feb 24, 2025
44dfa9f
Fix `BinaryAccuracy` to handle boolean inputs. (#20956)
hertschuh Feb 25, 2025
4197645
Add gaussian_blur for image (#20943)
shashaka Feb 25, 2025
6c3dd68
[OpenVINO backend] Support arctan2, pass the NumpyDtypeTest::arctan2 …
AsVoider Feb 25, 2025
da10cf3
Fix JAX CPU tests - saved_model_export.py (#20962)
hertschuh Feb 26, 2025
d1fb581
Update the RandomGaussianBlur layer to utilize the image layer method…
shashaka Feb 26, 2025
86dce6f
Add `antialias` to `layers.Resizing` and add more tests. (#20972)
james77777778 Feb 27, 2025
7efaff8
fix legacy model saving & reloading with axis argument in its layer (…
Surya2k1 Feb 28, 2025
21c8997
Make gaussian_blur to use scipy convolve2d (#20974)
shashaka Feb 28, 2025
0902ff4
[OpenVino BackEnd]support np.count_nonzero for ov BackEnd (#20945)
Mohamed-Ashraf273 Feb 28, 2025
c356cae
Bump the github-actions group with 3 updates (#20975)
dependabot[bot] Mar 1, 2025
7a7bca6
[OpenVINO backend] Support numpy.append (#20951)
kuanxian1 Mar 3, 2025
f7115c2
Fix PyTorch stateful RNN/LSTM gradient computation error resolves #20…
praveenhosdrug123 Mar 3, 2025
ff427e5
[Keras Ops and Layer] Add keras.ops.rms_norm() and keras.layers.RMSNo…
DavidLandup0 Mar 3, 2025
2688bfc
Fix docstring
fchollet Mar 3, 2025
465a3d2
Update version number
fchollet Mar 3, 2025
19b1418
Enable cuDNN RNNs when dropout is set and `training=True` (#20983)
miticollo Mar 4, 2025
eb1f844
Fix `Discretization` serialization when `num_bins` is used. (#20971)
hertschuh Mar 4, 2025
335d317
Add access to native mesh and layout distribution objects. (#20897)
hertschuh Mar 5, 2025
b36a9ac
Don't require jax on the numpy backend (#20989)
mattdangerw Mar 6, 2025
a8ccaf3
Fixes inconsistent serialization logic for inputs (#20993)
JyotinderSingh Mar 6, 2025
63038a4
Fix flash attention TPU error (#20994)
divyashreepathihalli Mar 6, 2025
2599816
Add optional arg for attention logits soft cap for jax tpu backend (#…
divyashreepathihalli Mar 7, 2025
0fac3ab
remove jax dependency from numpy image layer (#21000)
shashaka Mar 7, 2025
2ebe3d6
Wrap tf variables in keras variables for TFSMLayer (#20995)
mattdangerw Mar 8, 2025
d8d14fd
[OpenVINO Backend] Support numpy exp and expand_dims (#21006)
rkazants Mar 8, 2025
b4e262d
[Good First Issue][Keras 3 OpenVINO Backend]: Support numpy.dot opera…
SaifMohammed22 Mar 8, 2025
9afea73
Add elastic_transform processing for image.py (#20977)
shashaka Mar 8, 2025
8bf5b14
Ensures that the layer is marked as built when the `build` is not ove…
james77777778 Mar 8, 2025
d42143d
Fix typos and add a test case for elastic_transform (#21007)
shashaka Mar 9, 2025
538ee7b
[OpenVINO backend]: Support numpy.bincount (#20940)
11happy Mar 9, 2025
3820c0f
Fix torch CI
fchollet Mar 10, 2025
37e2177
[OpenVINO backend] Support numpy.argsort (#20913)
nikolasavic3 Mar 11, 2025
c877b89
Fix incorrect argument in JAX flash attention. (#21014)
hertschuh Mar 11, 2025
5a48a31
Restore variables on `fit()` interrupt with Jax backend (#21019)
t-kalinowski Mar 12, 2025
df2fc37
[OpenVINO backend] Support numpy.full_like (#21008)
jpy794 Mar 12, 2025
66cc6d5
[OpenVino BackEnd] support np.diff for ov BackEnd (#20950)
chiruu12 Mar 13, 2025
decd6ba
[OpenVINO backend] Support numpy.empty (#21010)
arkhamHack Mar 13, 2025
d7c5d42
Add RandomElasticTransform layer (#21018)
shashaka Mar 14, 2025
8a7955f
Make `import_test.py` debuggable from console output. (#21033)
hertschuh Mar 14, 2025
04ebf72
Make code compatible with Numpy >= 2.1. (#21032)
hertschuh Mar 14, 2025
b539552
Fix bitwise `left_shift` and `right_shift` result dtype... (#21034)
hertschuh Mar 15, 2025
492fe28
[OpenVINO Backend] Get back tests for exp and expand_dims to precommi…
rkazants Mar 15, 2025
6e688ab
[Documentation] Updated Binary Focal Crossentropy Loss Docstring (#21…
samitshah1 Mar 15, 2025
dac30fa
Fix optree regsitration (#21049)
mattdangerw Mar 17, 2025
1ba2012
Lion typo fix (#21056)
nathanrooy Mar 17, 2025
33d97b0
Add support for torch tensors on meta device (#21053)
rfezzani Mar 18, 2025
624c00b
feat: add Categorical Generalized Cross Entropy (GCE) loss (#21024)
edge7 Mar 18, 2025
56fb8bb
Fix torch gpu tests. (#21063)
james77777778 Mar 19, 2025
d865f5f
Introduce weights sharding (#21022)
james77777778 Mar 19, 2025
7c3278f
Improve `H5IOStore`. (#21067)
james77777778 Mar 19, 2025
b0a3080
[Documentation] Added Dice Loss Function Example to Docstring (#21064)
samitshah1 Mar 19, 2025
4aae578
Allow synchronization value to be set on Variables (#21072)
drasmuss Mar 20, 2025
717a64a
implement of muon optimizer (#21037)
pass-lin Mar 20, 2025
af3d207
Docstring fixes for Muon optimizer.
fchollet Mar 20, 2025
168f253
Add pre-commit hooks (#21074)
abheesht17 Mar 20, 2025
0cfd2aa
Use tf.int32.min rather than relying on integer overflow (#21077)
wilsbj Mar 20, 2025
9fea22a
Fix warning for random_saturation (#21066)
shashaka Mar 21, 2025
3da0abd
Special handling of Torch DDP in callback (#21081)
timsweeneyfanelli Mar 22, 2025
895a123
fix muon document (#21079)
pass-lin Mar 23, 2025
a69952e
[OpenVINO backend] Support numpy.log10 (#21042)
darshil929 Mar 24, 2025
4baba1e
Raise error if inputs are not connected with output in functional mod…
Surya2k1 Mar 24, 2025
8333ef4
Fix functional dict inputs to support optional ones (#21030)
neo-alex Mar 24, 2025
f8b893f
[OpenVino BackEnd] support np.log2 for ov BackEnd (#21048)
chiruu12 Mar 26, 2025
9250be2
Fix `Model.export` to Saved Model for models with dict inputs. (#21095)
hertschuh Mar 27, 2025
7deeec5
Fix scatter_update for torch (#21101)
abheesht17 Mar 27, 2025
3f8b065
Refactor ModelCheckpoint Save Logic (#21100)
timsweeneyfanelli Mar 27, 2025
e1c59ff
Add verification to remat tests. (#21102)
hertschuh Mar 27, 2025
7577b3a
Fix Remat error when called with a model (#21094)
divyashreepathihalli Mar 28, 2025
6d26efb
`TrackingTest` no longer assigns None to variables (#21106)
superbobry Mar 28, 2025
e61e83d
#21088: fixes activation layer serialization/deserialization logic (#…
JyotinderSingh Apr 3, 2025
acd6f3c
fixed torch version issue for macOS (#21136)
nithin9000 Apr 4, 2025
7b4367c
Add alpha argument description to elu docstring (#21142)
shashaka Apr 7, 2025
9f3ab34
[OpenVINO backend] Support numpy.expm1 (#21141)
Huanli-Gong Apr 7, 2025
574d36f
Fix Functional model graph under global dtype policy. (#21134)
hertschuh Apr 7, 2025
f3bfe8b
Bump the github-actions group with 2 updates (#21113)
dependabot[bot] Apr 7, 2025
1c4fba9
Update training_with_built_in_methods.py (#21098)
he7d3r Apr 7, 2025
ec47a68
[OpenVINO backend]: Implement numpy.identity (#21083)
11happy Apr 7, 2025
862a379
Enable SparseCategoricalCrossentropy to accept and propagate axis (#2…
edge7 Apr 7, 2025
7ed8edb
Modified Example code in numerical_utils (#21125)
Kayyuri Apr 7, 2025
1c5d9b3
Add configurable lora_alpha parameter for LoRA in multiple Keras laye…
b05505027 Apr 9, 2025
ea84f00
Add OpenVINO backend support for argmin and argmax (#21060)
Hmm-1224 Apr 9, 2025
78ca6a4
Add support for dynamic dimensions for ops handling `tf.IndexedSlices…
hertschuh Apr 9, 2025
9f8bbca
[OpenVINO backend] Added support for numpy.isclose operation (#21138)
hridaya14 Apr 9, 2025
2111fbc
Aligns Softmax masking behavior with JAX for fully masked axis (#21149)
JyotinderSingh Apr 11, 2025
c90a3a5
Removing references to jax.config.spmd_mode('allow_all'). (#21164)
pschuh Apr 14, 2025
6d52164
allow TorchModuleWrapper compute output shape (#21160)
pass-lin Apr 14, 2025
44a655b
Add details when `TestCase.run_layer_test` output verification fails.…
hertschuh Apr 14, 2025
e61510d
Improve `tf.RaggedTensor` support in `DataAdapter`s. (#21170)
hertschuh Apr 15, 2025
128e280
WIP: Add PyTorch backend support for LSTM with CuDNN optimization (#2…
praveenhosdrug123 Apr 15, 2025
1ea81a1
Add `tf.RaggedTensor` support to `Embedding` layer. (#21171)
hertschuh Apr 16, 2025
8e4b4ab
[OpenVINO Backend]: support numpy.ndim (#21176)
11happy Apr 16, 2025
b840164
Fix Embedding test with ragged tensors on GPU. (#21177)
hertschuh Apr 17, 2025
c7b6b42
Add sparse_sigmoid activation (#21175)
shashaka Apr 17, 2025
65f7e6d
[OpenVINO BACKEND] - feat: implement numpy.nonzero for openvino backe…
11happy Apr 17, 2025
50dae30
Add sparse support to `ops.ones_like` and `ops.zeros_like`. (#21181)
hertschuh Apr 18, 2025
dd9132f
Fix dtype detection for JAX types. (#21184)
cantonios Apr 18, 2025
72cc27f
Bump the python group with 5 updates (#21114)
dependabot[bot] Apr 21, 2025
8a6e83b
Fix `Embedding.compute_output_spec` with a non-`KerasTensor` input. (…
hertschuh Apr 21, 2025
1e9466a
Allow `Embedding` subclasses to only override `compute_output_shape`.…
hertschuh Apr 21, 2025
84c3bfc
Return explicitly layout if already set on variable. (#21194)
cantonios Apr 21, 2025
41d7737
Don't scale gradients if overwriting variable with gradient. (#21193)
cantonios Apr 22, 2025
eb10d1f
Redundant imports; no path hacking in package (#21187)
mattdangerw Apr 22, 2025
6413e1d
Add back shell/format.sh, but it just runs pre-commit (#21197)
mattdangerw Apr 22, 2025
bcb5786
Add openvino to the basic requirements file (#21198)
mattdangerw Apr 22, 2025
f430bb5
[Keras 3 OpenVINO Backend]: Support numpy.log1p operation #29487 (#21…
victorgearhead Apr 22, 2025
99a6bdc
Add pre-commit to the common requirements file (#21199)
mattdangerw Apr 22, 2025
29a95e8
Fix nightly releases (#21203)
mattdangerw Apr 23, 2025
87d99f2
Update version number
fchollet Apr 23, 2025
8049301
[OpenVINO Backend] Support numpy min operation (#21168)
srinjoydutta03 Apr 24, 2025
81c5097
Adds Support For Custom Call-Context Arguments (#21204)
JyotinderSingh Apr 25, 2025
3fcdbe0
Recognize /tfhub as a remote location. (#21211)
nicolas-aagnes Apr 25, 2025
55adc57
Fix Trainer.get_compile_config base case (empty dict) (#21212)
LarsKue Apr 25, 2025
525c65b
Implement angle function in keras.ops (#21200)
shashaka Apr 26, 2025
d94e91f
Fix warnings
fchollet Apr 27, 2025
37eacb0
[OpenVINO Backend] : add support for numpy.nan_to_num (#21186)
11happy Apr 28, 2025
06392a1
Clear static loss-scale for inner optimizer in LossScaleOptimizer. (#…
cantonios Apr 30, 2025
3a3f025
Update conftest.py (#21220)
sonali-kumari1 Apr 30, 2025
ff42a37
Adds `_register_call_context_args` to declare and use call-context ar…
JyotinderSingh Apr 30, 2025
16ef8fb
Updated confusion_metrics.py (#21227)
Kayyuri Apr 30, 2025
c0017df
Don't create unused optimizer variables. (#21232)
cantonios Apr 30, 2025
d71a7fe
Implement bartlett function in keras.ops (#21214)
shashaka Apr 30, 2025
b2fe0a7
Fix stacked RNN with mask in JAX & Numpy backends (#21224)
neo-alex May 1, 2025
8cf1444
Bump github/codeql-action in the github-actions group (#21237)
dependabot[bot] May 1, 2025
48a6692
Openvino numpy ravel (#21231)
SiddharthV147 May 1, 2025
4c6b7e3
Fix message formatting (#21241)
emmanuel-ferdman May 3, 2025
ce95589
Make `take_along_axis` with TF backend compilable. (#21239)
hertschuh May 4, 2025
f5171b3
Implement blackman function in keras.ops (#21235)
shashaka May 4, 2025
df36b8e
Add NotImplementedError for angle & bartlett on openvino (#21246)
shashaka May 5, 2025
4595239
Interleave optimizer variable creation to restore backward-compatibil…
cantonios May 5, 2025
6ddaefb
[Keras Ops] view_as_complex() and view_as_real() (#21221)
DavidLandup0 May 5, 2025
3318d8f
Fix `take_along_axis` with TensorFlow with non-int32 indices. (#21256)
hertschuh May 7, 2025
d8f3f70
Fixed issue with dot_product_attention when using TPU. (#21254)
pctablet505 May 7, 2025
f98b91f
Bug fixes in `plot_model` with nested models. (#21243)
hertschuh May 7, 2025
d9f1874
Simplify the logic of `quantize` and float8 build. (#21248)
james77777778 May 8, 2025
5f2793e
Initialize random seed for distributed models. (#21261)
cantonios May 8, 2025
8d22f21
Add openvino backend support for numpy.hstack (#21257)
Imokutmfon May 8, 2025
44c2f83
Increment optimizer._iterations in apply(...). (#21262)
cantonios May 8, 2025
583306d
Add support for jax.experimental.layout layouts. (#21263)
cantonios May 8, 2025
cbb3682
Allow variable layout to be set on construction. (#21264)
cantonios May 8, 2025
bd8e6a7
Merge branch 'master' into mlx-merge
acsweet May 10, 2025
2d6f74e
numpy ops, (wip) overwrite gradients in optimizer
acsweet May 12, 2025
2903c6a
updates
acsweet May 12, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .github/workflows/actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,5 @@ jobs:
pip install -r requirements-openvino.txt --progress-bar off --upgrade
pip uninstall -y keras keras-nightly
pip install -e "." --progress-bar off --upgrade
- name: Install pre-commit
run: pip install pre-commit && pre-commit install
- name: Run pre-commit
run: pre-commit run --all-files --hook-stage manual
22 changes: 2 additions & 20 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,26 +82,8 @@ jobs:
pip install -r requirements-openvino.txt --progress-bar off --upgrade
pip uninstall -y keras keras-nightly
pip install -e "." --progress-bar off --upgrade
- name: Check for API changes
run: |
bash shell/api_gen.sh
git status
clean=$(git status | grep "nothing to commit")
if [ -z "$clean" ]; then
echo "Please run shell/api_gen.sh to generate API."
exit 1
fi
- name: Lint
run: bash shell/lint.sh
- name: Check for API changes
run: |
bash shell/api_gen.sh
git status
clean=$(git status | grep "nothing to commit")
if [ -z "$clean" ]; then
echo "Please run shell/api_gen.sh to generate API."
exit 1
fi
- name: Run pre-commit
run: pre-commit run --all-files --hook-stage manual


nightly:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/scorecard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,14 @@ jobs:
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
# format to the repository Actions tab.
- name: "Upload artifact"
uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4.6.1
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: SARIF file
path: results.sarif
retention-days: 5

# Upload the results to GitHub's code scanning dashboard.
- name: "Upload to code-scanning"
uses: github/codeql-action/upload-sarif@b56ba49b26e50535fa1e7f7db0f4f7b4bf65d80d # v3.28.10
uses: github/codeql-action/upload-sarif@28deaeda66b76a05916b6923827895f2b14ab387 # v3.28.16
with:
sarif_file: results.sarif
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ obj/**
tmp/**
.vs/
dist/**
*.egg-info/*
**/*.egg-info/*
.vscode
examples/**/*.jpg
.python-version
Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ the package has been imported.

**Note:** The OpenVINO backend is an inference-only backend, meaning it is designed only for running model
predictions using `model.predict()` method.
To use `openvino` backend, install the required dependencies from the `requirements-openvino.txt` file.

## Backwards compatibility

Expand Down
92 changes: 32 additions & 60 deletions api_gen.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
It generates API and formats user and generated APIs.
"""

import importlib
import os
import re
import shutil
Expand All @@ -24,38 +23,38 @@ def ignore_files(_, filenames):
def copy_source_to_build_directory(root_path):
# Copy sources (`keras/` directory and setup files) to build dir
build_dir = os.path.join(root_path, BUILD_DIR_NAME)
build_package_dir = os.path.join(build_dir, PACKAGE)
build_src_dir = os.path.join(build_package_dir, "src")
root_src_dir = os.path.join(root_path, PACKAGE, "src")
if os.path.exists(build_dir):
shutil.rmtree(build_dir)
os.mkdir(build_dir)
shutil.copytree(
PACKAGE, os.path.join(build_dir, PACKAGE), ignore=ignore_files
)
os.makedirs(build_package_dir)
shutil.copytree(root_src_dir, build_src_dir)
return build_dir


def create_legacy_directory(package_dir):
src_dir = os.path.join(package_dir, "src")
api_dir = os.path.join(package_dir, "api")
# Make keras/_tf_keras/ by copying keras/
tf_keras_dirpath_parent = os.path.join(api_dir, "_tf_keras")
tf_keras_dirpath_parent = os.path.join(package_dir, "_tf_keras")
tf_keras_dirpath = os.path.join(tf_keras_dirpath_parent, "keras")
os.makedirs(tf_keras_dirpath, exist_ok=True)
with open(os.path.join(tf_keras_dirpath_parent, "__init__.py"), "w") as f:
f.write("from keras.api._tf_keras import keras\n")
with open(os.path.join(api_dir, "__init__.py")) as f:
f.write("from keras._tf_keras import keras\n")
with open(os.path.join(package_dir, "__init__.py")) as f:
init_file = f.read()
init_file = init_file.replace(
"from keras.api import _legacy",
"from keras.api import _tf_keras",
"from keras import _legacy as _legacy",
"from keras import _tf_keras as _tf_keras",
)
with open(os.path.join(api_dir, "__init__.py"), "w") as f:
with open(os.path.join(package_dir, "__init__.py"), "w") as f:
f.write(init_file)
# Remove the import of `_tf_keras` in `keras/_tf_keras/keras/__init__.py`
init_file = init_file.replace("from keras.api import _tf_keras\n", "\n")
init_file = init_file.replace("from keras import _tf_keras\n", "\n")
with open(os.path.join(tf_keras_dirpath, "__init__.py"), "w") as f:
f.write(init_file)
for dirname in os.listdir(api_dir):
dirpath = os.path.join(api_dir, dirname)
for dirname in os.listdir(package_dir):
dirpath = os.path.join(package_dir, dirname)
if os.path.isdir(dirpath) and dirname not in (
"_legacy",
"_tf_keras",
Expand All @@ -81,7 +80,7 @@ def create_legacy_directory(package_dir):
for path in os.listdir(os.path.join(src_dir, "legacy"))
if os.path.isdir(os.path.join(src_dir, "legacy", path))
]
for root, _, fnames in os.walk(os.path.join(api_dir, "_legacy")):
for root, _, fnames in os.walk(os.path.join(package_dir, "_legacy")):
for fname in fnames:
if fname.endswith(".py"):
legacy_fpath = os.path.join(root, fname)
Expand All @@ -95,22 +94,22 @@ def create_legacy_directory(package_dir):
with open(legacy_fpath) as f:
legacy_contents = f.read()
legacy_contents = legacy_contents.replace(
"keras.api._legacy", "keras.api._tf_keras.keras"
"keras._legacy", "keras._tf_keras.keras"
)
if os.path.exists(core_api_fpath):
with open(core_api_fpath) as f:
core_api_contents = f.read()
core_api_contents = core_api_contents.replace(
"from keras.api import _tf_keras\n", ""
"from keras import _tf_keras as _tf_keras\n", ""
)
for legacy_submodule in legacy_submodules:
core_api_contents = core_api_contents.replace(
f"from keras.api import {legacy_submodule}\n",
f"from keras import {legacy_submodule} as {legacy_submodule}\n", # noqa: E501
"",
)
core_api_contents = core_api_contents.replace(
f"keras.api.{legacy_submodule}",
f"keras.api._tf_keras.keras.{legacy_submodule}",
f"keras.{legacy_submodule}",
f"keras._tf_keras.keras.{legacy_submodule}",
)
# Remove duplicate generated comments string.
legacy_contents = re.sub(r"\n", r"\\n", legacy_contents)
Expand All @@ -122,7 +121,7 @@ def create_legacy_directory(package_dir):
)
for import_name in legacy_imports:
core_api_contents = re.sub(
f"\n.* import {import_name}\n",
f"\n.* import {import_name} as {import_name}\n",
r"\n",
core_api_contents,
)
Expand All @@ -131,68 +130,41 @@ def create_legacy_directory(package_dir):
f.write(legacy_contents)

# Delete keras/api/_legacy/
shutil.rmtree(os.path.join(api_dir, "_legacy"))
shutil.rmtree(os.path.join(package_dir, "_legacy"))


def export_version_string(api_init_fname):
with open(api_init_fname) as f:
contents = f.read()
with open(api_init_fname, "w") as f:
contents += "from keras.src.version import __version__\n"
contents += "from keras.src.version import __version__ as __version__\n"
f.write(contents)


def update_package_init(template_fname, dest_fname, api_module):
with open(template_fname) as template_file:
with open(dest_fname, "w") as dest_file:
for line in template_file:
if "# DO NOT EDIT." in line:
dest_file.write(line)
# Import all public symbols from `api/` and `__version__`.
for symbol in api_module.__dict__.keys():
if symbol.startswith("_") and symbol != "__version__":
continue
dest_file.write(f"from keras.api import {symbol}\n")
# Skip the previous autogenerated block.
for line in template_file:
if "# END DO NOT EDIT." in line:
break
dest_file.write(line)


def build():
# Backup the `keras/__init__.py` and restore it on error in api gen.
root_path = os.path.dirname(os.path.abspath(__file__))
code_api_dir = os.path.join(root_path, PACKAGE, "api")
code_init_fname = os.path.join(root_path, PACKAGE, "__init__.py")
# Create temp build dir
build_dir = copy_source_to_build_directory(root_path)
build_api_dir = os.path.join(build_dir, PACKAGE, "api")
build_init_fname = os.path.join(build_dir, PACKAGE, "__init__.py")
build_api_dir = os.path.join(build_dir, PACKAGE)
build_src_dir = os.path.join(build_api_dir, "src")
build_api_init_fname = os.path.join(build_api_dir, "__init__.py")
try:
os.chdir(build_dir)
# Generates `keras/api` directory.
if os.path.exists(build_api_dir):
shutil.rmtree(build_api_dir)
if os.path.exists(build_init_fname):
os.remove(build_init_fname)
os.makedirs(build_api_dir)
namex.generate_api_files(
"keras", code_directory="src", target_directory="api"
)
open(build_api_init_fname, "w").close()
namex.generate_api_files("keras", code_directory="src")
# Add __version__ to `api/`.
export_version_string(build_api_init_fname)
# Creates `_tf_keras` with full keras API
create_legacy_directory(package_dir=os.path.join(build_dir, PACKAGE))
# Update toplevel init with all `api/` imports.
api_module = importlib.import_module(f"{BUILD_DIR_NAME}.keras.api")
update_package_init(code_init_fname, build_init_fname, api_module)
# Copy back the keras/api and keras/__init__.py from build directory
if os.path.exists(build_src_dir):
shutil.rmtree(build_src_dir)
if os.path.exists(code_api_dir):
shutil.rmtree(code_api_dir)
shutil.copytree(build_api_dir, code_api_dir)
shutil.copy(build_init_fname, code_init_fname)
shutil.copytree(
build_api_dir, code_api_dir, ignore=shutil.ignore_patterns("src/")
)
finally:
# Clean up: remove the build directory (no longer needed)
shutil.rmtree(build_dir)
Expand Down
2 changes: 1 addition & 1 deletion conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def pytest_collection_modifyitems(config, items):
]

requires_trainable_backend = pytest.mark.skipif(
backend() == "numpy" or backend() == "openvino",
backend() in ["numpy", "openvino"],
reason="Trainer not implemented for NumPy and OpenVINO backend.",
)
for item in items:
Expand Down
4 changes: 2 additions & 2 deletions guides/training_with_built_in_methods.py
Original file line number Diff line number Diff line change
Expand Up @@ -620,8 +620,8 @@ def __getitem__(self, idx):
"""
To fit the model, pass the dataset instead as the `x` argument (no need for a `y`
argument since the dataset includes the targets), and pass the validation dataset
as the `validation_data` argument. And no need for the `batch_size` argument, since
the dataset is already batched!
as the `validation_data` argument. And no need for the `validation_batch_size`
argument, since the dataset is already batched!
"""

model = get_compiled_model()
Expand Down
Loading
Loading