[Lane 4 · kotlin-core] tokenizer.json parity — fixture-gated jvmTest replaying the goldens through TokenizerFactory.fromTokenizerJson
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 半天
- 新手友好度
- 75/100
- Issue 类型
- 功能
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- kotlin
调研方向
Start by reading QwenByteLevelBpeTokenizerFixtureTest.kt and the downloadQwenTokenizerFixtures task in skainet-io-core/build.gradle.kts; the issue gives both as templates. Add TokenizerJsonGoldenParityTest.kt and a task that downloads and verifies the two golden fixtures, then run the listed Gradle command. Done means the test skips when fixtures are absent and, with fixtures present, checks vocabulary size and encoded IDs while reporting text, expected IDs and tokens, and actual IDs.
由索引模型根据 Issue 内容生成。
描述
Sub-issue of #1321 (HF tokenizer.json parity for BPE encoders).
Lane: 4 · Ground truth / CI
Skill needed: Kotlin and Gradle. You will copy an existing test file and an existing download task; no tokenizer internals needed.
Size: s (a few hours)
Blocked by: the golden-generation lane (needs the JSON files). Can be merged before the Kotlin fixes — it is allowed to fail on the not-yet-fixed rows if you mark them, see Notes.
What to do
- Copy QwenByteLevelBpeTokenizerFixtureTest.kt to
TokenizerJsonGoldenParityTest.ktin the samejvmTestpackage. Keep the "skip with a printed notice when the fixture is absent" behaviour. - Copy the
downloadQwenTokenizerFixturestask in skainet-io-core/build.gradle.kts#L148-L153 into adownloadTokenizerJsonGoldenFixturestask that fetches the two Layatokenizer.jsonfiles intobuild/test-fixtures/tokenizer-goldens/<name>/tokenizer.jsonfrom the HubresolveURL at the pinned revision, and verifies the SHA-256 stored in the golden JSON. - In the test, for each golden JSON in
src/jvmTest/resources/tokenizer-goldens/: load the matchingtokenizer.jsonthroughsk.ainet.io.tokenizer.TokenizerFactory.fromTokenizerJson, assertvocabSize == vocab_size_with_added, then for every case assertencode(text).toList() == idswith a message that prints the text, the expected and the actual ids and the expected token strings (thetokensarray) — that is what makes a failure diagnosable without Python. - Parse the golden JSON with
kotlinx.serialization.json(already a dependency of the module). - Run
./gradlew :skainet-io:skainet-io-core:downloadTokenizerJsonGoldenFixtures :skainet-io:skainet-io-core:jvmTest --tests '*TokenizerJsonGoldenParityTest*'.
Acceptance
- Test self-skips when the fixtures are absent (CI without network stays green)
- With fixtures present and all sibling lanes merged, every case in both goldens passes
- Failure output shows text, expected ids + tokens, actual ids
- Result reported back on #1321
Notes
To merge this before the fixes land, support an optional "expectedToFail": "<issue url>" field per case in the golden JSON and turn those cases into "assert it still fails, otherwise tell the developer to remove the marker" — the same canary pattern #912 describes. Then each fix lane removes its markers in its own PR, and the test is the progress bar.
- 主要语言
- Kotlin
- 星标
- 52
- 派生
- 15
- 平均合并
- 1 天 15 小时
- 30 天内合并 PR
- 36
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
SKaiNET-developers/SKaiNET 的其他 Issue
-
coding good first issue size:xs skill:kotlin-core sub-issue
难度 2/5 1-3 小时 新手友好度 88/100
SKaiNET-developers/SKaiNET#1323 ·
维护者通常 1 天内回复
-
coding good first issue platform size:xs skill:js sub-issue
难度 2/5 1-3 小时 新手友好度 72/100
SKaiNET-developers/SKaiNET#1232 ·
维护者通常 1 天内回复
-
skeep tracking
难度 5/5 一周以上 新手友好度 15/100
SKaiNET-developers/SKaiNET#1331 ·
维护者通常 1 天内回复
-
assessment size:s skill:review sub-issue
难度 4/5 1-2 天 新手友好度 18/100
SKaiNET-developers/SKaiNET#1330 ·
维护者通常 1 天内回复
-
documentation good first issue size:s skill:docs sub-issue
难度 3/5 1-2 天 新手友好度 78/100
SKaiNET-developers/SKaiNET#1329 ·
维护者通常 1 天内回复
查看 SKaiNET-developers/SKaiNET 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 83/100
Kotlin/kotlin-lsp#288 ·
-
afk-ok area:data-quality importer size:S
难度 2/5 1-3 小时 新手友好度 77/100
enorm-labs/event-junkie#3166 ·
维护者通常 1 天内回复
-
enhancement good first issue
难度 2/5 1-3 小时 新手友好度 84/100
rajpreetcodes/Skills_MCP_Server#25 ·
维护者通常 1 天内回复
-
bugbane/qf good first issue
难度 2/5 1-3 小时 新手友好度 64/100
osservatorionessuno/bugbane#173 ·
维护者通常 1 天内回复
-
Android: build fails with Android Gradle Plugin 9 (kotlinOptions, lintOptions, proguard-android.txt)未关闭
难度 2/5 1-3 小时 新手友好度 78/100
capacitor-community/stripe#544 ·
维护者通常 1 天内回复