How to run PyMC3 in a multi-node cluster? Is it possible at the moment?

Hi, @junpenglao! Thanks for your reply!

I am not familiar with ray - SMC need access to all chain/batch at the end of each step for resampling, not sure whether that would work with ray. If you find it useful, we certainly welcome a PR (we can set is as a flag).

I think that ray will do alright. If multiprocessing does the right thing, ray will do it as well. The only difference is that ray has an implementation of multiprocessing that can be aware of multiple nodes, while multiprocessing can’t detect or set workers from multiple nodes, at least it’s what I understand.

Did you try to see if your solution works?

I’m working on it at this moment! If everything looks good, I’ll submit a PR for you guys to check it out.

Otherwise, as @sammosummo mentioned, you can look at pymc4/TFP, which I recently added SMC as well https://github.com/tensorflow/probability/tree/master/tensorflow_probability/python/experimental/mcmc/examples (there is even an ODE example)

Great work, well done! However, there is no clear API at this moment and generate results with it while working with colleagues that don’t have previous experiences with the tool would require a time we don’t have, unfortunately. But, as I mentioned before, I have interest to learn in the future. I didn’t know that SMC was implemented in TFP by you. When we began the project, you haven’t submitted the PR yet. But I’m now watching the repo!

other effort of speeding up ODE including @aseyboldt’s work, which you might also find helpful https://github.com/aseyboldt/sunode

Looks amazing! I’ll have a look on it, for sure! Thanks!! At this moment, we are using LSODA solver from scipy, which wraps ODEPACK implementation.

Thanks again!