diff --git a/tensorflow_probability/python/internal/hypothesis_testlib.py b/tensorflow_probability/python/internal/hypothesis_testlib.py
index <HASH>..<HASH> 100644
--- a/tensorflow_probability/python/internal/hypothesis_testlib.py
+++ b/tensorflow_probability/python/internal/hypothesis_testlib.py
@@ -686,6 +686,7 @@ def no_tf_rank_errors():
                             r'rank > (8|9|[1-9][0-9]+).')
   does_not_work_pat = (r'does not work on tensors with '
                        r'more than (8|9|[1-9][0-9]+) dimensions')
+  only_support_pat = r'only support up to 7 input dimensions'
   pat_1 = _rank_broadcasting_error_pattern(1, 6)
   pat_2 = _rank_broadcasting_error_pattern(6, 1)
   try:
@@ -710,6 +711,14 @@ def no_tf_rank_errors():
       hp.assume(False)
     else:
       raise
+  except tf.errors.InvalidArgumentError as e:
+    msg = str(e)
+    if re.search(only_support_pat, msg):
+      # We asked some TF op (Argmin/Argmax/...) to operate on a Tensor of
+      # rank >= 8.
+      hp.assume(False)
+    else:
+      raise
   except ValueError as e:
     msg = str(e)
     if re.search(does_not_work_pat, msg):
Catch another class of "rank not supported" errors from Argmin/Argmax.

PiperOrigin-RevId: <I>