Weekly Project News

Archives
Subscribe

Weekly GitHub Report for Keras: July 13, 2026 - July 20, 2026 (21:04:28)

Weekly GitHub Report for Keras

Thank you for subscribing to our weekly newsletter! Each week, we deliver a comprehensive summary of your GitHub project's latest activity right to your inbox, including an overview of your project's issues, pull requests, contributors, and commit activity.


Table of Contents

  • I. News
    • 1.1. Recent Version Releases
    • 1.2. Other Noteworthy Updates
  • II. Issues
    • 2.1. Top 5 Active Issues
    • 2.2. Top 5 Stale Issues
    • 2.3. Open Issues
    • 2.4. Closed Issues
    • 2.5. Issue Discussion Insights
  • III. Pull Requests
    • 3.1. Open Pull Requests
    • 3.2. Closed Pull Requests
    • 3.3. Pull Request Discussion Insights
  • IV. Contributors
    • 4.1. Contributors

I. News

1.1 Recent Version Releases:

The current version of this repository is v3.14.0

1.2 Version Information:

Released on April 2, 2026, this version introduces full Orbax checkpoint integration with sharding and step recovery, new quantization methods including Activation-aware Weight Quantization, and a ScheduleFreeAdamW optimizer. It also significantly enhances OpenVINO backend support with extensive NumPy, neural network, and control flow operations, adds batch renormalization and gated attention layers, and improves multi-backend NumPy operations and preprocessing capabilities.

Click here to view the full release notes!

II. Issues

2.1 Top 5 Active Issues:

We consider active issues to be issues that that have been commented on most frequently within the last week. Bot comments are omitted.

  1. [STAT:AWAITING RESPONSE FROM CONTRIBUTOR] [TYPE:BUG] [Bug] model.evaluate() reports incorrect metric values in graph mode when dataset has fixed batch dimension: This issue reports a bug where model.evaluate() in graph mode returns incorrect, diluted metric values when the input dataset has a fixed batch dimension, due to an extra phantom batch being added during tf.function tracing. The problem does not occur in eager mode or when the batch dimension is unspecified, and workarounds include forcing eager execution or modifying the dataset to have a None batch dimension.

    • The comments confirm reproduction of the issue and discuss a proposed fix submitted as a pull request in a personal repository, which was then re-implemented in the official repository; contributors clarify code details and express willingness to wait for maintainer review to merge the fix.
    • Number of comments this week: 2
  2. [TYPE:BUG] keras.ops.select infers the wrong output shape under broadcasting: This issue reports that the keras.ops.select function incorrectly infers the output shape when broadcasting is involved, as it returns the shape of the first choice without considering broader conditions or later choices, leading to a mismatch between the inferred and actual output shapes. The problem arises because Select.compute_output_spec does not perform broadcasting or dtype promotion like its sibling Where.compute_output_spec, causing incorrect shape inference in backend-agnostic contexts.

    • The comments confirm the issue reproduces on Keras 3.16.0 and clarify that the fix involves updating Select.compute_output_spec to mirror Where.compute_output_spec by broadcasting all inputs and promoting dtypes, with tests added and CI passing across multiple backends.
    • Number of comments this week: 2
  3. [STAT:AWAITING RESPONSE FROM CONTRIBUTOR] [TYPE:BUG] plot_model does not work for all models in keras.applications: This issue reports that the keras.utils.plot_model function does not work correctly for all models available in keras.applications, with errors occurring due to how different pydot packages handle subgraph naming and underlying bugs in certain versions of graphviz. The user provides detailed testing results across various models and environments, concluding that using the pydot package and updating graphviz can mitigate some problems, but not all, indicating that some errors stem from unresolved bugs in graphviz itself.

    • The comments discuss attempts to resolve the issue by adjusting the dpi parameter and switching between different pydot packages, with confirmation that the problem is linked to graphviz bugs rather than plot_model itself; users share reproduction cases and suggest upgrading graphviz to newer versions as a potential workaround.
    • Number of comments this week: 1
  4. [TYPE:FEATURE] [STAT:AWAITING KERAS-ENG] keras.ops. in tf.data regardless of backends: This issue discusses the challenge of using keras.ops within a tf.data pipeline in a way that is agnostic to the backend, such as TensorFlow, PyTorch, or JAX. The user is seeking a solution that would allow keras.ops to automatically switch to the TensorFlow backend when operating inside tf.data, avoiding the need to reimplement functions specifically for TensorFlow to maintain compatibility.

    • The comments confirm that using keras.ops inside tf.data must rely on TensorFlow operations by design, and dynamic backend switching is not supported. Alternatives like the Grain data pipeline are suggested for backend-agnostic workflows, while performance concerns with the torch backend in tf.data and model.fit are also discussed, with requests for reproducible examples to investigate further.
    • Number of comments this week: 1
  5. [TYPE:BUG] [Bug] Input validation and logical inconsistency in MeanIoU segmentation metrics: This issue addresses a bug in the MeanIoU segmentation metric where input labels exceeding the predefined class range cause backend crashes due to lack of input validation, and the metric incorrectly returns near-perfect scores for classes absent in both ground truth and predictions, leading to inflated performance results. The expected fix involves adding validation to ensure class IDs are within valid bounds and adjusting the metric calculation to exclude or assign zero contribution to classes with zero instances.

    • The first comment reports a pull request that implements bounds validation and corrects the zero-instance class handling, passing all tests and formatting checks. The second comment confirms the backend crash issue is resolved in the latest version but notes that the problem with the metric returning near 1.0 for zero-instance classes still persists.
    • Number of comments this week: 1

2.2 Top 5 Stale Issues:

We consider stale issues to be issues that has had no activity within the last 30 days. The team should work together to get these issues resolved and closed as soon as possible.

As of our latest update, there are no stale issues for the project this week.

2.3 Open Issues

This section lists, groups, and then summarizes issues that were created within the last week in the repository.

Issues Opened This Week: 20

Summarized Issues:

  • Checkpoint restoration issues: In Keras 3.16.0 with the JAX backend, keras.callbacks.OrbaxCheckpoint saves checkpoints correctly but fails to restore the exact model weights, resulting in mismatched weights that affect training resumption, reproducibility, and evaluation. This issue undermines the reliability of checkpointing for experiments using this backend.
  • issues/23251
  • Input handling and validation errors: Functional models constructed with dictionary inputs incorrectly accept unrelated extra keys as declared inputs, causing misleading shape errors and training failures, while using ordered lists avoids this problem. Additionally, model.fit() lacks early validation for callbacks, accepting invalid callbacks initially and raising confusing errors later instead of failing fast.
  • issues/23258, issues/23263
  • Output shape inference bugs: The keras.ops.select operation incorrectly infers output shapes by returning the shape of the first choice without broadcasting across all inputs, leading to mismatches between inferred and actual output shapes under broadcasting conditions. This causes shape-related errors during model execution.
  • issues/23264
  • Per-call overhead in Layer and Operation calls: The Operation.__call__ method builds a traceback wrapper and allocates a closure on every call unnecessarily, causing avoidable overhead even when no errors occur. Similarly, Layer.__call__ redundantly executes inspect.Signature.bind and reassigns self.built and self._called to True on every call, causing significant per-call overhead that can be optimized by caching and guarding assignments.
  • issues/23270, issues/23271, issues/23280
  • Redundant dtype and device lookups: Functions like standardize_dtype, result_type, get_device(), and distribution() perform redundant O(n) dtype lookups and repeated threading.local global state accesses on every tensor operation, causing unnecessary overhead. These inefficiencies were addressed by introducing O(1) membership checks, caching, and inlining global state access.
  • issues/23272, issues/23273
  • Torch backend tensor conversion and operation inefficiencies: The torch backend's convert_to_tensor function causes redundant .to() calls due to a type mismatch, and Dense/EinsumDense layers use a generic einsum path instead of efficient specialized linear operations, leading to redundant computation. MultiHeadAttention's causal self-attention does not use scaled_dot_product_attention, causing redundant mask materialization and breaking torch.compile optimization, which was fixed by direct dispatch and caching.
  • issues/23274, issues/23276, issues/23277
  • Torch backend dynamic shape and memory inefficiencies: The torch backend's slice() function coerces dynamic batch dimension indices to Python integers, preventing dynamic batch size handling in exported programs. Additionally, redundant double copying of input tensors occurs during the Conv operation's forward pass with channels_last format, causing unnecessary memory operations that can be optimized by merging contiguity steps.
  • issues/23278, issues/23279
  • Redundant validation and tree traversal overhead: The assert_input_compatibility() function is redundantly called on every layer invocation, causing unnecessary validation of static InputSpec. Also, the _dict_to_ordered_dict function performs full pytree traversals on plain leaf tensors unnecessarily, and Layer.__call__ redundantly opens the layer name scope twice and executes tree walks on single-tensor calls, all causing avoidable overhead that were optimized by adding fast paths and short-circuiting.
  • issues/23275, issues/23281, issues/23290, issues/23294
  • PyTorch backend training inefficiencies and race conditions: The PyTorch backend's TorchTrainer suffers from redundant processing in loss and batch-size handling during training and evaluation steps, causing inefficiencies and GPU crashes, which were fixed by optimized fast paths. Additionally, a race condition in the PyDataset class's on_epoch_begin method allows multiple workers to request data before updates complete, risking silent data inconsistencies and crashes.
  • issues/23282, issues/23283

2.4 Closed Issues

This section lists, groups, and then summarizes issues that were closed within the last week in the repository. This section also links the associated pull requests if applicable.

Issues Closed This Week: 12

Summarized Issues:

  • Convolution operation issues in backends: Multiple backends face problems with convolution operations, including inefficient data layout conversions in PyTorch and TensorFlow limitations combining strides and dilation rates. These issues cause performance degradation and errors, with proposed workarounds or reimplementations to improve efficiency and correctness.
  • [issues/18457, issues/23028]
  • GPU performance and memory management problems: The torch backend exhibits low GPU utilization with certain metrics and suffers from a GPU memory leak due to reference cycles in batch predictions. These issues lead to slow processing and unreleased memory, requiring fixes to improve GPU resource usage and stability.
  • [issues/19512, issues/23110]
  • Audio decoding bug in TensorFlow backend: The tf.audio.decode_wav function truncates audio samples prematurely before resampling, resulting in fewer output samples than expected when downsampling from 48 kHz to 16 kHz. This bug affects audio processing accuracy and output length consistency.
  • [issues/23068]
  • Incorrect dot product implementation in backends: The PyTorch and OpenVino backends incorrectly implement the ops.dot function by using batch matrix multiplication for tensors with rank greater than two, causing wrong output shapes and results. The dot operation should contract specific axes rather than perform batch broadcasting.
  • [issues/23248]
  • Serialization inconsistency in Keras 3.15: Serializing compiled models produces different compile_config outputs for identical models due to automatic suffixing of optimizer names to ensure uniqueness. This behavior causes inconsistencies in serialized configurations across sessions.
  • [issues/23256]
  • Inefficiencies in model forward pass and loss clearing: The Functional model rebuilds static call state information on every call, and the _clear_losses method recurses through all sublayers unnecessarily when no losses exist. Both issues cause redundant computation overhead that was fixed by caching and skipping recursion until needed.
  • [issues/23291, issues/23292, issues/23295]
  • Inefficiency in torch Variable property accessors: The torch Variable.value property and dtype/autocast accessors redo fixed-cost computations on every weight read, causing per-call overhead. Optimizations include hoisting closures, improving device checks, and removing redundant dtype standardization to reduce this overhead.
  • [issues/23293]
  • Addition of GridMask augmentation: The GridMask augmentation technique, as described in a referenced paper and TensorFlow implementation, is proposed to be added to Keras to enhance data augmentation capabilities.
  • [issues/23240]

2.5 Issue Discussion Insights

This section will analyze the tone and sentiment of discussions within this project's open and closed issues that occurred within the past week. It aims to identify potentially heated exchanges and to maintain a constructive project environment.

Based on our analysis, there are no instances of toxic discussions in the project's open or closed issues from the past week.


III. Pull Requests

3.1 Open Pull Requests

This section provides a summary of pull requests that were opened in the repository over the past week. The top three pull requests with the highest number of commits are highlighted as 'key' pull requests. Other pull requests are grouped based on similar characteristics for easier analysis. Up to 25 pull requests are displayed in this section, while any remaining pull requests beyond this limit are omitted for brevity.

Pull Requests Opened This Week: 18

Key Open Pull Requests

1. [DO NOT REVIEW] integration testing branch for #22561 series (13 PRs combined): This pull request is an internal integration and benchmarking branch that combines the changes from 13 independent pull requests related to the #22561 torch eager-overhead series on top of the current master branch to verify their clean composition, ensure bit-exact numeric equivalence, and run the full combined test suite, explicitly not requesting review and not intended for merging as-is.

  • URL: pull/23257
  • Associated Commits: c2b77, a9d06, fb8f4, f84a4, d02c5, 3b423, 2528f, b360a, 7b90b, 7e487, 9e124, fbda2, b0cc2, 674e8, 677fe, 8ae7d, a9245, a5c82, 19df2, a4713, 839a9, 0f1e3, 09f40, 4be28, c7594, 1b201, f1376, 4ad3a, 397ef, 2c203, fc0e7, 7240f, 18fc2, adcf5, c65fa, a5733, 785f2, 7a4a7, d97c4, 348b6, b0415, c1aab, 53fc1, 49e92, 59d47, 04be7, f19bc, 6b16e, 28bb8, 25c89, 9b7ab, 48ebe, 7b78c, 0d414, abe7e, 8ac5e, d3cbe, 1c29c

2. perf(layers): open the layer name scope once per call, not twice: This pull request optimizes the Layer.__call__ method by merging two separate name-scope openings into a single scope per call, reducing redundant name-scope allocations and improving performance without changing behavior, as verified by extensive tests and benchmarks across multiple backends.

  • URL: pull/23301
  • Associated Commits: 3ef1e, ba3d8, 5aa16, 7da08, c1f28, a3742, 40ebe, d4dec, 1af9b, e8ebb, b856a

3. Fix OrbaxCheckpoint restoration for Sequential models (#23251): This pull request fixes the issue where OrbaxCheckpoint fails to restore weights for Sequential models loaded via keras.saving.load_model() by introducing a helper function that normalizes state tree paths to align with the model’s expected variable names, ensuring correct restoration of both trainable and optimizer variables, and includes an automated test to prevent regressions.

  • URL: pull/23253
  • Associated Commits: d0535, e88a6, 36a7e

Other Open Pull Requests

  • Keras Functional Model Dict Input Fixes: Multiple pull requests address issues with dictionary inputs in Keras functional models by filtering out extra keys to ensure correct pairing of runtime inputs with declared model inputs. These fixes improve error handling, provide consistent behavior across eager and symbolic calls, and include recursive pruning for nested dict inputs along with test coverage.
  • pull/23260, pull/23261
  • Security Enhancements in Dataset Loading and Testing: Security improvements include replacing unsafe unpickling in CIFAR dataset loading with a restricted unpickler to prevent malicious code execution and removing privileged and host network options from the run_cpu_tests container to restrict runner node access. Additionally, escaping interpolated fields in layer labels prevents injection of unintended Graphviz attributes, enhancing overall security.
  • pull/23252, pull/23254
  • Output Shape and Data Type Inference Improvements: The output shape and dtype inference in keras.ops.select was fixed to correctly broadcast shapes and resolve dtypes across all inputs, aligning its behavior with Where.compute_output_spec and ensuring accurate inference when conditions or choices have broader shapes.
  • pull/23265
  • Data Format Support in Image Patch Reconstruction: Support for data_format="channels_first" was added to keras.ops.image.reconstruct_patches for 2D and 3D inputs, implementing reconstruction in channels_last layout with a final transpose back. This update includes symbolic shape inference, build-time validation, enhanced documentation, and tests across multiple backends without relying on unsupported convolution paths.
  • pull/23267
  • Weight-Decomposed Low-Rank Adaptation (DoRA) Implementation: A novel DoRA approach was introduced across major Keras layers, decoupling weight updates into magnitude and direction for improved convergence. This method achieves zero inference overhead by fully merging weights into the base model.
  • pull/23269
  • PyDataset Data Loading Synchronization: The PyDataset data loading process was modified to ensure the on_epoch_begin callback fully executes before the worker pool starts, preventing workers from accessing stale data and aligning behavior with the on_epoch_end callback sequence.
  • pull/23284
  • Loss and Metric Serialization Fixes: Fixes were made to ensure that key numeric hyperparameters like delta in Huber loss and axis in CosineSimilarity metric are properly stored and included in get_config methods. This prevents loss of configuration during serialization and deserialization, preserving correct evaluation results after model saving and loading.
  • pull/23285, pull/23286
  • Performance Optimizations in Layer Call Paths: The CallSpec fast path was extended to efficiently handle calls with the training=<bool> keyword argument, reducing binder invocations and improving speed. Additionally, the Layer.__call__ method was optimized to skip redundant input conversions when only the training argument is present, reducing unnecessary processing during common workflows.
  • pull/23288, pull/23296
  • KerasFileEditor Security Improvements: The KerasFileEditor constructor was improved to safely read config.json and metadata.json by rejecting decompression-bomb attacks, preventing maliciously large files from being fully decompressed into memory and aligning security checks with the main model loader.
  • pull/23303
  • Mask Pipeline Fast Path Optimization: Optimized fast paths were introduced in the Layer.__call__ mask pipeline for single-leaf tensor calls by reusing previously computed predicates, eliminating redundant tree traversals and string allocations, and significantly improving performance while maintaining correctness and backend compatibility.
  • pull/23300

3.2 Closed Pull Requests

This section provides a summary of pull requests that were closed in the repository over the past week. The top three pull requests with the highest number of commits are highlighted as 'key' pull requests. Other pull requests are grouped based on similar characteristics for easier analysis. Up to 25 pull requests are displayed in this section, while any remaining pull requests beyond this limit are omitted for brevity.

Pull Requests Closed This Week: 38

Key Closed Pull Requests

1. Torch performance improvement: This pull request introduces extensive performance optimizations to Keras, especially targeting the PyTorch and JAX backends, by implementing fast paths for common tensor operations, caching mechanisms, and direct framework dispatch to significantly reduce overhead during inference and training while maintaining compatibility with torch.compile and improving dtype handling and backend consistency.

  • URL: pull/22660
  • Associated Commits: 9fefa, 964aa, 2de9a, 542db, f29a9, 01be8, 4cfba, d990d, 3d8b4, 600c1, 5d7cd
  • Associated Commits: 9fefa, 964aa, 2de9a, 542db, f29a9, 01be8, 4cfba, d990d, 3d8b4, 600c1, 5d7cd

2. perf(backend): trim redundant work in Variable value/dtype accessors: This pull request proposes performance optimizations in the backend by eliminating redundant work in the Variable value and dtype accessors, including hoisting closures to module level, removing unnecessary string conversions, reordering checks to reduce global state reads, and deleting no-op calls, resulting in micro-benchmark improvements without measurable macro-level impact and maintaining full test coverage and behavioral equivalence.

  • URL: pull/23297
  • Associated Commits: eb997, 6db87, f532e, 44d28, 28849, 242bb, 24c64, 89bb4, d0988, a2578
  • Associated Commits: eb997, 6db87, f532e, 44d28, 28849, 242bb, 24c64, 89bb4, d0988, a2578

3. Add reconstruct_patches op + ReconstructPatches{2,3}D layers (inverse…: This pull request adds a reconstruct_patches operation and corresponding ReconstructPatches2D and ReconstructPatches3D layers to Keras, providing the inverse functionality to the existing extract_patches op for non-overlapping patches with channels_last data format and "valid"/"same" padding, thereby addressing a long-standing asymmetry by enabling a true round-trip reconstruction of image patches consistent across TensorFlow, JAX, and PyTorch backends.

  • URL: pull/22984
  • Associated Commits: 06e39, 5a94c, 2c8dc, 87051, 77f91
  • Associated Commits: 06e39, 5a94c, 2c8dc, 87051, 77f91

Other Closed Pull Requests

3.3 Pull Request Discussion Insights

This section will analyze the tone and sentiment of discussions within this project's open and closed pull requests that occurred within the past week. It aims to identify potentially heated exchanges and to maintain a constructive project environment.

Based on our analysis, there are no instances of toxic discussions in the project's open or closed pull requests from the past week.


IV. Contributors

4.1 Contributors

Active Contributors:

We consider an active contributor in this project to be any contributor who has made at least 1 commit, opened at least 1 issue, created at least 1 pull request, or made more than 2 comments in the last month.

If there are more than 10 active contributors, the list is truncated to the top 10 based on contribution metrics for better clarity.

Contributor Commits Pull Requests Issues Comments
pctablet505 97 25 19 17
rstar327 35 8 0 0
MarcosAsh 40 1 0 0
buildwithsuhana 22 9 2 0
ChiragSW 19 0 0 0
hertschuh 3 3 0 11
maitry63 10 2 0 4
SID-6921 12 1 0 0
LinZiyuu 7 4 0 1
devs6186 8 2 0 0

Don't miss what's next. Subscribe to Weekly Project News:
Powered by Buttondown, the easiest way to start and grow your newsletter.