From d8b43624f5a00dc77c8f6408c1ad460990ac5c02 Mon Sep 17 00:00:00 2001 From: Roman Kazantsev Date: Fri, 22 Mar 2024 00:39:39 +0400 Subject: [PATCH] [TF FE] Support TensorFlow 2.16 (#23562) **Details:** Support TensorFlow 2.16 **Ticket:** TBD --------- Signed-off-by: Kazantsev, Roman --- .github/workflows/job_tensorflow_models_tests.yml | 7 ++++++- src/bindings/python/constraints.txt | 2 +- tests/constraints.txt | 2 +- .../tensorflow/test_tf_hub_api_notebooks.py | 1 + tools/mo/requirements_tf.txt | 2 +- tools/mo/requirements_tf2.txt | 2 +- 6 files changed, 11 insertions(+), 5 deletions(-) diff --git a/.github/workflows/job_tensorflow_models_tests.yml b/.github/workflows/job_tensorflow_models_tests.yml index c89370851ad24c..51f9852fba0858 100644 --- a/.github/workflows/job_tensorflow_models_tests.yml +++ b/.github/workflows/job_tensorflow_models_tests.yml @@ -114,7 +114,12 @@ jobs: - name: TensorFlow Models Tests - TF FE run: | export PYTHONPATH=${MODEL_HUB_TESTS_INSTALL_DIR}:$PYTHONPATH - python3 -m pytest ${MODEL_HUB_TESTS_INSTALL_DIR}/tensorflow/ -m ${{ inputs.model_scope }} --html=${INSTALL_TEST_DIR}/TEST-tf_fe_models_${{ inputs.model_scope }}.html --self-contained-html -v + python3 -m pytest ${MODEL_HUB_TESTS_INSTALL_DIR}/tensorflow/test_tf_convert_model.py -m ${{ inputs.model_scope }} \ + --html=${INSTALL_TEST_DIR}/TEST-tf_fe_models_${{ inputs.model_scope }}.html --self-contained-html -v + # decouple notebook tests due to GitHub issue in tensorflow_hub https://github.com/tensorflow/hub/issues/903 + # and use WA to switch to (legacy) Keras 2 + TF_USE_LEGACY_KERAS=1 python3 -m pytest ${MODEL_HUB_TESTS_INSTALL_DIR}/tensorflow/test_tf_hub_api_notebooks.py -m ${{ inputs.model_scope }} \ + --html=${INSTALL_TEST_DIR}/TEST-tf_fe_models_notebooks_${{ inputs.model_scope }}.html --self-contained-html -v env: TEST_DEVICE: CPU diff --git a/src/bindings/python/constraints.txt b/src/bindings/python/constraints.txt index e6acbdb33dea1d..1b8c6177a26459 100644 --- a/src/bindings/python/constraints.txt +++ b/src/bindings/python/constraints.txt @@ -19,7 +19,7 @@ patchelf<=0.17.2.1 # Frontends docopt~=0.6.2 paddlepaddle==2.5.2 -tensorflow>=1.15.5,<2.16.0 +tensorflow>=1.15.5,<2.17.0 six~=1.16.0 protobuf>=3.18.1,<4.0.0 onnx==1.15.0 diff --git a/tests/constraints.txt b/tests/constraints.txt index e2973a01323042..f3569f126cc3fb 100644 --- a/tests/constraints.txt +++ b/tests/constraints.txt @@ -13,7 +13,7 @@ sympy>=1.10 wheel>=0.38.1 defusedxml>=0.7.1 fastjsonschema~=2.17.1 -tensorflow>=2.5,<2.16.0 +tensorflow>=2.5,<2.17.0 test-generator==0.1.2 requests>=2.25.1 opencv-python>=4.5 diff --git a/tests/model_hub_tests/tensorflow/test_tf_hub_api_notebooks.py b/tests/model_hub_tests/tensorflow/test_tf_hub_api_notebooks.py index b04f6c15d5c5d4..5c34d8125b9c6d 100644 --- a/tests/model_hub_tests/tensorflow/test_tf_hub_api_notebooks.py +++ b/tests/model_hub_tests/tensorflow/test_tf_hub_api_notebooks.py @@ -5,6 +5,7 @@ import tensorflow as tf import tensorflow_hub as hub from models_hub_common.test_convert_model import TestConvertModel + from utils import get_input_info diff --git a/tools/mo/requirements_tf.txt b/tools/mo/requirements_tf.txt index e9ff04cc7e6772..e32f7e076bc1d1 100644 --- a/tools/mo/requirements_tf.txt +++ b/tools/mo/requirements_tf.txt @@ -1,5 +1,5 @@ -c ../constraints.txt -tensorflow>=1.15.5,<2.16.0 +tensorflow>=1.15.5,<2.17.0 numpy>=1.16.6,<1.26 networkx defusedxml diff --git a/tools/mo/requirements_tf2.txt b/tools/mo/requirements_tf2.txt index d5825581a5549c..3aa9a1f82e510b 100644 --- a/tools/mo/requirements_tf2.txt +++ b/tools/mo/requirements_tf2.txt @@ -1,5 +1,5 @@ -c ../constraints.txt -tensorflow>=2.5,<2.16.0 +tensorflow>=2.5,<2.17.0 numpy>=1.16.6,<1.26 networkx defusedxml