From 292034fa616bd3840556b4ae4af6a04cb15a23be Mon Sep 17 00:00:00 2001 From: dlyakhov Date: Tue, 12 Sep 2023 11:09:14 +0200 Subject: [PATCH] Experimental TF tests are skipped --- nncf/tensorflow/utils/state.py | 1 + tests/tensorflow/experimental/test_compressed_graph.py | 6 ++++-- tests/tensorflow/experimental/test_context_independence.py | 7 +++++-- tests/tensorflow/experimental/test_keras_layer_model.py | 6 ++++-- 4 files changed, 14 insertions(+), 6 deletions(-) diff --git a/nncf/tensorflow/utils/state.py b/nncf/tensorflow/utils/state.py index 7b541068e45..6520e92f01d 100644 --- a/nncf/tensorflow/utils/state.py +++ b/nncf/tensorflow/utils/state.py @@ -17,6 +17,7 @@ from nncf.common.compression import BaseCompressionAlgorithmController +# pylint: disable=abstract-method class TFCompressionState(tf.train.experimental.PythonState): """ A wrapper for `BaseCompressionAlgorithmController` that allows saving diff --git a/tests/tensorflow/experimental/test_compressed_graph.py b/tests/tensorflow/experimental/test_compressed_graph.py index c67d5cf1606..834595770e1 100644 --- a/tests/tensorflow/experimental/test_compressed_graph.py +++ b/tests/tensorflow/experimental/test_compressed_graph.py @@ -14,7 +14,6 @@ import pytest import tensorflow as tf -from nncf.experimental.tensorflow.patch_tf import patch_tf_operations from tests.tensorflow.experimental import test_models from tests.tensorflow.helpers import create_compressed_model_and_algo_for_test from tests.tensorflow.test_compressed_graph import QUANTIZERS @@ -27,7 +26,9 @@ from tests.tensorflow.test_compressed_graph import prepare_and_check_graph_def from tests.tensorflow.test_compressed_graph import prepare_and_check_nx_graph -patch_tf_operations() +# TODO(achurkin): enable afte 120296 ticked is fixed +# from nncf.experimental.tensorflow.patch_tf import patch_tf_operations +# patch_tf_operations() MODELS = [ @@ -75,6 +76,7 @@ def check_model_graph_v2(compressed_model, ref_graph_filename, ref_graph_dir, re prepare_and_check_nx_graph(compressed_graph, graph_path, ref_graph_exist, graph_to_layer_var_names_map) +@pytest.mark.skip(reason="ticket 120296") @pytest.mark.parametrize("desc", MODELS, ids=MODELS_IDS) def test_quantize_network_v2(desc: ModelDesc, _quantization_case_config_v2: QuantizeTestCaseConfiguration): model = desc.model_builder() diff --git a/tests/tensorflow/experimental/test_context_independence.py b/tests/tensorflow/experimental/test_context_independence.py index 4a0ca9678c7..6abecef6c78 100644 --- a/tests/tensorflow/experimental/test_context_independence.py +++ b/tests/tensorflow/experimental/test_context_independence.py @@ -11,16 +11,18 @@ import os +import pytest import tensorflow as tf -from nncf.experimental.tensorflow.patch_tf import patch_tf_operations from tests.tensorflow.experimental.test_compressed_graph import check_model_graph_v2 from tests.tensorflow.helpers import create_compressed_model_and_algo_for_test from tests.tensorflow.test_compressed_graph import QuantizeTestCaseConfiguration from tests.tensorflow.test_compressed_graph import create_test_name from tests.tensorflow.test_compressed_graph import get_basic_quantization_config -patch_tf_operations() +# TODO(achurkin): enable afte 120296 ticked is fixed +# from nncf.experimental.tensorflow.patch_tf import patch_tf_operations +# patch_tf_operations() class ModelWithSharedLayer(tf.keras.Model): @@ -51,6 +53,7 @@ def get_config(self): raise NotImplementedError +@pytest.mark.skip(reason="ticket 120296") def test_context_independence(): params = {"activations": ("symmetric", "per_tensor"), "weights": ("symmetric", "per_tensor")} diff --git a/tests/tensorflow/experimental/test_keras_layer_model.py b/tests/tensorflow/experimental/test_keras_layer_model.py index 1369b880108..4d5a159e415 100644 --- a/tests/tensorflow/experimental/test_keras_layer_model.py +++ b/tests/tensorflow/experimental/test_keras_layer_model.py @@ -14,12 +14,14 @@ import tensorflow_hub as hub from nncf import NNCFConfig -from nncf.experimental.tensorflow.patch_tf import patch_tf_operations from tests.tensorflow.helpers import create_compressed_model_and_algo_for_test -patch_tf_operations() +# TODO(achurkin): enable afte 120296 ticked is fixed +# from nncf.experimental.tensorflow.patch_tf import patch_tf_operations +# patch_tf_operations() +@pytest.mark.skip(reason="ticket 120296") def test_keras_layer_model(): nncf_config = NNCFConfig( {