-
Notifications
You must be signed in to change notification settings - Fork 135
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
srm: Can't save SRM object due to MPI #428
Comments
At the moment, my solution is to save the .s_ and .w_ with numpy or python pickle calls and then remake the object. However, a better solution would be much appreciated! |
@snastase Thanks for opening this issue! I think making SRM object serializable would be a great enhancement. It turns out depends on what the user wants to do, saving w and s might not be enough. For example, technically, mu_, the subject-specific intercept, should also be saved, though the current implementation forgot to use (#406). And sometimes saving rho_, sigma_ are useful as well. Being able to save the SRM object directly / avoiding doing the transformation by hand can reduce potential errors. Currently I also just pickle all SRM parameters as np array. |
Have been playing around with SRM and wanted to echo that it would be great to have an easy way to save the srm object to disk for later use. Unfortunately tackling this is likely beyond my python chops at the moment, but if anyone has an idea for how to implement this, I'd be happy to help test, etc. Thanks, all, for your work on this excellent package! |
Fixed in #484. |
I want to fit
brainiak.funcalign.srm.SRM
on some subset of data, save this fitted SRM object to disk, then (e.g., weeks) later retrieve the fitted SRM object and use itstransform_subject
method to project a new subject into the shared space. I tried usingnumpy.save
, e.g.:but the pickling used to save object arrays conflicts with MPI:
Is there any other way to save the SRM object to disk and load it at a later time? If not, we should probably restructure the SRM object to make this possible. (I tried setting
allow_pickle=False
innumpy.save
, but then it can't save the object array at all.)The text was updated successfully, but these errors were encountered: