-
Notifications
You must be signed in to change notification settings - Fork 81
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
manually casting objects to np arrays when reading checkpoint #701
Conversation
Any ideas on the consequence of this? |
We might need to check the mask to make sure this is safe |
As far as I can tell they are supposed to be I wonder if this was also involved in the cycling issues we were seeing when resuming simulations in choderalab/perses#613 (it's back baby!! haha) |
Ah so we are not using the actual masking functionality here? I'm just worried that if there is a mask on these arrays, that means we don't want to include some of that data in the analysis. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just want to make sure that we are not using the mask
I think we don't use it or need it, since they weren't masked array from the start and resuming simulations seems to be working, when we explicitly use arrays instead of masked arrays. That said, I don't know a way to be completely sure. I don't know of a systematic way to be sure we are not using the mask, it just seems that every time we read from a .nc file we will always get a |
We could probably come up with a less hacky or a more general solution that uses |
If we don't want the masking behavior or use it, then when we save the nc file we should use |
Description
Numba 0.57 explicitly raises an exception when trying to use
MaskedArrays
in@jit
decorated functions. When we are readingMultiStateSampler
attributes from serialized objects (storage) these attributes becomeMaskedArray
. We are casting them to arrays here to make sure we can still use numba when mixing replicas after resuming the simulation.Solves #700
Todos
Status
Changelog message