diff --git a/tensorflow_probability/python/bijectors/bijector_test.py b/tensorflow_probability/python/bijectors/bijector_test.py index 2d87e67daa..fa93ed77f2 100644 --- a/tensorflow_probability/python/bijectors/bijector_test.py +++ b/tensorflow_probability/python/bijectors/bijector_test.py @@ -56,9 +56,9 @@ class BaseBijectorTest(test_util.TestCase): """Tests properties of the Bijector base-class.""" def testIsAbstract(self): - with self.assertRaisesRegexp(TypeError, - ('Can\'t instantiate abstract class Bijector ' - 'with abstract methods? __init__')): + with self.assertRaisesRegex(TypeError, + ('Can\'t instantiate abstract class Bijector ' + 'with.* abstract methods? \'?__init__')): bijector_lib.Bijector() # pylint: disable=abstract-class-instantiated def testDefaults(self): diff --git a/tensorflow_probability/python/distributions/joint_distribution_coroutine_test.py b/tensorflow_probability/python/distributions/joint_distribution_coroutine_test.py index 2ad9a97275..68bdbd2a6f 100644 --- a/tensorflow_probability/python/distributions/joint_distribution_coroutine_test.py +++ b/tensorflow_probability/python/distributions/joint_distribution_coroutine_test.py @@ -1307,7 +1307,7 @@ def dist(): warnings.simplefilter('always') with warnings.catch_warnings(record=True) as w: d.sample(seed=test_util.test_seed()) - self.assertRegexpMatches( + self.assertRegex( str(w[0].message), r'Falling back to stateful sampling for distribution #1.*' r'of type.*StatefulNormal.*component name "loc" and `dist.name` ' diff --git a/tensorflow_probability/python/mcmc/BUILD b/tensorflow_probability/python/mcmc/BUILD index 0e7b126578..a22462ad33 100644 --- a/tensorflow_probability/python/mcmc/BUILD +++ b/tensorflow_probability/python/mcmc/BUILD @@ -630,6 +630,7 @@ py_test( name = "eight_schools_hmc_eager_test", size = "medium", # Might run > 1 minute. srcs = ["eight_schools_hmc_eager_test.py"], + tags = ["no-oss-ci"], deps = [ ":eight_schools_hmc", # tensorflow dep, @@ -642,6 +643,7 @@ py_test( name = "eight_schools_hmc_graph_test", size = "medium", # Might run > 1 minute. srcs = ["eight_schools_hmc_graph_test.py"], + tags = ["no-oss-ci"], deps = [ ":eight_schools_hmc", # tensorflow dep, diff --git a/tensorflow_probability/python/mcmc/metropolis_hastings_test.py b/tensorflow_probability/python/mcmc/metropolis_hastings_test.py index 0aa4f278ff..59a2f179af 100644 --- a/tensorflow_probability/python/mcmc/metropolis_hastings_test.py +++ b/tensorflow_probability/python/mcmc/metropolis_hastings_test.py @@ -385,10 +385,10 @@ def testWarnings(self): _, _ = mh.one_step(current_state, init_kernel_results, seed=test_util.test_seed()) w = sorted(w, key=lambda w: str(w.message)) - self.assertRegexpMatches( + self.assertRegex( str(w[0].message), r'`TransitionKernel` is already calibrated') - self.assertRegexpMatches( + self.assertRegex( str(w[1].message), r'`TransitionKernel` does not have a `log_acceptance_correction`') diff --git a/testing/run_tfp_test.sh b/testing/run_tfp_test.sh index ce96c2840c..15c1cee650 100755 --- a/testing/run_tfp_test.sh +++ b/testing/run_tfp_test.sh @@ -66,6 +66,7 @@ bazel test \ --test_timeout 300,450,1200,3600 \ --test_tag_filters="-gpu,-requires-gpu-nvidia,-notap,-no-oss-ci,-tf2-broken,-tf2-kokoro-broken" \ --test_env=TFP_HYPOTHESIS_MAX_EXAMPLES=2 \ + --test_env=WRAPT_DISABLE_EXTENSIONS=true \ --action_env=PATH \ --action_env=LD_LIBRARY_PATH \ --test_output=errors \