We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
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
The models that are now allowed following #7656 have a disconnected node in the model graph.
The sampling is as expected. It is just the graphviz representation that is incorrect.
import numpy as np import pymc as pm from pymc.model_graph import ModelGraph seed = sum(map(ord, "Observed disconnected node")) rng = np.random.default_rng(seed) true_mu = 100 true_sigma = 30 n_obs = 10 coords = { "date": np.arange(n_obs), } dist = pm.Normal.dist(mu=true_mu, sigma=true_sigma, shape=n_obs) data = pm.draw(dist, random_seed=rng) scaling = data.max() with pm.Model(coords=coords) as model: mu = pm.Normal("mu") sigma = pm.HalfNormal("sigma") target = pm.Data("target", data, dims="date") scaled_target = target / scaling pm.Normal("observed", mu=mu, sigma=sigma, observed=scaled_target, dims="date") pm.model_to_graphviz(model).render("scaled_target") ModelGraph(model).make_compute_graph()
The observed should have "target" in the compute_graph
defaultdict(set, {'mu': set(), 'sigma': set(), 'target': set(), 'observed': {'mu', 'sigma'}})
Seems like it needs a fix here:
pymc/pymc/model_graph.py
Lines 322 to 343 in af81955
The text was updated successfully, but these errors were encountered:
No branches or pull requests
The models that are now allowed following #7656 have a disconnected node in the model graph.
The sampling is as expected. It is just the graphviz representation that is incorrect.
The observed should have "target" in the compute_graph
Seems like it needs a fix here:
pymc/pymc/model_graph.py
Lines 322 to 343 in af81955
The text was updated successfully, but these errors were encountered: