I have a large model that has potential to consume my RAM by virtue of holding all the posterior samples in memory. I would like to instead write the samples to file as they are obtained, assuming this will then liberate some RAM.
Looking through the docs for the pm.sample() method it seems that ‘trace’ could perhaps achieve this? But I’m stuck on what ‘backend’ instance to provide, there doesn’t seem to be an example script to demonstrate this. Any tips would be greatly appreciated, thanks!