Skip to content

Fix for writeable flag error#2884

Merged
joeyballentine merged 1 commit intomainfrom
fix-writeable
May 19, 2024
Merged

Fix for writeable flag error#2884
joeyballentine merged 1 commit intomainfrom
fix-writeable

Conversation

@joeyballentine
Copy link
Member

Some numpy arrays cannot be set to writeable -- this seems to include arrays that come from rust/chainner-ext. These would cause errors from attempting to make them writeable.

So, I just wrapped it with a try/except, and made it copy if it cannot be set to writeable. Easy fix, and we still get the optimization from it if it is able to be set to writeable

@RunDevelopment
Copy link
Member

Will the finally not cause the same issue?

@joeyballentine
Copy link
Member Author

It doesn't. I tested this.

@joeyballentine
Copy link
Member Author

Gonna merge this so it's fixed in the nightly

@joeyballentine joeyballentine merged commit 2a218e7 into main May 19, 2024
@joeyballentine joeyballentine deleted the fix-writeable branch May 19, 2024 20:51
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

Successfully merging this pull request may close these issues.

2 participants