Skip to content

Commit

Permalink
use TF 2.15 in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
amaiya committed Apr 5, 2024
1 parent d226b2c commit e733c41
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
pip install -U pip wheel
pip install -e .
pip install ipython
pip install tensorflow_cpu
pip install tensorflow_cpu==2.15.1
pip install jinja2==3.0.3 # eli5 dep issue
pip install https://github.com/amaiya/eli5-tf/archive/refs/heads/master.zip
- name: Show installed pip dependencies
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ learner.evaluate(tst, class_names=preproc.get_classes())

1. Make sure pip is up-to-date with: `pip install -U pip`

2. [Install TensorFlow 2](https://www.tensorflow.org/install) if it is not already installed (e.g., `pip install tensorflow==2.15.1`). Note that `tensorflow>=2.16` is not yet supported due to breaking changes in Keras 3.
2. [Install TensorFlow 2](https://www.tensorflow.org/install) if it is not already installed (e.g., `pip install tensorflow==2.15.1`).

3. Install *ktrain*: `pip install ktrain`

Expand All @@ -322,7 +322,7 @@ The above should be all you need on Linux systems and cloud computing environmen

#### Notes about TensorFlow Versions
- As of `tensorflow>=2.11`, you must only use legacy optimizers such as `tf.keras.optimizers.legacy.Adam`. The newer `tf.keras.optimizers.Optimizer` base class is not supported at this time. For instance, when using TensorFlow 2.11 and above, please use `tf.keras.optimzers.legacy.Adam()` instead of the string `"adam"` in `model.compile`. **ktrain** does this automatically when using out-of-the-box models (e.g., models from the `transformers` library).
- On Google Colab, if you receive an error such as `model is not an instance of Model`, ensure the version of `tf_keras` installed exactly matches the version of Tensorflow (e.g., `pip install tensorflow==2.15.1 tf_keras==2.15.1`).
- Due to breaking changes in TensorFlow 2.16, you will need to install the `tf_keras` package and also set the environment variable `TF_USE_LEGACY_KERAS=True` before importing **ktrain**.

#### Additional Notes About Installation

Expand Down

0 comments on commit e733c41

Please sign in to comment.