Skip to content

Commit 938ec20

Browse files
committed
Fixup p2p bugs
1 parent 50ea288 commit 938ec20

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

distributed/shuffle/_shuffle_array.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,11 @@ def _p2p_shuffle( # type: ignore[no-untyped-def]
7171
transfer_keys = []
7272

7373
for i, (start, stop) in enumerate(zip(chunk_boundaries[:-1], chunk_boundaries[1:])):
74+
start = np.searchsorted(sorted_indexer[0, :], start)
75+
stop = np.searchsorted(sorted_indexer[0, :], stop)
76+
7477
chunk_indexer = sorted_indexer[:, start:stop].copy()
75-
if len(chunk_indexer) == 0:
78+
if chunk_indexer.shape[1] == 0:
7679
# skip output chunks that don't get any data
7780
continue
7881

0 commit comments

Comments
 (0)