-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
[core] Ray prevents to set a write flag of numpy array. #13360
Comments
This is Ray's computation model (Objects in the store is immutable). cc @stephanie-wang Do you know any good way to get around this? |
See also https://docs.ray.io/en/master/serialization.html#numpy-arrays |
Yes, the behavior is expected. The reason objects are immutable is to prevent possible inconsistencies with anyone else that has a reference to the same object ( |
It's so sad that I have to constantly copy large memory that will not be changed in whole life time. Wrapping the |
Hmm I think I misunderstood your original error. I didn't realize that the error was from setting the flag, not from writing directly to a read-only array. I'm not sure that this is a Ray error, actually. What numpy version are you using? There's a similar issue described here. |
The version is 1.19.2 And yes you're right that the error occurs exactly when the flag is edited. I hope there is a way to handle this issue. |
Have you tried checking the versions of your other installs according to
the link that I sent you? Maybe yours is the same problem.
…On Wed, Jan 13, 2021 at 5:28 PM Dongseok ***@***.***> wrote:
The version is 1.19.2 And yes you're right that error occurs exactly when
the flag is edited. I hope there is a way to handle this issue.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<#13360 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AATREBGOD5AYTTTMCPTHG6LSZZCCFANCNFSM4V6ZP3CQ>
.
|
|
Okay, I'm closing this issue since it appears to be a problem with other libraries, not Ray. Good luck tracking this down! |
I'm not sure this is related to other libraries, considering that previous Ray release just worked fine. The only thing I have changed was to upgrade Ray to 1.1.0. Anyway I have no choice but to stick with 1.0.1... |
What is the problem?
I'm using ray==1.1.0, ubuntu==20.04 and pytorch==1.7.1.
When i try to set a flag of an array, numpy raises an exception,
ValueError: cannot set WRITEABLE flag to True of this array
.This happened after i got upgrade ray to 1.1.0 from 1.0.1.post1.
I needed to set write flag to make pytorch to construct tensors from the array, rather than copy and construct new tensor.
Reproduction (REQUIRED)
The text was updated successfully, but these errors were encountered: