You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The minimum version of tensorflow available in Python 3.12 is tensorflow~=2.16, which is not available below python 3.12. The version of Keras ported in tf>=2.16 (keras 3) contains backwards incompatible API changes, including methods for saving and loading models. In order to maintain compatibility across versions of python, at least as far as loading pre-built neural networks is concerned, a possible solution is to simply save 2 versions of each model: one that can be loaded in tf<=2.15 (python 3.10, 3.11), and a newer one that can be loaded using tf>=2.16.
The main drawback to this is an increase in the size of the package installation, since the pre-built networks are included as part of the package data, specifically for use in pipeline applications. In the future, once the pipelines are using python 3.12 or higher, the older versions of the models can be removed.
The text was updated successfully, but these errors were encountered:
Made the executive decision to bump up minimum version of tensorflow to 2.16.1, re-saved all models using Keras 3 / tf 2.16.1. Was able to load these in python 3.10, 3.11, 3.12 so no api changes required. Minor revisions to internal methods that have been dropped such as "model.name_scope()".
Tests are passing on Python 3.10, 3.11, 3.12 using tensorflow 2.16.1. An additional revision was needed relating to the batch generator for stacked ensemble model inputs. Tensorflow didn't like the list format of the stacked inputs. Changing this to a tuple fixed it.
Issue JP-3615 was created on JIRA by Ru Kein:
The minimum version of tensorflow available in Python 3.12 is tensorflow~=2.16, which is not available below python 3.12. The version of Keras ported in tf>=2.16 (keras 3) contains backwards incompatible API changes, including methods for saving and loading models. In order to maintain compatibility across versions of python, at least as far as loading pre-built neural networks is concerned, a possible solution is to simply save 2 versions of each model: one that can be loaded in tf<=2.15 (python 3.10, 3.11), and a newer one that can be loaded using tf>=2.16.
The main drawback to this is an increase in the size of the package installation, since the pre-built networks are included as part of the package data, specifically for use in pipeline applications. In the future, once the pipelines are using python 3.12 or higher, the older versions of the models can be removed.
The text was updated successfully, but these errors were encountered: