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

Support custom prng key #1642

Merged
merged 4 commits into from
Sep 21, 2023
Merged

Support custom prng key #1642

merged 4 commits into from
Sep 21, 2023

Conversation

fehiepsi
Copy link
Member

Resolves #1641

@fehiepsi
Copy link
Member Author

cc @junpenglao

@martinjankowiak
Copy link
Collaborator

lgtm i take it these are all expected?

  /opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/numpyro/contrib/einstein/steinvi.py:13: DeprecationWarning: jax.random.KeyArray is deprecated. Use jax.Array for annotations, and jax.dtypes.issubdtype(arr, jax.dtypes.prng_key) for runtime detection of typed prng keys.
    from jax.random import KeyArray

test/contrib/test_enum_elbo.py: 60 warnings
  /opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/numpyro/ops/provenance.py:37: DeprecationWarning: jax.linear_util.wrap_init is deprecated. Use jax.extend.linear_util.wrap_init instead.
    wrapped_fun, out_tree = flatten_fun(lu.wrap_init(fn), in_tree)

test/contrib/test_module.py::test_flax_module
  /opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/flax/linen/module.py:77: DeprecationWarning: jax.random.KeyArray is deprecated. Use jax.Array for annotations, and jax.dtypes.issubdtype(arr, jax.dtypes.prng_key) for runtime detection of typed prng keys.
    KeyArray = Union[jax.Array, jax.random.KeyArray]  # pylint: disable=invalid-name

test/contrib/test_module.py::test_flax_module
  /opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/flax/linen/recurrent.py:45: DeprecationWarning: jax.random.KeyArray is deprecated. Use jax.Array for annotations, and jax.dtypes.issubdtype(arr, jax.dtypes.prng_key) for runtime detection of typed prng keys.
    PRNGKey = jax.random.KeyArray

test/contrib/test_module.py::test_flax_module
  /opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/flax/linen/stochastic.py:28: DeprecationWarning: jax.random.KeyArray is deprecated. Use jax.Array for annotations, and jax.dtypes.issubdtype(arr, jax.dtypes.prng_key) for runtime detection of typed prng keys.
    KeyArray = Union[jax.Array, jax.random.KeyArray]

test/contrib/test_module.py::test_haiku_module
  /opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/haiku/_src/dot.py:163: DeprecationWarning: jax.linear_util.transformation is deprecated. Use jax.extend.linear_util.transformation instead.
    @jax.linear_util.transformation```

@fehiepsi
Copy link
Member Author

Thanks, the first two warnings can be fixed. The rest needs to be fixed upstream on flax/haiku.

@fehiepsi fehiepsi merged commit 115c4d3 into pyro-ppl:master Sep 21, 2023
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support custom prng key
2 participants