Maybe something like:
for i in range(...):
with model:
trace = pm.sample(...)
# save trace
Also, try DEMetropolis which might fit your use case here.
Maybe something like:
for i in range(...):
with model:
trace = pm.sample(...)
# save trace
Also, try DEMetropolis which might fit your use case here.