diff --git a/.github/workflows/python-package-cron.yml b/.github/workflows/python-package-cron.yml index e982e62..673fbef 100644 --- a/.github/workflows/python-package-cron.yml +++ b/.github/workflows/python-package-cron.yml @@ -19,7 +19,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: [3.7, 3.8, 3.9, '3.10'] + python-version: [3.8, 3.9, '3.10', '3.11'] tensorflow: [current, pre] steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/python-package-up-to-TF2.11.yml b/.github/workflows/python-package-up-to-TF2.11.yml new file mode 100644 index 0000000..6611be4 --- /dev/null +++ b/.github/workflows/python-package-up-to-TF2.11.yml @@ -0,0 +1,49 @@ +# This workflow will install Python dependencies, run tests and lint with a variety of Python versions +# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions + +name: Python package + +on: + push: + branches: [ master ] + pull_request: + +env: + TF_KERAS_VIS_MAX_STEPS: 3 + +jobs: + build: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + python-version: [3.7, 3.8, 3.9, '3.10'] + tensorflow: [2.6.0, 2.7.0, 2.8.0, 2.9.0, '2.10.0', '2.11.0'] + exclude: + - python-version: '3.10' + tensorflow: 2.6.0 + - python-version: '3.10' + tensorflow: 2.7.0 + steps: + - uses: actions/checkout@v3 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + - name: Upgrade pip and Install dependencies + run: | + python -m pip install --upgrade pip + python -m pip install --upgrade -e .[develop,examples] tensorflow~=${{ matrix.tensorflow }} keras~=${{ matrix.tensorflow }} + - name: Test with pytest + run: | + pytest -n auto --dist loadscope + timeout-minutes: 60 + - name: Test attentions.ipynb + run: | + jupyter-nbconvert --ExecutePreprocessor.timeout=600 --to notebook --execute examples/attentions.ipynb + - name: Test visualize_dense_layer.ipynb + run: | + jupyter-nbconvert --ExecutePreprocessor.timeout=600 --to notebook --execute examples/visualize_dense_layer.ipynb + - name: Test visualize_conv_filters.ipynb + run: | + jupyter-nbconvert --ExecutePreprocessor.timeout=600 --to notebook --execute examples/visualize_conv_filters.ipynb diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 6611be4..7ecb10b 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -17,13 +17,8 @@ jobs: strategy: fail-fast: false matrix: - python-version: [3.7, 3.8, 3.9, '3.10'] - tensorflow: [2.6.0, 2.7.0, 2.8.0, 2.9.0, '2.10.0', '2.11.0'] - exclude: - - python-version: '3.10' - tensorflow: 2.6.0 - - python-version: '3.10' - tensorflow: 2.7.0 + python-version: [3.8, 3.9, '3.10', '3.11'] + tensorflow: ['2.12.0'] steps: - uses: actions/checkout@v3 - name: Set up Python ${{ matrix.python-version }} diff --git a/CITATION.cff b/CITATION.cff index 13c6305..1c393ed 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -8,8 +8,8 @@ title: "tf-keras-vis" repository: "https://github.com/keisen/tf-keras-vis" url: "https://keisen.github.io/tf-keras-vis-docs/" type: software -version: 0.8.4 -date-released: "2022-11-25" +version: 0.8.5 +date-released: "2023-05-16" license-url: "https://github.com/keisen/tf-keras-vis/blob/master/LICENSE" references: - authors: diff --git a/README.md b/README.md index 07a779e..3d87e22 100644 --- a/README.md +++ b/README.md @@ -178,8 +178,8 @@ But please notice that tf-keras-vis APIs does NOT have compatibility with keras- <!-- sec.5 --> -* Python 3.7-3.10 -* tensorflow>=2.0.4 +* Python 3.7+ +* Tensorflow 2.0+ <!-- ./sec.5 --> diff --git a/VERSION b/VERSION index fcbb537..bbde4be 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.8.4 \ No newline at end of file +0.8.5 \ No newline at end of file diff --git a/setup.py b/setup.py index 17bdf67..dbd8dde 100644 --- a/setup.py +++ b/setup.py @@ -28,6 +28,7 @@ "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", "Topic :: Education", "Topic :: Scientific/Engineering", "Topic :: Scientific/Engineering :: Artificial Intelligence", diff --git a/tf_keras_vis/utils/model_modifiers.py b/tf_keras_vis/utils/model_modifiers.py index a816334..27382e1 100644 --- a/tf_keras_vis/utils/model_modifiers.py +++ b/tf_keras_vis/utils/model_modifiers.py @@ -4,7 +4,9 @@ import tensorflow as tf from packaging.version import parse as version -if version(tf.version.VERSION) >= version("2.9.0rc0"): +if version(tf.version.VERSION) >= version("2.13.0rc0"): + from keras.src.layers.convolutional.base_conv import Conv +elif version(tf.version.VERSION) >= version("2.9.0rc0"): from keras.layers.convolutional.base_conv import Conv elif version(tf.version.VERSION) < version("2.6.0rc0"): from tensorflow.python.keras.layers.convolutional import Conv