-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Description
What happened?
This morning, an update to the Hugging Face tokenizers
library caused a breaking change to all DSPy users, because DSPy pulls the latest tokenizers version. I was able to bypass this issue by downgrading the version of tokenizers myself, but this took a lot of time to dig through the issues and find that downgrading the tokenizers library would solve the problem.
dependencies = [
"dspy>=3.0.0b3",
"tokenizers==0.21.2",
]
This is imo a little too lax, and introduced unintended breaking points because tokenizers
is a fast-moving project and can introduce breaking changes like this, this totally breaks DSPy installs too, causing unnecessary headaches for users. Because Tokenizers is not a critical dependency for DSPy (not every user needs it and is even aware it's being installed under the hood), and because DSPy itself moves at a rapid pace, it's worth pinning the non-critical deps like this so that such annoying breaking changes upstream don't block newcomers to DSPy who are still learning the ropes.
Steps to reproduce
uv add dspy
This is broken and fails to work (as of 5 pm UTC on 28 July 2025).
DSPy version
3.0.0b3