Skip to content

Commit

Permalink
[Data] Fix validation bug when size=0 in ActorPoolStrategy (ray-proje…
Browse files Browse the repository at this point in the history
…ct#47072)

To resolve the issue 40393 and we need to check if size is not None beforehand.

Signed-off-by: Xingyu Long <halolong@hotmail.com>
  • Loading branch information
xingyu-long authored and simonsays1980 committed Aug 16, 2024
1 parent 3d3bd24 commit 12c413d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion python/ray/data/_internal/compute.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def __init__(
computation and avoiding actor startup delays, but will also increase
queueing delay.
"""
if size:
if size is not None:
if size < 1:
raise ValueError("size must be >= 1", size)
if max_size is not None or min_size is not None:
Expand Down

0 comments on commit 12c413d

Please sign in to comment.