Hello!
First off, let me thank the PyMC developers and community for
producing such a wonderfully powerful tool. I've made use of it in
several projects already, and it's simplified my life greatly!
Now, a question:
I have a model consisting of ~ 1000 deterministics that depend on ~ 20
stochastics sampled by MCMC. These deterministics feed into some
observed stochastics through a normal error model. The problem is
that computing each deterministic for a new set of parent stochastics
is a nontrivial expense, consuming a few seconds of CPU time. As a
result, every iteration takes several-to-many minutes.
Would it be possible for me to make some relatively small changes that
distribute the updating of just the deterministics over multiple
processor cores? For example, I was considering the use of the
'multiprocessing' or 'parallel python' packages to do this.
Relatively little information is needed to evaluate the deterministic
-- just the parent stochastics and a small amount of auxiliary
information (different for each deterministic).
I've poked around the code to see where the updating of the
deterministics is done. The model is contained in a dict() object, so
I'm guessing this updating happens during the calls to get_value() for
the associated container, but the looping over stored elements to call
get_value -- the part I presumably want to parallelize -- appears to
occur in DCValue.run() in Container_values.pyx. Is that correct? Has
anyone experimented with this sort of thing previously?
Thanks!
John
--
You received this message because you are subscribed to the Google Groups "PyMC" group.
To post to this group, send email to
py...@googlegroups.com.
To unsubscribe from this group, send email to
pymc+uns...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/pymc?hl=en.