Weekly GitHub Report for Keras: July 27, 2026 - August 03, 2026 (21:17:38)
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:
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 functionality alongside numerous bug fixes and expanded 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.
-
[TYPE:BUG] Error after upgrade from 3.6 to 3.7: This issue describes a problem encountered after upgrading from Keras version 3.6 to 3.7, where a model using combined inputs produces incorrect predictions and has input shapes with batch size dimension as None when using
tf.function. The user found that training and predicting within the same version works correctly, but mixing versions causes prediction errors, suggesting a change in how batch sizes are handled or model inputs are processed between these versions.- The comments provide suggestions to use dynamic shape functions instead of static shapes within
tf.function, request more details to replicate the issue, and confirm that the problem arises when mixing model training and prediction across versions. The user shares code and data for reproduction, and later it is revealed that the root cause relates to input order differences between versions, which can be fixed by maintaining consistent input ordering. - Number of comments this week: 2
- The comments provide suggestions to use dynamic shape functions instead of static shapes within
-
[TYPE:BUG] [STAT:CONTRIBUTIONS WELCOME] RuntimeError in
test_stepwith multi-GPU: Model input shape mismatch: This issue describes a RuntimeError encountered when using a custom Keras model with a multi-GPU setup, where the input shape mismatch occurs during the overriddentest_stepmethod in evaluation. The problem arises because the model's input splitting logic intest_stepdoes not work correctly with distributed strategies likeMirroredStrategy, causing the model to fail automatic building and evaluation on multiple GPUs.- The comments confirm the issue is due to Keras bypassing custom
test_steplogic during symbolic model building in multi-GPU contexts and suggest moving the preprocessing logic to thecall()method as a fix; additional advice includes preprocessing input splits before distribution to avoid shape mismatches, and several users express interest in contributing fixes or have submitted pull requests addressing the problem. - Number of comments this week: 2
- The comments confirm the issue is due to Keras bypassing custom
-
[TYPE:BUG] [STAT:AWAITING RESPONSE FROM CONTRIBUTOR] CLIPBackbone text_encoder: predict_on_batch() output differs from tf.function on GPU (TF backend): This issue reports a numerical inconsistency in the outputs of the CLIPBackbone text_encoder when using
predict_on_batch()versus an explicittf.functiongraph call on GPU, with the difference exceeding the expected tolerance. The discrepancy is reproducible on an RTX 3090 with TensorFlow 2.20.0 and Keras 3.12.0, but does not occur on CPU, suggesting a GPU-specific numerical inconsistency in the TensorFlow backend.- The comments acknowledge the issue and indicate that it will be investigated; a contributor tested the provided script on a different environment (Google Colab with Keras 3.15.0) and did not observe the mismatch, reporting a much smaller difference below the threshold, and referenced a related discussion for further context.
- Number of comments this week: 1
-
[TYPE:FEATURE] [KERAS-TEAM-REVIEW-PENDING] [Feature request] A Restoration and Perceptual loss suite: This issue proposes adding a suite of high-level image restoration and perceptual loss functions to the Keras library, including Charbonnier, MSSSIM, PSNR, Total Variation, Edge-Aware Smoothness, and an optional PerceptualLoss that integrates with KerasCV when a pretrained feature extractor is available. The motivation is to provide standardized, tested, and backend-agnostic loss functions commonly used in image restoration tasks to reduce duplicated user code and improve ergonomics for Keras users.
- The comments discuss concerns about codebase bloat if these losses are added directly to the main losses.py file, suggesting instead to place them in a separate module such as
image_losses.py; a proposal is made to move all related losses and helper functions into this new module while maintaining a clean public API underkeras.losses. - Number of comments this week: 1
- The comments discuss concerns about codebase bloat if these losses are added directly to the main losses.py file, suggesting instead to place them in a separate module such as
-
[TYPE:SUPPORT] [KERAS-TEAM-REVIEW-PENDING] Keras with Pytorch backend is SLOW compared to Keras and tensorflow2.10 GPU: This issue reports that training a model using Keras with the PyTorch backend is significantly slower and causes GPU memory to balloon compared to using Keras with TensorFlow 2.10 on GPU. The user provides detailed model, loss, and data generator code, and notes that even rewriting the model and training loop directly in PyTorch results in slow performance, suggesting a deeper issue possibly related to environment or backend inefficiencies.
- Commenters attempted to reproduce the problem on Colab with fixed input sizes and found stable, consistent performance without memory growth, indicating the issue may be environment-specific; the user confirmed memory usage grows over time leading to out-of-memory errors locally, and shared extensive training code and diagnostics, but no definitive root cause was identified, with some suggesting this is a known general performance limitation of the PyTorch backend in Keras.
- 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: 2
Summarized Issues:
- Optimizer choice and advantages: This topic covers the rationale for selecting the Adam optimizer for the MNIST dataset, emphasizing its combination of benefits from other optimizers. It highlights Adam's automatic learning rate adaptation, faster convergence, and reduced need for manual tuning compared to SGD and RMSProp.
- issues/23370
- Bug in unpack_ternary function: This topic addresses a bug in Keras's
unpack_ternaryfunction where decoding fails for signedint8input due to overflow and incorrect arithmetic on negative values. The issue causes silent data corruption and mismatched ternary values, impacting the correctness of the output. - issues/23374
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: 13
Summarized Issues:
- Incorrect metric evaluation in graph mode: The
model.evaluate()function in graph mode returns diluted and incorrect metric values due to an extra phantom batch added duringtf.functiontracing, causing discrepancies compared to eager mode evaluation. This issue affects the reliability of model evaluation results when using fixed batch dimension datasets. - issues/23084
- Numerical operation inconsistencies: The
keras.ops.multiplyfunction incorrectly returnsNaNinstead of-Infwhen multiplying-Infby a positivefloat32subnormal value, diverging from NumPy's expected behavior. Additionally,keras.ops.numpy.takeproduces confusing error messages for out-of-range indices, andkeras.ops.numpy.einsumyields gradients with incorrect shapes on the JAX backend involving mixed static and dynamic axes. - issues/23129, issues/23378, issues/23379
- Parameter validation failures: The
keras.ops.glufunction does not validate theaxisparameter properly when used with symbolic tensors, failing to raise errors for out-of-bounds values unlike with eager tensors. Similarly, passing an invalidclass_weightdictionary with unmatched keys tomodel.fit()results in no error or warning, allowing training to proceed silently and potentially obscuring user bugs. - issues/23169, issues/23220
- Performance inefficiencies in error handling: The
Operation.__call__method creates a traceback wrapper and error handler closure on every call, causing unnecessary overhead even when no errors occur. This inefficiency was addressed by refactoring to build these structures only in the error handling path, improving runtime performance. - issues/23270
- Model instantiation errors with environment settings: The T5Backbone model fails to instantiate with a TraceContextError when the
KERAS_NNX_ENABLEDenvironment variable is set to true, due to conflicts between the Functional API pattern and Flax NNX's trace-level restrictions. This causes errors related to symbolic tracing and layer state mutation during model initialization. - issues/23289
- Documentation and roadmap updates requested: Contributors requested updates to the pinned Development Roadmap and Contributing Guide issues to reflect completed items and current priorities. These updates aim to help contributors better align their efforts with the project's latest status and clarify contribution opportunities for various backends.
- issues/23308
- Security risks in file path handling: The
keras.callbacks.ModelCheckpointcallback accepts relative file paths with directory traversal components without validation, which can lead to security risks such as arbitrary file overwrites. This vulnerability is especially concerning in multi-tenant or shared environments where untrusted users control thefilepathparameter. - issues/23312
- Flaky test due to strict tolerance: The
LinalgOpsCorrectnessTest::test_matrix_powertest intermittently fails in continuous integration because of an overly strict tolerance (atol=1e-6) on float32 matrix inverses computed from unseeded random inputs. This causes flaky assertions dependent on the condition number of randomly generated matrices across multiple backends. - issues/23337
- Resource leaks in CSVLogger callback: The CSVLogger callback leaks file descriptors if training is interrupted or fails before the
on_train_end()method is called, leaving open file handles that are only closed upon garbage collection. This can cause resource leaks and file locking problems during abnormal training termination. - issues/23354
- Optimizer choice rationale: The Adam optimizer was chosen for the MNIST dataset due to its advantages over SGD and RMSProp, including adaptive learning rates, faster convergence, and reduced need for manual tuning. This rationale supports improved neural network training efficiency and effectiveness.
- issues/23371
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: 22
Key Open Pull Requests
1. Implement gemmainc function in keras.ops: This pull request implements the keras.ops.gammainc function, which computes the regularized lower incomplete gamma function element-wise for input tensors across multiple backends including NumPy, TensorFlow, PyTorch, and JAX, while excluding support for OpenVINO.
- URL: pull/23365
2. Title: Standardize PyDataset support and tuple batch extraction in preprocessing layers (Normalization, Discretization) : This pull request standardizes input handling in Keras preprocessing layers by improving support for keras.utils.PyDataset and datasets yielding tuple batches, adding robust batch extraction and validation in Normalization and Discretization layers, and includes new unit tests to ensure consistent adaptation behavior.
- URL: pull/23362
3. [PR2] Implement automatic tensor parallelism configuration (Auto-TP): This pull request implements an automatic tensor parallelism configuration engine that intelligently analyzes model layers and properties to generate Megatron-style sharding strategies for Keras models, enhancing support for modern Transformer architectures and simplifying parallelism setup.
- URL: pull/23359
Other Open Pull Requests
- DoRA (Weight-Decomposed Low-Rank Adaptation) Implementation and Extensions: This set of pull requests introduces and extends the DoRA technique across multiple Keras layers, including Dense, EinsumDense, Embedding, and convolutional layers. The changes decompose weights into magnitude and direction components, update forward passes accordingly, and ensure compatibility with attention mechanisms and model saving/loading.
- [pull/23382, pull/23384, pull/23383, pull/23385, pull/23380]
- Serialization and Configuration Fixes: These pull requests improve serialization robustness by using descriptive spec names for quantizable-layer variables and fix configuration serialization issues such as the missing
sparseargument inCategoryEncoding.get_config(). These changes prevent checkpoint corruption and ensure consistent layer behavior after save/load cycles. - [pull/23369, pull/23386]
- Distributed and Parallel Computing Enhancements: The pull requests implement eager-mode collective operations for JAX backend, introduce DTensor distribution utilities for PyTorch backend, and add core infrastructure for tensor parallelism in Keras. These updates enable multi-device scaling, model parallelism, and distributed features like AutoTPDistribution.
- [pull/23357, pull/23366, pull/23358]
- Optimizer Implementation: This pull request implements the Schedule-Free SGD optimizer based on a recent algorithm, introducing anytime optimality without manual learning rate schedules, robust initialization, stable averaging of learning rates, and a weight swapping mechanism for accurate inference.
- [pull/23353]
- Callback and Iterator Improvements: These pull requests improve the CallbackList initialization by validating callbacks early to fail fast on invalid inputs and modify the
EpochIteratorto issue warnings about running out of data only whensteps_per_epochis explicitly set, preventing misleading warnings during training. - [pull/23368, pull/23360]
- Image and Documentation Updates: These pull requests improve documentation related to
keras.utils.load_img()by noting Pillow's internal image size limit and potential DecompressionBombError, and clarify the OpenAI Python client's base_url compatibility with multi-model gateways without runtime changes. - [pull/23346, pull/23376, pull/23375]
- Code Refactoring: This pull request refactors image operations by deleting the existing
image.py, uploading new files, and renaming a file toimage.pyto improve code organization and clarity. - [pull/23381]
- Symbolic Graph and Layer Reassignment Fixes: These pull requests fix issues with
multi_hotandunfoldoperations failing under symbolic graph tracing by addressing dynamic batch dimension handling, and enable reassignment of sublayers and variables after a Keras layer has been built by unlocking the attribute tracker to register new values properly. - [pull/23348, pull/23377]
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: 43
Key Closed Pull Requests
1. layers: add TernaryDense — ternary-weight dense layer {-1, 0, +1}: This pull request introduces keras.layers.TernaryDense, a new dense layer implementing ternary-weight quantization with weights constrained to {-1, 0, +1} and on-the-fly quantization during training to enable efficient ternary-weight models, along with support for export, inference, and comprehensive testing.
- URL: pull/22960
- Associated Commits: 924a1, 69def, b1cd7, a1582, 0a7a3, 64fdd, 5027f, 19370, 4ab27, a7a06, be3e5, 97d20, f1cdd, 119f8, c7273
2. Preserve segmentation mask dtype and class indices in preprocessing layers: This pull request fixes image preprocessing layers in Keras to preserve the original integer data type and class indices of segmentation masks during transformations like cropping, flipping, and CutMix by avoiding bilinear interpolation and float casting that previously introduced invalid class values and dtype changes.
- URL: pull/23191
3. [Feature] Add MLX backend (training-capable, Apple Silicon): This pull request introduces a new MLX backend for Keras that enables both running and training models on Apple Silicon by providing a functional autograd system and comprehensive tensor operations optimized for the Metal GPU and unified memory architecture, making it the first eager/numpy-like Keras backend with full training support on Mac.
- URL: pull/23193
Other Closed Pull Requests
- Version updates and security enhancements: Multiple pull requests update the project version to 3.12.4 and 3.15.1, incorporating important security improvements such as restricted unpickling in dataset loaders, verification of H5 file groups, protection against decompression bombs during asset extraction, and compatibility fixes for Python 3.14. These updates collectively enhance the security and stability of the project by preventing arbitrary code execution and ensuring safer file handling.
- Class weight validation improvements: Pull requests add validation logic to ensure that keys in the
class_weightparameter and theclass_weight_to_sample_weights()function are properly normalized to integers and correspond to valid class indices. This prevents silent failures and raises clearValueErrors when invalid keys are provided, improving error handling during model training.
- OpenVINO backend enhancements: Several pull requests improve the OpenVINO backend by caching
convert_to_numpyresults to avoid repeated costly computations, replacing emulated adaptive pooling with native operations to reduce graph nodes and improve performance, and enabling dynamic input shape support fordiaganddiagonaloperations using more flexible patterns. These changes significantly boost performance and compatibility of OpenVINO integration.
- Quantization fixes and improvements: Pull requests fix the GPTQ/AWQ quantization process by restricting calibration to specific layers, preventing saving of uncalibrated layers, resolving kernel variable issues, and improving configuration serialization. Additionally, the
model.quantize()method is enhanced to provide detailed, fail-safe quantization reports, reduce warnings, and handle already-quantized layers gracefully.
- Workflow and CI improvements: Multiple pull requests update GitHub Actions workflows by adding a new 'probe' job for identity and topology collection, changing Docker images, increasing timeouts, fixing Gemini triage workflow errors by updating model versions and names, and cleaning up workflow code to remove warnings and improve maintainability. These changes enhance automation reliability and developer experience.
- Validation and error handling in Keras layers and methods: Pull requests add missing axis validation in
Glu.compute_output_specto catch invalid axis values early, introduce validation inmodel.fit()forclass_weightkeys, and fix a TraceContext error in the NNX backend by adjusting shape inference calls. These improvements increase robustness and prevent silent errors in model building and training.
- Bug fixes in numerical operations and metrics: Pull requests fix numerical boundary issues in
keras.ops.erfinvto avoid infinite values near float32 limits, correctkeras.ops.multiplyto return signed infinity instead of NaN when multiplying infinity by subnormal floats, and resolve incorrect metric values returned bymodel.evaluate()in TensorFlow graph mode due to extra iterator executions. These fixes improve numerical stability and metric accuracy.- pull/23139, pull/23320, [pull/23179](https://github.com/pull/23179]
- New features for user experience and monitoring: Pull requests add a progress bar to
FeatureSpace.adaptto visually indicate adaptation progress and introduce a backend-agnosticMemoryUsageCallbackto monitor and log CPU and GPU memory usage during training. These features enhance usability and provide valuable runtime insights.
- Type system improvements: A pull request introduces a new
keras.typesmodule providing backend-agnostic type aliases likeTensorandShapeto enable consistent static type checking and runtime type resolution across different Keras backends, improving code portability and IDE support.
- Test coverage and stability improvements: Pull requests implement missing tests such as
test_sparse_outputsforIntegerLookuplayers, fix flaky tests by seeding random number generators and improving matrix conditioning, and address review comments by moving normalization logic into the TensorFlow backend for consistency. These changes improve test reliability and code quality.
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 | 102 | 7 | 3 | 1 |
| buildwithsuhana | 60 | 17 | 0 | 0 |
| MarcosAsh | 63 | 0 | 0 | 0 |
| hertschuh | 14 | 4 | 0 | 28 |
| JyotinderSingh | 6 | 3 | 0 | 16 |
| divyashreepathihalli | 13 | 6 | 0 | 5 |
| shashaka | 15 | 1 | 0 | 2 |
| sugata100 | 14 | 4 | 0 | 0 |
| goyaladitya05 | 9 | 4 | 0 | 4 |
| MrNagabhushana-0-dev | 10 | 2 | 1 | 1 |