cudf icon indicating copy to clipboard operation
cudf copied to clipboard

Ensure IR.do_evaluate signature is correct

Open TomAugspurger opened this issue 2 months ago • 3 comments

Description

This updates the signature of our IR.do_evaluate nodes to follow our convention of being a classmethod with *non_child_args, *children, *, context

It also adds a new pre-commit hook to validate that our subclasses meet this requirement, by parsing the AST of our files defining IR nodes. Doing it incorrectly will result in errors like

❯ pre-commit run cudf-polars-ir-signatures --all-files                                                                                                                                                                                                                                                                           (base) 
cudf-polars-ir-signatures................................................Failed
- hook id: cudf-polars-ir-signatures
- duration: 0.09s
- exit code: 1

Found errors in IR node signatures:

  python/cudf_polars/cudf_polars/dsl/ir.py:1534: Rolling: Mismatch between 'self._non_child_args' and 'cls._non_child' argument '_non_child_args'

Closes https://github.com/rapidsai/cudf/issues/20481

TomAugspurger avatar Nov 18 '25 16:11 TomAugspurger

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.

copy-pr-bot[bot] avatar Nov 18 '25 16:11 copy-pr-bot[bot]

/ok to test fb31b44

TomAugspurger avatar Nov 21 '25 16:11 TomAugspurger

/ok to test 1c66ed3

TomAugspurger avatar Nov 22 '25 21:11 TomAugspurger