Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Tests][Bug] Experemental tests moved to backend directory to run them properly by make command #2127

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions nncf/tensorflow/utils/state.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
2 changes: 1 addition & 1 deletion tests/openvino/native/test_statistic_collector.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 = [
Expand Down Expand Up @@ -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()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -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")}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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