Skip to content

Commit b1cebf6

Browse files
arnoegwtensorflower-gardener
authored andcommitted
Clarify the use of tf-keras with TF-GNN 1.0 and possible later versions.
PiperOrigin-RevId: 904296795
1 parent 51683ad commit b1cebf6

2 files changed

Lines changed: 11 additions & 5 deletions

File tree

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,11 @@ pip install tensorflow-gnn
5858
For installation from source, see our [Developer
5959
Guide](tensorflow_gnn/docs/guide/developer.md).
6060

61-
Key platform requirements:
61+
Key platform requirements (as of release 1.0):
6262

6363
* TensorFlow 2.12 or higher, and any GPU drivers it needs
6464
[[instructions](https://www.tensorflow.org/install)].
65+
(Future releases will raise the required TF version.)
6566
* Keras v2, as traditionally included with TensorFlow 2.x.
6667
TF-GNN does not work with the new multi-backend Keras v3.<br/>
6768
**Users of TF2.16+ must also `pip install tf-keras` and set

tensorflow_gnn/docs/guide/keras_version.md

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,21 +52,26 @@ it is a separate package with separate static registries and class hierarchies,
5252
so it does not mix well with user code that uses `import keras` and objects
5353
from `keras.*`. Hence we recommend to not use `keras.*` in user code.
5454
55+
This advice applies to TF-GNN up to release 1.0. Future releases of TF-GNN
56+
will not support TensorFlow 2.15 anymore.
57+
5558
### For TensorFlow 2.12, 2.13 and 2.14
5659
5760
Nothing special is required: These TF 2.x versions depend on the matching
5861
version of Keras 2.x and define `tf.keras` with it. The environment
5962
variable `TF_USE_LEGACY_KERAS` is ignored.
6063
64+
This advice applies to TF-GNN up to release 1.0. Future releases of TF-GNN
65+
will not support these old TensorFlow versions anymore.
6166
6267
## Writing compatible code
6368
6469
### For all supported TensorFlow versions
6570
66-
For use of TF-GNN under any supported version of TensorFlow, we recommend that
67-
user code does `import tensorflow as tf` and uses the Keras API at `tf.keras.*`.
68-
The installation instructions above make sure this is Keras v2, as required
69-
by the TF-GNN library itself.
71+
For use of TF-GNN 1.0 under any supported version of TensorFlow (including those
72+
before TF2.16), we recommend that user code does `import tensorflow as tf` and
73+
uses the Keras API at `tf.keras.*`. The installation instructions above make
74+
sure this is Keras v2, as required by the TF-GNN library itself.
7075
7176
Do not import and use `keras.*` directly: it will break for TF 2.16 and above.
7277

0 commit comments

Comments
 (0)