Skip to content

Add agent skill for cudf_polars expressions - #23078

Merged
rapids-bot[bot] merged 15 commits into
rapidsai:mainfrom
mroeschke:cudf_polars/skill/expressions_impl
Jul 8, 2026
Merged

Add agent skill for cudf_polars expressions#23078
rapids-bot[bot] merged 15 commits into
rapidsai:mainfrom
mroeschke:cudf_polars/skill/expressions_impl

Conversation

@mroeschke

Copy link
Copy Markdown
Contributor

Description

I used a more barebones prompt that resembles this PR to implement #23015 and #23037, but I think it could be generally be useful to have when implementing reviewing expression support in cudf_polars.

Some of the guidelines is probably more suitable for generally cudf_polars development, but this skill is mainly a starting point that can be iterated on/split out

Checklist

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

@mroeschke mroeschke self-assigned this Jul 2, 2026
@mroeschke mroeschke added improvement Improvement / enhancement to an existing function non-breaking Non-breaking change labels Jul 2, 2026
@coderabbitai

coderabbitai Bot commented Jul 2, 2026

Copy link
Copy Markdown

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Adds a new skill document for reviewing and implementing Polars Expression support in cudf_polars, with success criteria, validation steps, implementation guidance, and testing requirements.

Changes

Skill Documentation

Layer / File(s) Summary
Skill definition and success criteria
.agents/skills/review-cudf-polars-expressions/SKILL.md
Introduces the skill entry with description and success criteria for GPU-only execution, IR-time error handling, version coverage, and pre-commit compliance.
Validation workflow
.agents/skills/review-cudf-polars-expressions/SKILL.md
Documents prerequisites and steps to validate Polars expression behavior and current cudf_polars support with pl.GPUEngine(..., raise_on_fail=True) across partitioning settings.
Implementation and testing guidance
.agents/skills/review-cudf-polars-expressions/SKILL.md
Describes single- and multi-partition implementation placement plus unit test requirements, including engine fixture usage and float comparison options.

Estimated code review effort: 1 (Trivial) | ~3 minutes

Suggested labels: doc, cudf-polars, Python, 3 - Ready for Review

Suggested reviewers: rjzamora, TomAugspurger

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly matches the main change: adding an agent skill for cudf_polars expressions.
Description check ✅ Passed The description is directly related and explains the new cudf_polars expression review skill and its intended use.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

@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 @.agents/skills/review-cudf-polars-expressions/SKILL.md:
- Around line 75-89: Remove the hidden HTML comment blocks in SKILL.md and keep
any TODO guidance in visible markdown instead. Update the Step 4 section by
deleting the commented placeholders around the cudf-polars testing guidance so
downstream consumers only see the intended markdown content.
- Around line 44-46: The second GPUEngine example has an extra closing
parenthesis in the `collect` engine argument, causing a syntax error. Update the
`pl.GPUEngine(executor="streaming", raise_on_fail=True,
executor_options={"max_rows_per_partition": 2})` usage in the Step 1 examples so
the parentheses are balanced, and keep both streaming `collect` variations
aligned with the `GPUEngine` symbol in the SKILL.md instructions.
🪄 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: 67327162-0e88-4b22-8a57-e9779f7c8786

📥 Commits

Reviewing files that changed from the base of the PR and between 226a17a and f2bca25.

📒 Files selected for processing (1)
  • .agents/skills/review-cudf-polars-expressions/SKILL.md

Comment thread .agents/skills/review-cudf-polars-expressions/SKILL.md Outdated
Comment thread .agents/skills/review-cudf-polars-expressions/SKILL.md Outdated
Comment thread .agents/skills/review-cudf-polars-expressions/SKILL.md Outdated
* The Python APIs for expressions are mostly defined in the `py-polars/src/polars/expr` directory in a Polars repository.
* Expressions are eventually exposed to cudf-polars in Rust in the `crates/polars-python/src/lazyframe/visitor/expr_nodes.rs` file in a Polars repository

Next, generate examples locally with the expression(s) to implement or review to further understand the behavior.

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.

Idle thought: is generating examples better? Or should we tell it to find the relevant tests in the polars repo?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I suppose it doesn't hurt to instruct an agent to look at Polars unit tests for understanding, but I'll keep the example generation since in a later step I added to use generated example to generate unit tests

Comment thread .agents/skills/review-cudf-polars-expressions/SKILL.md Outdated

TODO: Add more guidance on a multiple partition implementation.

## Step 4: Test the Polars expression implementation in cudf-polars

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.

Should we move (part of) this to before the implementation, to encourage writing a failing test first?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Instead in the testing section, I instructed the agent to git stash the implementation and run the new test to check that they fail as expected first.

@mroeschke

Copy link
Copy Markdown
Contributor Author

/merge

@rapids-bot
rapids-bot Bot merged commit 97a5818 into rapidsai:main Jul 8, 2026
258 of 261 checks passed
@mroeschke
mroeschke deleted the cudf_polars/skill/expressions_impl branch July 8, 2026 20:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

improvement Improvement / enhancement to an existing function non-breaking Non-breaking change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants