Hi everyone. I’m excited that you’re planning to make PyMC useable with alternate computational backends!
As part of a grad class on python this semester, I spent a few Saturdays converting some of the PyMC3 code base so that a user can specify either Theano or Tensorflow as a backend. I changed just enough so that the basic GLM examples work; I commented out all the other code.
The way that I refactored the code is not the best way and its only a very small step, but I thought that I’d share the link to my repo anyway. I ended up using Keras as a model for how to flexibly switch between backends; the way they did it seems very clean. In the jupyter notebook contained in the repo, I also tried to compare things like variable classes between Theano and Tensorflow and contrast things like compiling a function in Theano and running a session in Tensorflow
Sharan, it’s great that you are doing this as your google summer of code project. Looking forward to seeing how PyMC4 comes along!