Skip to content

Add Python/Cython bindings for libcudf_streaming - #22760

Merged
rapids-bot[bot] merged 19 commits into
NVIDIA:mainfrom
vyasr:branch-cudf-streaming-python
Jun 4, 2026
Merged

Add Python/Cython bindings for libcudf_streaming#22760
rapids-bot[bot] merged 19 commits into
NVIDIA:mainfrom
vyasr:branch-cudf-streaming-python

Conversation

@vyasr

@vyasr vyasr commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

Description

This PR ports over the Python bindings for the parts of librapidsmpf as the new libcudf_streaming library in #22747

Note that, just like in the preexisting rapidsmpf testing setup, only the conda environment will run the MPI/UCXX tests.

Contributes to #22528

Checklist

  • I am familiar with the Contributing Guidelines.
  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.

@copy-pr-bot

copy-pr-bot Bot commented Jun 3, 2026

Copy link
Copy Markdown

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@vyasr

vyasr commented Jun 3, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test

@github-actions github-actions Bot added libcudf Affects libcudf (C++/CUDA) code. Python Affects Python cuDF API. CMake CMake build issue labels Jun 3, 2026
@GPUtester GPUtester moved this to In Progress in cuDF Python Jun 3, 2026
@vyasr

vyasr commented Jun 3, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test

1 similar comment
@vyasr

vyasr commented Jun 3, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test

@vyasr vyasr added feature request New feature or request non-breaking Non-breaking change labels Jun 3, 2026
@vyasr

vyasr commented Jun 3, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test

@vyasr
vyasr force-pushed the branch-cudf-streaming-python branch from 4cdd4c1 to 0c20b1a Compare June 3, 2026 16:15
@vyasr

vyasr commented Jun 3, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test

2 similar comments
@vyasr

vyasr commented Jun 3, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test

@vyasr

vyasr commented Jun 3, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test

@vyasr
vyasr force-pushed the branch-cudf-streaming-python branch from 072fc83 to e2f1058 Compare June 3, 2026 22:14
@vyasr

vyasr commented Jun 3, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test

@vyasr vyasr changed the title feat(cudf_streaming): add Python/Cython bindings for libcudf_streaming Add Python/Cython bindings for libcudf_streaming Jun 4, 2026
@vyasr
vyasr force-pushed the branch-cudf-streaming-python branch from e2f1058 to 33a20c5 Compare June 4, 2026 16:09
@vyasr
vyasr marked this pull request as ready for review June 4, 2026 16:09
@vyasr
vyasr requested review from a team as code owners June 4, 2026 16:09
vyasr added 7 commits June 4, 2026 18:28
…ution

- Add 'cudf_streaming' to build.sh VALIDARGS and build section so
  conda recipe's './build.sh cudf_streaming' invocation succeeds.
- Switch ci/test_wheel_cudf_streaming.sh to use rapids-download-from-github
  with rapids-package-name --stable for abi3 artifact resolution, matching
  how cudf handles Python-version-independent wheel downloads.
Copy comm, stream, and supporting fixtures directly into our conftest
instead of importing rapidsmpf.tests.conftest. The rapidsmpf test module
is not installed in wheel environments and the try/import/fallback logic
added unnecessary complexity. The fixtures are simple and self-contained.
…reaming

Use 'libcudf-streaming' instead of 'libcudf_streaming' in conda package
specs in dependencies.yaml for precision. The dependency file generator
propagates the fix to pyproject.toml as well.
- build.yaml: use min_by for stable-ABI wheel builds (match pr.yaml)
- parquet.pyi: fix Filter.__init__ parameter name (expression -> filter)
- partition.pyx: fix docstring reference to partition_and_pack
- channel_metadata.pxd: use except +ex_handler consistently
- Remove unnecessary pytest.importorskip for cudf_streaming.streaming
  (always available when running these tests)
- Add numpy to test dependencies since tests use it directly
@vyasr
vyasr requested a review from mroeschke June 4, 2026 19:11
@vyasr
vyasr force-pushed the branch-cudf-streaming-python branch from e0deb07 to 80d31c8 Compare June 4, 2026 19:12
Comment thread python/cudf_streaming/cudf_streaming/VERSION

@bdice bdice left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving with one comment.

@Matt711 Matt711 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor comments / question. Migration looks good.

Comment thread python/cudf_streaming/cudf_streaming/streaming/bloom_filter.pxd Outdated
Comment thread python/cudf_streaming/cudf_streaming/streaming/bloom_filter.pyx
Comment thread python/cudf_streaming/cudf_streaming/VERSION Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@ci/build_wheel_cudf_streaming.sh`:
- Line 18: The echo line uses an unquoted ${LIBCUDF_STREAMING_WHEELHOUSE} which
can be word-split; update the echo to quote the variable expansion so
spaces/special chars are preserved, e.g. use "${LIBCUDF_STREAMING_WHEELHOUSE}"
inside the double-quoted string in the existing echo (reference the echo command
that writes "libcudf-streaming-${RAPIDS_PY_CUDA_SUFFIX} @ file://...") so the
path is not split while leaving the wildcard portion intact.

In `@python/cudf_streaming/cudf_streaming/tests/conftest.py`:
- Around line 55-71: The comm fixture currently skips tests if either transport
is missing; change the availability check to only skip when the requested
transport (request.param) is not present in COMMUNICATORS. In the comm function,
replace the global checks with a conditional that inspects
comm_name/request.param and calls pytest.skip only if that specific transport
(e.g., "mpi" or "ucxx") is not in COMMUNICATORS; keep the MPI barrier/yield
pattern and the yield of request.getfixturevalue(f"_{comm_name}_comm")
unchanged.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 128be7c7-22cb-4c51-85f7-cd479905195f

📥 Commits

Reviewing files that changed from the base of the PR and between e0deb07 and 32ca167.

📒 Files selected for processing (46)
  • .github/CODEOWNERS
  • .github/workflows/build.yaml
  • .github/workflows/pr.yaml
  • build.sh
  • ci/build_python.sh
  • ci/build_wheel_cudf_streaming.sh
  • ci/run_cudf_streaming_pytests.sh
  • ci/test_python_other.sh
  • ci/test_wheel_cudf_streaming.sh
  • ci/validate_wheel.sh
  • conda/recipes/cudf_streaming/conda_build_config.yaml
  • conda/recipes/cudf_streaming/recipe.yaml
  • dependencies.yaml
  • python/cudf_streaming/CMakeLists.txt
  • python/cudf_streaming/README.md
  • python/cudf_streaming/cudf_streaming/VERSION
  • python/cudf_streaming/cudf_streaming/__init__.py
  • python/cudf_streaming/cudf_streaming/integrations/CMakeLists.txt
  • python/cudf_streaming/cudf_streaming/integrations/__init__.pxd
  • python/cudf_streaming/cudf_streaming/integrations/__init__.py
  • python/cudf_streaming/cudf_streaming/integrations/partition.pxd
  • python/cudf_streaming/cudf_streaming/integrations/partition.pyi
  • python/cudf_streaming/cudf_streaming/integrations/partition.pyx
  • python/cudf_streaming/cudf_streaming/streaming/CMakeLists.txt
  • python/cudf_streaming/cudf_streaming/streaming/__init__.pxd
  • python/cudf_streaming/cudf_streaming/streaming/__init__.py
  • python/cudf_streaming/cudf_streaming/streaming/bloom_filter.pxd
  • python/cudf_streaming/cudf_streaming/streaming/bloom_filter.pyi
  • python/cudf_streaming/cudf_streaming/streaming/bloom_filter.pyx
  • python/cudf_streaming/cudf_streaming/streaming/channel_metadata.pxd
  • python/cudf_streaming/cudf_streaming/streaming/channel_metadata.pyi
  • python/cudf_streaming/cudf_streaming/streaming/channel_metadata.pyx
  • python/cudf_streaming/cudf_streaming/streaming/parquet.pyi
  • python/cudf_streaming/cudf_streaming/streaming/parquet.pyx
  • python/cudf_streaming/cudf_streaming/streaming/partition.pyi
  • python/cudf_streaming/cudf_streaming/streaming/partition.pyx
  • python/cudf_streaming/cudf_streaming/streaming/table_chunk.pxd
  • python/cudf_streaming/cudf_streaming/streaming/table_chunk.pyi
  • python/cudf_streaming/cudf_streaming/streaming/table_chunk.pyx
  • python/cudf_streaming/cudf_streaming/tests/conftest.py
  • python/cudf_streaming/cudf_streaming/tests/test_bloom_filter.py
  • python/cudf_streaming/cudf_streaming/tests/test_channel_metadata.py
  • python/cudf_streaming/cudf_streaming/tests/test_partition.py
  • python/cudf_streaming/cudf_streaming/tests/test_read_parquet.py
  • python/cudf_streaming/cudf_streaming/tests/test_table_chunk.py
  • python/cudf_streaming/pyproject.toml
✅ Files skipped from review due to trivial changes (6)
  • .github/CODEOWNERS
  • python/cudf_streaming/cudf_streaming/integrations/init.pxd
  • python/cudf_streaming/cudf_streaming/VERSION
  • python/cudf_streaming/README.md
  • python/cudf_streaming/cudf_streaming/streaming/init.pxd
  • python/cudf_streaming/cudf_streaming/integrations/partition.pyi
🚧 Files skipped from review as they are similar to previous changes (32)
  • conda/recipes/cudf_streaming/conda_build_config.yaml
  • python/cudf_streaming/cudf_streaming/init.py
  • ci/validate_wheel.sh
  • .github/workflows/build.yaml
  • python/cudf_streaming/cudf_streaming/streaming/init.py
  • python/cudf_streaming/cudf_streaming/streaming/bloom_filter.pxd
  • .github/workflows/pr.yaml
  • python/cudf_streaming/cudf_streaming/streaming/partition.pyx
  • build.sh
  • python/cudf_streaming/cudf_streaming/integrations/partition.pxd
  • python/cudf_streaming/cudf_streaming/integrations/init.py
  • conda/recipes/cudf_streaming/recipe.yaml
  • ci/run_cudf_streaming_pytests.sh
  • python/cudf_streaming/cudf_streaming/streaming/bloom_filter.pyi
  • dependencies.yaml
  • python/cudf_streaming/cudf_streaming/streaming/partition.pyi
  • python/cudf_streaming/cudf_streaming/streaming/table_chunk.pxd
  • python/cudf_streaming/cudf_streaming/streaming/channel_metadata.pxd
  • ci/test_python_other.sh
  • python/cudf_streaming/cudf_streaming/streaming/channel_metadata.pyi
  • python/cudf_streaming/cudf_streaming/tests/test_partition.py
  • python/cudf_streaming/cudf_streaming/streaming/parquet.pyi
  • python/cudf_streaming/cudf_streaming/streaming/parquet.pyx
  • python/cudf_streaming/pyproject.toml
  • python/cudf_streaming/cudf_streaming/streaming/table_chunk.pyi
  • python/cudf_streaming/cudf_streaming/streaming/bloom_filter.pyx
  • python/cudf_streaming/cudf_streaming/tests/test_bloom_filter.py
  • python/cudf_streaming/cudf_streaming/tests/test_channel_metadata.py
  • python/cudf_streaming/cudf_streaming/streaming/channel_metadata.pyx
  • python/cudf_streaming/cudf_streaming/tests/test_read_parquet.py
  • python/cudf_streaming/cudf_streaming/streaming/table_chunk.pyx
  • python/cudf_streaming/cudf_streaming/tests/test_table_chunk.py

Comment thread ci/build_wheel_cudf_streaming.sh
Comment thread python/cudf_streaming/cudf_streaming/tests/conftest.py
@vyasr

vyasr commented Jun 4, 2026

Copy link
Copy Markdown
Contributor Author

/merge

@rapids-bot
rapids-bot Bot merged commit 1060966 into NVIDIA:main Jun 4, 2026
136 checks passed
@github-project-automation github-project-automation Bot moved this from In Progress to Done in cuDF Python Jun 4, 2026
@vyasr
vyasr deleted the branch-cudf-streaming-python branch June 4, 2026 22:58
rapids-bot Bot pushed a commit that referenced this pull request Jun 9, 2026
… imports (#22786)

This PR updates the cudf_polars execution engine to import cudf-specific streaming primitives from the new `cudf_streaming` package instead of from `rapidsmpf` directly.

This is part of the ongoing work to make the dependency between cudf and rapidsmpf unidirectional by moving cudf-specific streaming code into the cudf repository.

**Dependencies:**
- #22760 (cudf_streaming Python package)

**Changes:**
- Update cudf_polars source to import from `cudf_streaming` instead of `rapidsmpf` for cudf-specific streaming types
- Update cudf_polars tests accordingly

Authors:
  - Vyas Ramasubramani (https://github.com/vyasr)
  - Peter Andreas Entschev (https://github.com/pentschev)
  - Bradley Dice (https://github.com/bdice)

Approvers:
  - Matthew Roeschke (https://github.com/mroeschke)
  - Mads R. B. Kristensen (https://github.com/madsbk)
  - Bradley Dice (https://github.com/bdice)
  - Matthew Murray (https://github.com/Matt711)
  - Peter Andreas Entschev (https://github.com/pentschev)
  - Niranda Perera (https://github.com/nirandaperera)
  - Tom Augspurger (https://github.com/TomAugspurger)

URL: #22786
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CMake CMake build issue feature request New feature or request libcudf Affects libcudf (C++/CUDA) code. non-breaking Non-breaking change Python Affects Python cuDF API.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants