For what it is worth, I have found this to be a good pattern in pymc3 - to separate the modelling step from the sampling step. I even will often define a model in a function, and do things like
def my_model():
with pm.Model() as model:
x = pm.Normal('x')
...
return model
with my_model():
other stuff