HDF Backend not reading saved file

1,203 views
Skip to first unread message

saad...@gmail.com

unread,
Sep 26, 2020, 10:42:24 AM9/26/20
to emcee users

So I stored a run of about 1m samples (takes up about 8gb) using the hdfbackend. I've used it several times previously. However, today I went to open the data again with the following commands:
"
reader = emcee.backends.HDFBackend("QHO_3_sample1.h5")
tau_3 = reader.get_autocorr_time()
burnin_3 = int(2 * np.max(tau_3))
thin_3 = int(0.5 * np.min(tau_3))
samples_3 = reader.get_chain()
"

And it tells me " You must run the sampler with 'store == True' before accessing the results." Further, when I try to run reader.iteration, it tells me that there are no iterations. However, I very clearly see the 8gb file in my documents... not sure what is going on. Any ideas?

nmov...@gmail.com

unread,
Sep 26, 2020, 12:25:03 PM9/26/20
to emcee users
I get that error when I misspell/mistype the file name or path. If you're absolutely sure you are specifying the right name and (relative!) path then the file must be corrupted. But that's probably unlikely unless you had some recent hardware failure...

@developers: Idea for a future minor release? Use `os.path` to catch and report file name typos before the cryptic message about store==True invites users to look for mysterious bugs :)

Reply all
Reply to author
Forward
0 new messages