Repository navigation
fastokens: Add version 0.3.2 - #2234
Merged
Merged
Conversation
Signed-off-by: riseproject-dev[bot] <330740410+riseproject-dev[bot]@users.noreply.github.com>
Contributor
|
The riscv64 build wasn't failing on the version bump itself: the wheel
built fine, and the failure was 4 pytest failures in the new (v0.3.2)
python/tests/test_decode_sanitize.py, all
'ValueError: model error: unsupported model type: Other'.
Root cause upstream: the fixture's vocab is {"h": 1, "e": 2, "l": 3,
"o": 4} (no token id 0). Bpe::new() requires vocab ids to be a
contiguous range from 0, so building it errors with 'non-contiguous
tokens - token 0 is missing'. Because ModelConfig is
#[serde(tag = "type")] with an Other(Value) #[serde(untagged)] fallback
variant, serde silently swallows that TryFrom<RawBpe> error and lands on
ModelConfig::Other instead of propagating it -- hence the confusing
'unsupported model type: Other' rather than the real error. This is a
plain logic bug, not riscv64-specific; upstream's own CI never catches
it because ci.yml runs 'cargo test' (not the Python suite) and never
runs pytest against python/tests.
Add an unused id-0 vocab entry so the vocab is contiguous; every id the
tests actually exercise (1-4) is unchanged. Wire the patch into
build-fastokens.yml the same way other patched packages do: a second
checkout of python-wheels and a 'git apply' before the build, plus
patches/fastokens/** in the pull_request/push path triggers.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Automatically generated by the nightly
check_versions.pyrun.fastokens v0.3.1 -> v0.3.2
Every
- version:entry added todocs/packages/fastokens.yamlis built by this PR's ownbuild-fastokens.ymlrun; merging publishes the wheels.