Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

filter out tests waiting for next tfp release #1817

Merged
merged 7 commits into from
Jun 22, 2024
Merged
Show file tree
Hide file tree
Changes from 3 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
7 changes: 7 additions & 0 deletions numpyro/infer/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Copyright Contributors to the Pyro project.
# SPDX-License-Identifier: Apache-2.0

import warnings

from numpyro.infer.barker import BarkerMH
from numpyro.infer.elbo import (
ELBO,
Expand Down Expand Up @@ -29,6 +31,11 @@

from . import autoguide, reparam

warnings.filterwarnings(
"ignore", message=".*Attempting to hash a tracer.*", category=FutureWarning
)
fehiepsi marked this conversation as resolved.
Show resolved Hide resolved


__all__ = [
"AIES",
"autoguide",
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ known-jax = ["flax", "haiku", "jax", "optax", "tensorflow_probability"]
addopts = ["-v", "--color=yes"]
filterwarnings = [
"error",
"ignore:.*Attempting to hash a tracer:FutureWarning",
"ignore:numpy.ufunc size changed,:RuntimeWarning",
"ignore:Using a non-tuple sequence:FutureWarning",
"ignore:jax.tree_structure is deprecated:FutureWarning",
Expand Down
4 changes: 4 additions & 0 deletions test/contrib/test_tfp.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ def f(x):
assert res.scale == 1


@pytest.mark.skip(reason="Waiting for the next tfp release")
@pytest.mark.filterwarnings("ignore:can't resolve package")
def test_transformed_distributions():
from tensorflow_probability.substrates.jax import (
Expand Down Expand Up @@ -113,6 +114,7 @@ def make_kernel_fn(target_log_prob_fn):
)


@pytest.mark.skip(reason="Waiting for the next tfp release")
@pytest.mark.parametrize(
"kernel, kwargs",
[
Expand Down Expand Up @@ -243,6 +245,7 @@ def test_sample_tfp_distributions():

# test that sampling from unwrapped tensorflow_probability distributions works as
# expected using numpyro.sample primitive
@pytest.mark.skip(reason="Waiting for the next tfp release")
@pytest.mark.parametrize(
"dist,args",
[
Expand Down Expand Up @@ -270,6 +273,7 @@ def test_sample_unwrapped_tfp_distributions(dist, args):


# test mixture distributions
@pytest.mark.skip(reason="Waiting for the next tfp release")
def test_sample_unwrapped_mixture_same_family():
from tensorflow_probability.substrates.jax import distributions as tfd

Expand Down
Loading