Skip to content

Commit dd9d025

Browse files
committed
fix(python): add pylibcudf and cudf_streaming as test deps, remap imports
Tests and examples import cudf partition/streaming APIs that moved from rapidsmpf.integrations.cudf and rapidsmpf.streaming.cudf to cudf_streaming.integrations and cudf_streaming.streaming respectively. - Add depends_on_pylibcudf and depends_on_cudf_streaming to test_python and py_test_rapidsmpf file keys - Remap all Python imports to cudf_streaming namespace - Regenerate pyproject.toml via rapids-dependency-file-generator
1 parent 6022ab7 commit dd9d025

16 files changed

Lines changed: 90 additions & 34 deletions

dependencies.yaml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,8 @@ files:
7575
- py_version
7676
- run_rapidsmpf
7777
- test_python
78+
- depends_on_pylibcudf
79+
- depends_on_cudf_streaming
7880
checks:
7981
output: none
8082
includes:
@@ -168,6 +170,8 @@ files:
168170
includes:
169171
- depends_on_ray
170172
- test_python
173+
- depends_on_pylibcudf
174+
- depends_on_cudf_streaming
171175
channels:
172176
- rapidsai-nightly
173177
- rapidsai
@@ -616,3 +620,53 @@ dependencies:
616620
- output_types: [requirements, pyproject]
617621
packages:
618622
- ray>=2.55.1
623+
depends_on_pylibcudf:
624+
common:
625+
- output_types: conda
626+
packages:
627+
- &pylibcudf_unsuffixed pylibcudf==26.8.*,>=0.0.0a0
628+
- output_types: requirements
629+
packages:
630+
# pip recognizes the index as a global option for the requirements.txt file
631+
- --extra-index-url=https://pypi.anaconda.org/rapidsai-wheels-nightly/simple
632+
specific:
633+
- output_types: [requirements, pyproject]
634+
matrices:
635+
- matrix:
636+
cuda: "12.*"
637+
cuda_suffixed: "true"
638+
packages:
639+
- pylibcudf-cu12==26.8.*,>=0.0.0a0
640+
- matrix:
641+
cuda: "13.*"
642+
cuda_suffixed: "true"
643+
packages:
644+
- pylibcudf-cu13==26.8.*,>=0.0.0a0
645+
- matrix:
646+
packages:
647+
- *pylibcudf_unsuffixed
648+
depends_on_cudf_streaming:
649+
common:
650+
- output_types: conda
651+
packages:
652+
- &cudf_streaming_unsuffixed cudf-streaming==26.8.*,>=0.0.0a0
653+
- output_types: requirements
654+
packages:
655+
# pip recognizes the index as a global option for the requirements.txt file
656+
- --extra-index-url=https://pypi.anaconda.org/rapidsai-wheels-nightly/simple
657+
specific:
658+
- output_types: [requirements, pyproject]
659+
matrices:
660+
- matrix:
661+
cuda: "12.*"
662+
cuda_suffixed: "true"
663+
packages:
664+
- cudf-streaming-cu12==26.8.*,>=0.0.0a0
665+
- matrix:
666+
cuda: "13.*"
667+
cuda_suffixed: "true"
668+
packages:
669+
- cudf-streaming-cu13==26.8.*,>=0.0.0a0
670+
- matrix:
671+
packages:
672+
- *cudf_streaming_unsuffixed

python/rapidsmpf/pyproject.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,11 @@ classifiers = [
3838
[project.optional-dependencies]
3939
test = [
4040
"cuda-core>=0.7.0",
41+
"cudf-streaming==26.8.*,>=0.0.0a0",
4142
"cupy-cuda13x>=13.6.0,!=14.0.0,!=14.1.0",
4243
"numpy >=1.23,<3.0",
4344
"psutil",
45+
"pylibcudf==26.8.*,>=0.0.0a0",
4446
"pytest",
4547
"ray>=2.55.1",
4648
] # This list was generated by `rapids-dependency-file-generator`. To make changes, edit ../../dependencies.yaml and run `rapids-dependency-file-generator`.

python/rapidsmpf/rapidsmpf/examples/bulk_mpi_shuffle.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@
1111
from typing import TYPE_CHECKING
1212

1313
import pylibcudf as plc
14+
from cudf_streaming.integrations.partition import (
15+
partition_and_pack,
16+
unpack_and_concat,
17+
unspill_partitions,
18+
)
1419
from mpi4py import MPI
1520

1621
import rmm.mr
@@ -19,11 +24,6 @@
1924
import rapidsmpf.bootstrap
2025
import rapidsmpf.communicator.mpi
2126
from rapidsmpf.config import Options, get_environment_variables
22-
from rapidsmpf.integrations.cudf.partition import (
23-
partition_and_pack,
24-
unpack_and_concat,
25-
unspill_partitions,
26-
)
2727
from rapidsmpf.memory.buffer import MemoryType
2828
from rapidsmpf.memory.buffer_resource import BufferResource
2929
from rapidsmpf.progress_thread import ProgressThread

python/rapidsmpf/rapidsmpf/examples/ray/bulk_ray_shuffle.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@
1313

1414
import pylibcudf as plc
1515
import ray
16-
17-
import rmm.mr
18-
19-
from rapidsmpf.integrations.cudf.partition import (
16+
from cudf_streaming.integrations.partition import (
2017
partition_and_pack,
2118
unpack_and_concat,
2219
unspill_partitions,
2320
)
21+
22+
import rmm.mr
23+
2424
from rapidsmpf.integrations.ray import RapidsMPFActor, setup_ray_ucxx_cluster
2525
from rapidsmpf.memory.buffer import MemoryType
2626
from rapidsmpf.memory.buffer_resource import BufferResource

python/rapidsmpf/rapidsmpf/examples/ray/ray_shuffle_example.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@
1010
import numpy as np
1111
import pylibcudf as plc
1212
import ray
13-
14-
import rmm
15-
16-
from rapidsmpf.integrations.cudf.partition import (
13+
from cudf_streaming.integrations.partition import (
1714
partition_and_pack,
1815
unpack_and_concat,
1916
unspill_partitions,
2017
)
18+
19+
import rmm
20+
2121
from rapidsmpf.integrations.ray import RapidsMPFActor, setup_ray_ucxx_cluster
2222
from rapidsmpf.memory.buffer_resource import BufferResource
2323
from rapidsmpf.shuffler import Shuffler

python/rapidsmpf/rapidsmpf/examples/streaming/basic_example.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
from typing import TYPE_CHECKING
88

99
import pylibcudf
10+
from cudf_streaming.streaming.table_chunk import TableChunk
1011

1112
import rmm.mr
1213
from rmm.pylibrmm.stream import DEFAULT_STREAM
@@ -24,7 +25,6 @@
2425
from rapidsmpf.streaming.core.context import Context
2526
from rapidsmpf.streaming.core.leaf_actor import pull_from_channel, push_to_channel
2627
from rapidsmpf.streaming.core.message import Message
27-
from rapidsmpf.streaming.cudf.table_chunk import TableChunk
2828

2929
if TYPE_CHECKING:
3030
from collections.abc import Awaitable

python/rapidsmpf/rapidsmpf/tests/streaming/test_allgather.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@
99
import numpy as np
1010
import pylibcudf as plc
1111
import pytest
12+
from cudf_streaming.integrations.partition import unpack_and_concat
13+
from cudf_streaming.streaming.table_chunk import TableChunk
1214

13-
from rapidsmpf.integrations.cudf.partition import unpack_and_concat
1415
from rapidsmpf.memory.packed_data import PackedData
1516
from rapidsmpf.streaming.chunks.packed_data import PackedDataChunk
1617
from rapidsmpf.streaming.coll.allgather import AllGather, allgather
1718
from rapidsmpf.streaming.core.actor import define_actor, run_actor_network
1819
from rapidsmpf.streaming.core.leaf_actor import pull_from_channel, push_to_channel
1920
from rapidsmpf.streaming.core.message import Message
20-
from rapidsmpf.streaming.cudf.table_chunk import TableChunk
2121
from rapidsmpf.testing import assert_eq
2222

2323
cudf = pytest.importorskip("cudf")

python/rapidsmpf/rapidsmpf/tests/streaming/test_define_actor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@
77

88
import pylibcudf as plc
99
import pytest
10+
from cudf_streaming.streaming.table_chunk import TableChunk
1011

1112
from rapidsmpf.streaming.chunks.arbitrary import ArbitraryChunk
1213
from rapidsmpf.streaming.core.actor import define_actor, run_actor_network
1314
from rapidsmpf.streaming.core.leaf_actor import pull_from_channel, push_to_channel
1415
from rapidsmpf.streaming.core.message import Message
15-
from rapidsmpf.streaming.cudf.table_chunk import TableChunk
1616
from rapidsmpf.testing import assert_eq
1717

1818
cudf = pytest.importorskip("cudf")

python/rapidsmpf/rapidsmpf/tests/streaming/test_fanout.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@
99

1010
import pylibcudf as plc
1111
import pytest
12+
from cudf_streaming.streaming.table_chunk import TableChunk
1213

1314
from rapidsmpf.streaming.core.actor import run_actor_network
1415
from rapidsmpf.streaming.core.fanout import FanoutPolicy, fanout
1516
from rapidsmpf.streaming.core.leaf_actor import pull_from_channel, push_to_channel
1617
from rapidsmpf.streaming.core.message import Message
17-
from rapidsmpf.streaming.cudf.table_chunk import TableChunk
1818
from rapidsmpf.testing import assert_eq
1919

2020
cudf = pytest.importorskip("cudf")

python/rapidsmpf/rapidsmpf/tests/streaming/test_leaf_actor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@
77

88
import pylibcudf as plc
99
import pytest
10+
from cudf_streaming.streaming.table_chunk import TableChunk
1011

1112
from rapidsmpf.streaming.core.actor import run_actor_network
1213
from rapidsmpf.streaming.core.leaf_actor import pull_from_channel, push_to_channel
1314
from rapidsmpf.streaming.core.message import Message
14-
from rapidsmpf.streaming.cudf.table_chunk import TableChunk
1515
from rapidsmpf.testing import assert_eq
1616

1717
cudf = pytest.importorskip("cudf")

0 commit comments

Comments
 (0)