Skip to content

Conversation

@TomAugspurger
Copy link
Contributor

Description

#20709 and
#18778 recently changed DatetimeIndex to preserve freq in more places.

This exposed an issue in how we serialize the properties of a DatetimeIndex: a DateOffset instance isn't serializable by msgpack. Distributed msgpack serialize the headers of messages, and so putting the DateOffset freq there caused issues.

Instead of inserting the DateOffset itself, we insert the kwds that can be used to reconstruct it when deserializing.

Note that this is targeted at release/25.12, because that's where #18778 and #20709 landed and this is affecting dask shuffle operations.

Closes rapidsai/dask-upstream-testing#88

rapidsai#20709 and
rapidsai#18778 recently changed
DatetimeIndex to preserve `freq` in more places.

This exposed an issue in how we serialize the properties of a DatetimeIndex:
a `DateOffset` instance isn't serializable by msgpack. Distributed
msgpack serialize the headers of messages, and so putting the
`DateOffset` freq there caused issues.

Instead of inserting the `DateOffset` itself, we insert the `kwds` that
can be used to reconstruct it when deserializing.

Closes rapidsai/dask-upstream-testing#88
@TomAugspurger TomAugspurger requested a review from a team as a code owner November 24, 2025 15:07
@github-actions github-actions bot added the Python Affects Python cuDF API. label Nov 24, 2025
@GPUtester GPUtester moved this to In Progress in cuDF Python Nov 24, 2025
@TomAugspurger TomAugspurger added non-breaking Non-breaking change bug Something isn't working labels Nov 24, 2025
@galipremsagar
Copy link
Contributor

/merge

@gforsyth gforsyth merged commit 181bd7b into rapidsai:release/25.12 Nov 24, 2025
229 of 233 checks passed
@github-project-automation github-project-automation bot moved this from In Progress to Done in cuDF Python Nov 24, 2025
@TomAugspurger TomAugspurger deleted the tom/dask-serialize-datetimeinddex-freq branch November 24, 2025 18:20
TomAugspurger added a commit to TomAugspurger/pygdf that referenced this pull request Nov 26, 2025
…ze-datetimeinddex-freq

`DatetimeIndex.serialize()` headers are msgpack serializable
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working non-breaking Non-breaking change Python Affects Python cuDF API.

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants