tensorflow / tensorflow/probability
Gamma sampler raises a UserWarning in recent nightly versions
Nobody has claimed this yet.
- Dominant language
- Jupyter Notebook
- Stars
- 4.4k
- Forks
- 1.1k
- PR merge metrics
- No merged PRs in 30d
Description
In tfp-nightly-dev20200831, drawing a sample from Gamma distribution raises a warning
UserWarning: Explicitly requested dtype <class 'jax.numpy.lax_numpy.float64'> requested in astype is not available, and will be truncated to dtype float32. To enable more dtypes, set the jax_enable_x64 configuration option or the JAX_ENABLE_X64 shell environment variable.
from tensorflow_probability.substrates.jax import distributions as tfd
from jax import random
tfd.Gamma(1, 1).sample(seed=random.PRNGKey(0))
This does not happen in dev20200810 version, so I think it is a regression.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the warning with the supplied Gamma sampling snippet in tfp-nightly-dev20200831 and compare it with dev20200810. Trace the JAX Gamma sampling path to identify the regression; done means the example runs without this UserWarning while preserving sampling behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- machine-learning
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100