Skip to content

Commit

Permalink
[TF FE] Extend StringSplitV2 layer tests and fix warnings (openvinoto…
Browse files Browse the repository at this point in the history
…olkit#24148)

**Details:** Extend StringSplitV2 layer tests and fix warnings. Merge
after openvinotoolkit/openvino_tokenizers#121

**Ticket:** TBD

---------

Signed-off-by: Kazantsev, Roman <[email protected]>
  • Loading branch information
rkazants authored Apr 21, 2024
1 parent 254296e commit 5a18bc1
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion tests/layer_tests/tensorflow_tests/test_tf_Equal.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ def _prepare_input(self, inputs_info):
x_shape = inputs_info['x:0']
y_shape = inputs_info['y:0']
inputs_data = {}
strings_dictionary = ['UPPER<>CASE SENTENCE', 'lower case\n\s sentence', ' UppEr LoweR CAse SENtence \t\n',
strings_dictionary = ['UPPER<>CASE SENTENCE', 'lower case\n sentence', ' UppEr LoweR CAse SENtence \t\n',
' some sentence', 'another sentence HERE ']
inputs_data['x:0'] = rng.choice(strings_dictionary, x_shape)
inputs_data['y:0'] = rng.choice(strings_dictionary, y_shape)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def create_static_regex_replace_net(self, input_shape, pattern, rewrite, replace
return tf_net, ref_net

@pytest.mark.parametrize('input_shape', [[], [2], [3, 4], [1, 3, 2]])
@pytest.mark.parametrize('pattern', ['(\s)|(-)', '[A-Z]{2,}', '^\s+|\s+$'])
@pytest.mark.parametrize('pattern', [r'(\s)|(-)', r'[A-Z]{2,}', r'^\s+|\s+$'])
@pytest.mark.parametrize('rewrite', ['', 'replacement word'])
@pytest.mark.parametrize('replace_global', [None, True, False])
@pytest.mark.precommit
Expand Down
4 changes: 2 additions & 2 deletions tests/layer_tests/tensorflow_tests/test_tf_StringSplitV2.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def _prepare_input(self, inputs_info):
assert 'input:0' in inputs_info
input_shape = inputs_info['input:0']
inputs_data = {}
strings_dictionary = ['UPPER<>CASE SENTENCE', 'lower case\n\s sentence', ' UppEr LoweR CAse SENtence \t\n',
strings_dictionary = ['UPPER<>CASE SENTENCE', 'lower case\n sentence', ' UppEr LoweR CAse SENtence \t\n',
' some sentence', 'another sentence HERE ']
inputs_data['input:0'] = rng.choice(strings_dictionary, input_shape)
return inputs_data
Expand All @@ -39,7 +39,7 @@ def create_string_split_v2_net(self, input_shape, sep, maxsplit):

@pytest.mark.parametrize('input_shape', [[1], [2], [5]])
@pytest.mark.parametrize('sep', ['', '<>'])
@pytest.mark.parametrize('maxsplit', [None, -1])
@pytest.mark.parametrize('maxsplit', [None, -1, 5, 10])
@pytest.mark.precommit
@pytest.mark.nightly
@pytest.mark.xfail(condition=platform.system() in ('Darwin', 'Linux') and platform.machine() in ['arm', 'armv7l',
Expand Down

0 comments on commit 5a18bc1

Please sign in to comment.