AlenkaF opened a new issue, #51481:
URL: https://github.com/apache/arrow/issues/51481
There are dlpack related deprecation warnings present in our CI and extended
builds. Two topics would need to be addressed (and discussed in advance):
1. In `Array` and `Tensor.__dlpack__` method there is a deprecation warning
triggered for unversioned capasule which can be raised together with a
`NotImplementedError` in case of an immutable tensor from the C++ side. How
should we handle these cases where a deprecation warning and a `NotImplemented`
error are raised together?
Note that the deprecation warning needs to be triggered before
`GetResultValue` in `__dlpack__` to prevent memory leak or the code needs a
separate check to call a deleter in case of depr warning being turned into an
error (or some similar handling).
2. Some tests are not using the newly added `DLPackForwarder` class and
fallback to the unversioned capsule producing a deprecation warning in our
tests (pyarrow/tests/test_dlpack.py::test_dlpack_not_supported,
test_dlpack_versioned_roundtrip and
test_dlpack_legacy_capsule_immutable_tensor):
```python
DeprecationWarning: Exporting an unversioned DLPack capsule is deprecated,
pass max_version=(1, 0) or higher.
```
We should filter the warning or update the code to use newly added
`DLPackForwarder` class meaning the test would require numpy 2.1, I think. This
might not be ideal.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]