Skip to content
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
4 changes: 3 additions & 1 deletion tests/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
import tensorflow as tf
from onnx import helper

from common import check_tf_min_version, unittest_main, requires_custom_ops, check_opset_min_version
from common import check_tf_min_version, unittest_main, requires_custom_ops, check_opset_min_version, skip_tf_versions
from tf2onnx.tf_loader import is_tf2
from backend_test_base import Tf2OnnxBackendTestBase
import tf2onnx
Expand Down Expand Up @@ -73,12 +73,14 @@ def test_keras_api(self):
self._test_keras_api(large_model=False)

@check_tf_min_version("1.15")
@skip_tf_versions(["2.0", "2.1"], "TF 2 requires 2.2 for large model freezing")
def test_keras_api_large(self):
self._test_keras_api(large_model=True)

@requires_custom_ops()
@check_tf_min_version("1.15")
@check_opset_min_version(11, "SparseToDense")
@skip_tf_versions(["2.1"], "TF 2.1 keras model doesn't work; table not initialized")
def test_keras_hashtable(self):

feature_cols = [
Expand Down
4 changes: 2 additions & 2 deletions tests/test_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -4646,7 +4646,7 @@ def func(starts, limits, deltas):
self._run_test_case(func, [_OUTPUT, _OUTPUT1], {_INPUT: starts_val, _INPUT1: limits_val,
_INPUT2: deltas_val})

@check_tf_min_version("2.0", "ragged variant needs tf 2.0")
@check_tf_min_version("2.2", "ragged variant needs tf 2.2")
@check_opset_min_version(13, "Loop over tensor sequences")
def test_ragged_to_variant(self):
splits_val = np.array([0, 3, 3, 5, 9, 10], dtype=np.int32)
Expand All @@ -4662,7 +4662,7 @@ def func(splits, rt_dense_values):
return tf.identity(y.row_splits, name=_TFOUTPUT), tf.identity(y.flat_values, name=_TFOUTPUT1)
self._run_test_case(func, [_OUTPUT, _OUTPUT1], {_INPUT: splits_val, _INPUT1: dense_vals_val})

@check_tf_min_version("2.0", "ragged variant needs tf 2.0")
@check_tf_min_version("2.2", "ragged variant needs tf 2.2")
@check_opset_min_version(13, "Loop over tensor sequences")
def test_ragged_to_variant_unknown_shape(self):
splits_val = np.array([0, 3, 3, 5, 9, 10], dtype=np.int64)
Expand Down
4 changes: 2 additions & 2 deletions tests/test_string_ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ def func(x1, x2):
self._run_test_case(func, [_OUTPUT], {_INPUT: x_val1, _INPUT1: x_val2})

@requires_custom_ops("RegexSplitWithOffsets")
@check_tf_min_version("2.0", "tensorflow_text")
@check_tf_min_version("2.3", "tensorflow_text")
def test_regex_split_with_offsets(self):
from tensorflow_text.python.ops.regex_split_ops import (
gen_regex_split_ops as lib_gen_regex_split_ops)
Expand All @@ -134,7 +134,7 @@ def _run_test_case(self, func, output_names_with_port, feed_dict, **kwargs):
use_custom_ops=True, process_args=process_args, **kwargs)

@requires_custom_ops("WordpieceTokenizer")
@check_tf_min_version("2.0", "tensorflow_text")
@check_tf_min_version("2.3", "tensorflow_text")
@unittest.skip("Not fixed yet")
def test_wordpiece_tokenizer(self):
from tensorflow_text.python.ops.wordpiece_tokenizer import (
Expand Down