Does some one know ep-stan in detail? After diving deeper into the code, I am really getting worried that it is not parallelizable. If you look at the Worker.cavity() inside method.py, it is updating a global structure self.Mat and self.vec. In the reference implementation, Master is calling each of the sites sequentially. That allows the global structure update to occur in a orderly fashion. If multiple workers are solving for self.vec using linalg.cho_solver, the results would come out different. requiring sequential site updates makes no sense. You might as well just work on the original stan model without ep, since there is no speed up using parallelism.
Tuomas Sivula who wrote the code. Please make an issue in github. Note that this specific code is demonstrating the concept, and it wasn’t used for the real data example. We are waiting for the refactoring of Stan code before making something easier to use.
Able easily continue with the current adaptation parameters and mass matrix. At some point of the algorithm tilted distributions are changing only a little, and it would be more efficient without the need for the adaptation phase. I think there were also some issues with how easy it would be to compute IS, which could give additional speedup in the final iterations.
If you’re talking about doing this at the C++ level, this is all under your control already if you’re writing algorithms on top of our existing algorithms.
If you’re talking about doing it at the level of the commands in services, Mitzi’s already plumbed that through.
The only thing that’s waiting now is for CmdStan, RStan, and PyStan to figure out how to pass matrices in and get them out.
Sorry for using ambiguous acronym. Here IS is Importance sampling. For that we would like to re-evaluate the target (lp__) for the same (or sometimes different) MCMC draws with new data.
But those shouldn’t be part of the C++ implementation. You want to build an algorithm that’s exposed through on the of the services functions. At that level, you don’t need this.
If you just want to build on top, we need to get someone to prioritize this. Too many parallelization opportunities flying around.
I think we’ll talk more about some of these interface issues on the way to Stan 3 and after 2.17 is out.
I think we want to use PyStan and RStan. No hurry, we can wait. I have assumed that eventually PyStan and RStan will have what we want, and it’s enough to wait and no need to change prioritization (at least now)
I am past that point. The paper is clear. I was concerned about parallelizing class variables and matrix parameters in the code. But I am also past that point. I can see how the current code can be parallelized.