Skip to content

ak.to_cudf fails with TypeError on cuDF 24.12 due to internal API changes #3783

@ianna

Description

@ianna

Version of Awkward Array

2.8.11

Description and code to reproduce

Description:

Calling ak.to_cudf on jagged or nested arrays fails when using cudf>=24.12.00. The internal cuDF column constructors (NumericalColumn and StructColumn) have changed their signatures, leading to TypeError when awkward attempts to pass the data keyword argument.

Reproducer:

import awkward as ak
import cudf

# 1. Jagged array failure (NumericalColumn)
arr_jagged = ak.Array([[[1, 2, 3], [], [3, 4]], []])
out_jagged = ak.to_cudf(arr_jagged)

# 2. Nested record failure (StructColumn)
arr_nested = ak.Array([{"a": {"b": 1}}, {"a": {"b": 2}}])
out_nested = ak.to_cudf(arr_nested)

Error Traceback:

For Jagged Arrays:

E TypeError: NumericalColumn.__init__() got an unexpected keyword argument 'data'
...
/awkward/contents/listoffsetarray.py:2015: in _to_cudf
> ind_buf = cudf.core.column.numerical.NumericalColumn(
    data=buf, dtype=index.dtype, mask=None, size=len(index)
  )

For Nested Records:

E TypeError: StructColumn.__init__() got an unexpected keyword argument 'data'
...
/awkward/contents/recordarray.py:1150: in _to_cudf
> return cudf.core.column.struct.StructColumn(
    data=None,
    children=children,
    dtype=dt,
    mask=m,
    size=length,
    offset=0,
)

Metadata

Metadata

Assignees

Labels

bugThe problem described is something that must be fixed

Type

No type

Projects

Status

In progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions