pstjohn / emll

some code for linlog model simulation
GNU General Public License v2.0
9 stars 6 forks source link

Adding hist and trace to the pickle dump #5

Closed djinnome closed 2 years ago

djinnome commented 2 years ago

Can you derive hist and trace from the approx object? If not, then how does hackett.ipynb extract the trace and hist information without dumping it into a pickle?

The approx ADVI object does contain a hist attribute, but it is a Tensor object that does not contain a sample() method.

pstjohn commented 2 years ago

Yup, my apologies for not including this in the examples. I think they must have changed something between when I ran this and when I froze the dependencies in the docker image. Looks like I figured out the same thing in my more recent scripts: https://github.com/pstjohn/20200217_putida_bmfa/blob/main/run_advi.py#L23-L27