Saving/Loading PyMC3 model with InferenceData

If I save a resulting InferenceData object to .nc and load again, is there any way to recover the original information stored in the PyMC3 model object? If I run analysis once, but want to save to disk and load again in the future, I don’t have ready access to the model structure (I think) and would love to run pm.model_to_graphviz(loaded_model). Do I need to just pickle the model object separately, or is there something I don’t know about InferenceData?

Yes, you would need to pickle that separately, or recreate the model using code you stored somewhere.

We do plan to improve this workflow, see here for the proposal:

1 Like

Thanks for directing me to that @twiecki . That would definitely be a useful feature. I’ll move forward with recreation or pickling for now.