From 530b9b5355cdad7f37ca12920444256f0160420e Mon Sep 17 00:00:00 2001 From: Roman Kazantsev Date: Tue, 27 Feb 2024 22:55:07 +0400 Subject: [PATCH] [TF FE] Switch on layer tests for StaticRegexReplace (#23113) **Details:** Switch on layer tests for StaticRegexReplace. Merge after https://github.com/openvinotoolkit/openvino_tokenizers/pull/41 **Tickets:** 132674 --------- Signed-off-by: Kazantsev, Roman --- .../test_tf_StaticRegexReplace.py | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/tests/layer_tests/tensorflow_tests/test_tf_StaticRegexReplace.py b/tests/layer_tests/tensorflow_tests/test_tf_StaticRegexReplace.py index f04e5e1112ee0b..af7fd794c71843 100644 --- a/tests/layer_tests/tensorflow_tests/test_tf_StaticRegexReplace.py +++ b/tests/layer_tests/tensorflow_tests/test_tf_StaticRegexReplace.py @@ -1,6 +1,8 @@ # Copyright (C) 2018-2024 Intel Corporation # SPDX-License-Identifier: Apache-2.0 +import platform + import numpy as np import pytest import tensorflow as tf @@ -11,12 +13,11 @@ class TestStaticRegexReplace(CommonTFLayerTest): def _prepare_input(self, inputs_info): - assert 'input' in inputs_info - input_shape = inputs_info['input'] + assert 'input:0' in inputs_info + input_shape = inputs_info['input:0'] inputs_data = {} - strings_dictionary = ['UPPER CASE SENTENCE', 'lower case sentence', ' UppEr LoweR CAse SENtence \t\n', ' ', - 'Oferta polska', 'Предложение по-РУССки', '汉语句子'] - inputs_data['input'] = rng.choice(strings_dictionary, input_shape) + strings_dictionary = ['UPPER CASE SENTENCE', 'lower case sentence', ' UppEr LoweR CAse SENtence \t\n', ' '] + inputs_data['input:0'] = rng.choice(strings_dictionary, input_shape) return inputs_data def create_static_regex_replace_net(self, input_shape, pattern, rewrite, replace_global): @@ -39,7 +40,10 @@ def create_static_regex_replace_net(self, input_shape, pattern, rewrite, replace @pytest.mark.parametrize('replace_global', [None, True, False]) @pytest.mark.precommit_tf_fe @pytest.mark.nightly - @pytest.mark.xfail(reason='132674 - Add support of StaticRegexReplace') + @pytest.mark.xfail(condition=platform.system() in ('Darwin', 'Linux') and platform.machine() in ['arm', 'armv7l', + 'aarch64', + 'arm64', 'ARM64'], + reason='Ticket - 126314, 132699') def test_static_regex_replace(self, input_shape, pattern, rewrite, replace_global, ie_device, precision, ir_version, temp_dir, use_legacy_frontend):