[Lane 4 · kotlin-core] tokenizer.json parity — fixture-gated jvmTest replaying the goldens through TokenizerFactory.fromTokenizerJson
Les mainteneurs répondent en général sous 1 jour
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 3/5
- Temps estimé
- Une demi-journée
- Accessibilité débutants
- 75/100
- Type d'issue
- Fonctionnalité
- Clarté
- Clairement spécifiée
- Activité
- Active
- Stack technique
- kotlin
- Domaine
- machine-learning, testing
Piste de recherche
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.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
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.
- Langage dominant
- Kotlin
- Étoiles
- 52
- Forks
- 15
- Merge moyen
- 23 h 43 min
- PR mergées (30 j)
- 82
Préparer son environnement
- Aucun Dockerfile ni fichier Docker Compose
- Aucun modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de SKaiNET-developers/SKaiNET
-
coding size:s skill:kotlin-core sub-issue
Difficulté 2/5 1-3 heures Accessibilité débutants 76/100
SKaiNET-developers/SKaiNET#1421 ·
Les mainteneurs répondent en général sous 1 jour
-
coding size:s skill:kotlin-core sub-issue
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
SKaiNET-developers/SKaiNET#1419 ·
Les mainteneurs répondent en général sous 1 jour
-
[Lane 2 · kotlin-core] NotImplemented stubs — Markdown output for the operator docs generatorOuvertecoding good first issue size:s skill:kotlin-core sub-issue
Difficulté 2/5 1-3 heures Accessibilité débutants 82/100
SKaiNET-developers/SKaiNET#1418 ·
Les mainteneurs répondent en général sous 1 jour
-
coding good first issue size:s skill:kotlin-core sub-issue
Difficulté 2/5 1-3 heures Accessibilité débutants 84/100
SKaiNET-developers/SKaiNET#1416 ·
Les mainteneurs répondent en général sous 1 jour
-
coding size:s skill:kotlin-core sub-issue
Difficulté 2/5 1-3 heures Accessibilité débutants 65/100
SKaiNET-developers/SKaiNET#1410 ·
Les mainteneurs répondent en général sous 1 jour
Toutes les issues de SKaiNET-developers/SKaiNET
Issues similaires
-
documentation good first issue help wanted P2 roadmap-v4
Difficulté 2/5 1-3 heures Accessibilité débutants 82/100
maziyarpanahi/openmed#5425 ·
Les mainteneurs répondent en général sous 3 jours
-
Difficulté 1/5 Moins d'une heure Accessibilité débutants 80/100
pengchujin/aerial-tv#1355 · 3 commentaires ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 74/100
QuranHub/quranhub-android#354 ·
Les mainteneurs répondent en général sous 2 jours
-
Difficulté 2/5 1-3 heures Accessibilité débutants 76/100
wangzan101/Mika#401 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 74/100
Les mainteneurs répondent en général sous 2 jours