Pause and resume sampling while changing the model

Hi, thank you for your answer. The example you pointed me to is not appropriate for my use case because I would like to avoid drawing samples from the posterior and using them as prior for the new model. Moreover, I have good reasons to change the model, and for my application, it will not bias the results.

I would like to do something like:

with model_1:
     trace_1 = pm.sample(1000)

#
#some modifications to model_1
#

with model_1:
    trace_2 = pm.sample(1000, tune=0)

and then gather trace_1 and trace_2 in a single trace, in a way that if I didn’t do anything to the model, the code above would be equivalent to

with model_1:
     trace = pm.sample(2000)

Thanks for your help!