diff --git a/nncf/tensorflow/utils/state.py b/nncf/tensorflow/utils/state.py index 7b541068e45..bd0413171ca 100644 --- a/nncf/tensorflow/utils/state.py +++ b/nncf/tensorflow/utils/state.py @@ -17,6 +17,8 @@ from nncf.common.compression import BaseCompressionAlgorithmController +# TODO(achurkin): remove pylint ignore after 120296 ticked is fixed +# pylint: disable=abstract-method class TFCompressionState(tf.train.experimental.PythonState): """ A wrapper for `BaseCompressionAlgorithmController` that allows saving diff --git a/tests/experimental/common/__init__.py b/tests/common/experimental/__init__.py similarity index 100% rename from tests/experimental/common/__init__.py rename to tests/common/experimental/__init__.py diff --git a/tests/experimental/common/test_reducers_and_aggregators.py b/tests/common/experimental/test_reducers_and_aggregators.py similarity index 100% rename from tests/experimental/common/test_reducers_and_aggregators.py rename to tests/common/experimental/test_reducers_and_aggregators.py diff --git a/tests/experimental/common/test_statistic_collector.py b/tests/common/experimental/test_statistic_collector.py similarity index 100% rename from tests/experimental/common/test_statistic_collector.py rename to tests/common/experimental/test_statistic_collector.py diff --git a/tests/openvino/native/quantization/test_reducers_and_aggregators.py b/tests/openvino/native/quantization/test_reducers_and_aggregators.py index 4726ac61194..b34fc27a7c4 100644 --- a/tests/openvino/native/quantization/test_reducers_and_aggregators.py +++ b/tests/openvino/native/quantization/test_reducers_and_aggregators.py @@ -23,7 +23,7 @@ from nncf.openvino.statistics.collectors import OVNoopReducer from nncf.openvino.statistics.collectors import OVQuantileReducer from nncf.openvino.tensor import OVNNCFTensor -from tests.experimental.common.test_reducers_and_aggregators import TemplateTestReducersAggreagtors +from tests.common.experimental.test_reducers_and_aggregators import TemplateTestReducersAggreagtors class TestReducersAggregators(TemplateTestReducersAggreagtors): diff --git a/tests/openvino/native/test_statistic_collector.py b/tests/openvino/native/test_statistic_collector.py index d4dca76f9c5..2d52c0af4cd 100644 --- a/tests/openvino/native/test_statistic_collector.py +++ b/tests/openvino/native/test_statistic_collector.py @@ -10,7 +10,7 @@ # limitations under the License. from nncf.openvino.tensor import OVNNCFTensor -from tests.experimental.common.test_statistic_collector import TemplateTestStatisticCollector +from tests.common.experimental.test_statistic_collector import TemplateTestStatisticCollector class TestOVStatisticCollector(TemplateTestStatisticCollector): diff --git a/tests/experimental/tensorflow/__init__.py b/tests/tensorflow/experimental/__init__.py similarity index 100% rename from tests/experimental/tensorflow/__init__.py rename to tests/tensorflow/experimental/__init__.py diff --git a/tests/experimental/tensorflow/data/reference_graphs/quantized/w_sym_ch_a_asym_t/resnet50.pb b/tests/tensorflow/experimental/data/reference_graphs/quantized/w_sym_ch_a_asym_t/resnet50.pb similarity index 100% rename from tests/experimental/tensorflow/data/reference_graphs/quantized/w_sym_ch_a_asym_t/resnet50.pb rename to tests/tensorflow/experimental/data/reference_graphs/quantized/w_sym_ch_a_asym_t/resnet50.pb diff --git a/tests/experimental/tensorflow/data/reference_graphs/quantized/w_sym_t_a_sym_t/resnet50.pb b/tests/tensorflow/experimental/data/reference_graphs/quantized/w_sym_t_a_sym_t/resnet50.pb similarity index 100% rename from tests/experimental/tensorflow/data/reference_graphs/quantized/w_sym_t_a_sym_t/resnet50.pb rename to tests/tensorflow/experimental/data/reference_graphs/quantized/w_sym_t_a_sym_t/resnet50.pb diff --git a/tests/experimental/tensorflow/data/reference_graphs/quantized/w_sym_t_a_sym_t/simple.pb b/tests/tensorflow/experimental/data/reference_graphs/quantized/w_sym_t_a_sym_t/simple.pb similarity index 100% rename from tests/experimental/tensorflow/data/reference_graphs/quantized/w_sym_t_a_sym_t/simple.pb rename to tests/tensorflow/experimental/data/reference_graphs/quantized/w_sym_t_a_sym_t/simple.pb diff --git a/tests/experimental/tensorflow/test_compressed_graph.py b/tests/tensorflow/experimental/test_compressed_graph.py similarity index 94% rename from tests/experimental/tensorflow/test_compressed_graph.py rename to tests/tensorflow/experimental/test_compressed_graph.py index f2136c3aa8c..07b029b134b 100644 --- a/tests/experimental/tensorflow/test_compressed_graph.py +++ b/tests/tensorflow/experimental/test_compressed_graph.py @@ -14,8 +14,7 @@ import pytest import tensorflow as tf -from nncf.experimental.tensorflow.patch_tf import patch_tf_operations -from tests.experimental.tensorflow import test_models +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 from tests.tensorflow.test_compressed_graph import ModelDesc @@ -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 after 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/experimental/tensorflow/test_context_independence.py b/tests/tensorflow/experimental/test_context_independence.py similarity index 90% rename from tests/experimental/tensorflow/test_context_independence.py rename to tests/tensorflow/experimental/test_context_independence.py index 0ecf2c6d6f7..be150fd752d 100644 --- a/tests/experimental/tensorflow/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.experimental.tensorflow.test_compressed_graph import check_model_graph_v2 +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 after 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/experimental/tensorflow/test_keras_layer_model.py b/tests/tensorflow/experimental/test_keras_layer_model.py similarity index 86% rename from tests/experimental/tensorflow/test_keras_layer_model.py rename to tests/tensorflow/experimental/test_keras_layer_model.py index 1369b880108..32851f43fa5 100644 --- a/tests/experimental/tensorflow/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 after 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( { diff --git a/tests/experimental/tensorflow/test_models/__init__.py b/tests/tensorflow/experimental/test_models/__init__.py similarity index 90% rename from tests/experimental/tensorflow/test_models/__init__.py rename to tests/tensorflow/experimental/test_models/__init__.py index 0b4fa2fd49a..b5886131671 100644 --- a/tests/experimental/tensorflow/test_models/__init__.py +++ b/tests/tensorflow/experimental/test_models/__init__.py @@ -9,4 +9,4 @@ # See the License for the specific language governing permissions and # limitations under the License. -from tests.experimental.tensorflow.test_models.resnet import resnet_50 +from tests.tensorflow.experimental.test_models.resnet import resnet_50 diff --git a/tests/experimental/tensorflow/test_models/resnet.py b/tests/tensorflow/experimental/test_models/resnet.py similarity index 100% rename from tests/experimental/tensorflow/test_models/resnet.py rename to tests/tensorflow/experimental/test_models/resnet.py