tensorflow / tensorflow/probability
copy.deepcopy TransformedDistribution fails
Open
Nobody has claimed this yet.
- Dominant language
- Jupyter Notebook
- Stars
- 4.4k
- Forks
- 1.1k
- PR merge metrics
- No merged PRs in 30d
Description
import tensorflow_probability as tfp
import copy
tfd =tfp.distributions
tfb = tfp.bijectors
log_normal = tfd.TransformedDistribution(
distribution=tfd.Normal(loc=0., scale=1.),
bijector=tfb.Exp(),
name='LogNormalTransformedDistribution')
copy.deepcopy(log_normal)
The above raises TypeError: missing a required argument: 'distribution'.
Versions: tensorflow-probability==0.17.0, tensorflow==2.9.1.
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
Start by running the provided TransformedDistribution deepcopy reproduction with the reported TensorFlow Probability and TensorFlow versions. Trace how TransformedDistribution is reconstructed during copy.deepcopy; done means the distribution can be deep-copied without the missing 'distribution' argument error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, tensorflow
- Domain
- machine-learning
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100