huggingface / swift-transformers

Swift Package to implement a transformers-like API in Swift

Repository from Github https://github.comhuggingface/swift-transformersRepository from Github https://github.comhuggingface/swift-transformers

v0.1.15 violated semver and is failing builds

davedelong opened this issue · comments

Today's new tag of 0.1.15 added a new required method to the Tokenizer protocol, introduced in #148. Now anything that's depending on swift-transformers no longer builds correctly because a patch version added an API-breaking change.

Changes that break source compatibility should be major changes: https://semver.org

I understand that this is a 0.x release, but please … provide default implementations unless it's absolutely required.

Hi Dave, nice to see you here, thanks for writing!

I'm sorry this caused you trouble and I appreciate you pointing it out - at the time I didn't realize we were adding a new required method and mistakenly thought that the implementation provided in the PR would be enough for all users. Sorry!

Nevertheless, I don't think it will affect anything that's depending on the package; it would only affect codebases that provide their own Tokenizer implementation, and I believe most don't. I don't think it caused issues with WhisperKit, which was mentioned in your original message, or with something like swift-chat, which hasn't had updates in a while and compiles cleanly with main. I also tested MLX locally with no issues.

Thanks again!