Skip to content

fix: encode string before hashing in _hash_partitioner - #736

Merged
mplatzer merged 1 commit into
mainfrom
fix/xxhash-string-encoding
Sep 7, 2026
Merged

fix: encode string before hashing in _hash_partitioner#736
mplatzer merged 1 commit into
mainfrom
fix/xxhash-string-encoding

Conversation

@mplatzer

@mplatzer mplatzer commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Pull Request

Changes

  • Encoded string to UTF-8 bytes before calling xxhash.xxh32_intdigest in _hash_partitioner.

Why this change?

With xxhash>=4.0.0, strings must be explicitly encoded as bytes before hashing; passing unencoded strings raised TypeError: Strings must be encoded before hashing, causing training data pulling to fail and tests to hang in test_constraints.py.

Testing

Ran uv run pytest -vv tests/_local/end_to_end -k 'not (client and mode)' (all 9 tests passed).

@mplatzer
mplatzer merged commit 9a3784e into main Sep 7, 2026
7 checks passed
@mplatzer
mplatzer deleted the fix/xxhash-string-encoding branch September 7, 2026 06:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant