Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

save fit #83

Open
thibault-gajdos opened this issue May 5, 2022 · 2 comments
Open

save fit #83

thibault-gajdos opened this issue May 5, 2022 · 2 comments

Comments

@thibault-gajdos
Copy link

Hello everyone,

i have a very basic problem: i cannot save my fits.

Configuration:
system: mac Big Sur 11.6
Python 3.5.5
hddm 0.8.0

Instruction:
m.save("mymodel")

Message:
File "/Users/thibault/thib/projects/exercice_ddm/data/Code/hddm_exercice.py", line 57, in
## posterior predictive
File "/Users/thibault/opt/anaconda3/envs/py35/lib/python3.5/site-packages/kabuki/hierarchical.py", line 412, in save
pickle.dump(self, open(fname, 'w'))
TypeError: write() argument must be str, not bytes

Any help on solving this issue or alternative method for saving models and traces would be higly appreciated!

Best
thibault

@AlexanderFengler
Copy link
Contributor

You you share a bit more code?
At best a reproducible example.

Best,
Alex

@thibault-gajdos
Copy link
Author

Yes, here it is:

m  =  hddm.HDDM(f_data)
m.sample(20, burn=10,  dbname='traces1', db='pickle')
m.save('fit')

You can replace f_data by any (appropriate) data set.
Best,
thibault

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants