-
-
Notifications
You must be signed in to change notification settings - Fork 733
serialized ndarray not writeable #1368
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
Comments
More broadly, Dask tends to assume that your functions don't mutate state. For example, it reserves the right to run a function twice if something bad happens. So putting on my "lets be safe" hat, I'll suggest that you avoid mutating data that dask knows about. |
More specifically I don't remember exactly why the memory is non-writeable. I suspect that we're basing the array off of some bytestring pulled off of a tornado socket and perhaps that bytestring is immutable? |
Ok, I thought that might be the case. Hopefully this helps others understand, should the issue arise for them. I'll close this. |
FWIW this inconsistency between schedulers is being discussed in issue ( #1978 ). If you have any thoughts on how you would like to see this inconsistency addressed, please feel free to share in that issue. |
Uh oh!
There was an error while loading. Please reload this page.
I'm using dask and numba to accelerate python on a small cluster. A common dask/distributed pattern for me is to submit a series of functions in a pipeline, like:
However, some of my functions transform the data in place using numba. That is a problem, since it seems that an ndarray is not writable after serialization. So (continuing from above):
In contrast, if I run the function locally, I get:
My workaround is to use
np.require
to wrap the data in my numba function, but I thought this might trip others up, too. Is there a reason a serialized ndarray is made nonwriteable?The text was updated successfully, but these errors were encountered: