probcomp / Venturecxx

Primary implementation of the Venture probabilistic programming system
http://probcomp.csail.mit.edu/venture/
GNU General Public License v3.0
28 stars 6 forks source link

Ripl serialization loses the state of the inference trace #338

Open axch opened 8 years ago

axch commented 8 years ago

Because I forgot to put it in when I wrote persistent inference traces.

Manifestation:

$ venture
venture[script] > define x = normal(0,1)
0.694876101079
venture[script] > pyexec("ripl.save('foo.rpl')")
[]
venture[script] > 
End of input reached.
Moriturus te saluto.
$ venture
venture[script] > pyexec("ripl.load('foo.rpl')")
[]
venture[script] > x
*** evaluation: Cannot find symbol 'x'
(autorun x)
         ^
venture[script] > 

Expected x to still be 0.694876101079 on reload.

Consequence: Only the current model is saved, not any that may have been created by new_model and stored in inference language variables.

axch commented 8 years ago

Prerequisitie (I think): #370 .