You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When you produce ragged ndarrays in map_batches, _create_possibly_ragged_ndarray will break if a numpy version with major version 2 is installed. The reason for that is an API change which was introduced with a major version bump in numpy.
Warnings and exceptions present in numpy.exceptions (e.g, ~numpy.exceptions.ComplexWarning, ~numpy.exceptions.VisibleDeprecationWarning) are no longer exposed in the main namespace.
As _create_possibly_ragged_ndarray is still accessing VisibleDeprecationWarning under the old path, this will fail with an AttributeError:
AttributeError: module 'numpy' has no attribute 'VisibleDeprecationWarning'
The text was updated successfully, but these errors were encountered:
viktor-haag
added
bug
Something that is supposed to be working; but isn't
triage
Needs triage (eg: priority, bug/not-bug, and owning component)
labels
Sep 17, 2024
viktor-haag
changed the title
_create_possibly_ragged_ndarray breaks if if numpy 2.x.x is installed
_create_possibly_ragged_ndarray breaks if numpy 2.x.x is installed
Sep 17, 2024
What happened + What you expected to happen
When you produce ragged ndarrays in
map_batches
, _create_possibly_ragged_ndarray will break if a numpy version with major version 2 is installed. The reason for that is an API change which was introduced with a major version bump in numpy.relevant numpy changelog entry
As _create_possibly_ragged_ndarray is still accessing
VisibleDeprecationWarning
under the old path, this will fail with anAttributeError
:Suggestion: This can be fixed easily by replacing
ray/python/ray/air/util/tensor_extensions/utils.py
Line 49 in c1e7c45
with
Versions / Dependencies
ray==2.36.0
numpy==2.1.1
Reproduction script
Issue Severity
Low: It annoys or frustrates me.
The text was updated successfully, but these errors were encountered: