hello! Theano isn’t being actively developed anymore, firstly I’d suggest trying Aesara, it’s a fork of theano with theano’s functionalities and some more!! It’s maintained by a group of developers some of which are PyMC developers as well. Additionally about hierarchical models for best practices in PyMC consider having a good look at this:
For a hacky model with aesara with some hierarchical modelling you can look at this talk I gave here are the slides and notebook GitHub - mjhajharia/pydata21: Pydata talk - Football Analytics Using Hierarchical Bayesian Models in PyMC
In case you’re interested in understanding hierarchical models in general I’ve found this stan blog post quite nice Hierarchical Partial Pooling for Repeated Binary Trials
Note: Although most things in Stan, PyMC or other PPLs can be easily converted to each other sometimes there can be issues so you can avoid the last post if it makes things more confusing.
Hope you find some ideas here!