-
Notifications
You must be signed in to change notification settings - Fork 5.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[air] Suppress "NumPy array is not writable" error in torch conversion (
#29808) When we convert NumPy arrays to torch tesnors in Ray Data, we run into a verbose Numpy error: The given NumPy array is not writable, and PyTorch does not support non-writable tensors. This means writing to this tensor will result in undefined behavior. Since we don't write to numpy tensors we suppress this warning in the conversion. The alternative of copying the array would duplicate our memory usage. Signed-off-by: Kai Fricke <[email protected]>
- Loading branch information
Showing
2 changed files
with
22 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters