Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

[Lane 4 · kotlin-core] tokenizer.json parity — fixture-gated jvmTest replaying the goldens through TokenizerFactory.fromTokenizerJson

Đang mở
#1,328 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
Nửa ngày
Mức phù hợp với người mới
75/100
Loại issue
Tính năng
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
kotlin
Lĩnh vực
machine-learning, testing

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

coding good first issue size:s skill:kotlin-core sub-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

  1. Copy QwenByteLevelBpeTokenizerFixtureTest.kt to TokenizerJsonGoldenParityTest.kt in the same jvmTest package. Keep the "skip with a printed notice when the fixture is absent" behaviour.
  2. Copy the downloadQwenTokenizerFixtures task in skainet-io-core/build.gradle.kts#L148-L153 into a downloadTokenizerJsonGoldenFixtures task that fetches the two Laya tokenizer.json files into build/test-fixtures/tokenizer-goldens/<name>/tokenizer.json from the Hub resolve URL at the pinned revision, and verifies the SHA-256 stored in the golden JSON.
  3. In the test, for each golden JSON in src/jvmTest/resources/tokenizer-goldens/: load the matching tokenizer.json through sk.ainet.io.tokenizer.TokenizerFactory.fromTokenizerJson, assert vocabSize == vocab_size_with_added, then for every case assert encode(text).toList() == ids with a message that prints the text, the expected and the actual ids and the expected token strings (the tokens array) — that is what makes a failure diagnosable without Python.
  4. Parse the golden JSON with kotlinx.serialization.json (already a dependency of the module).
  5. 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.

Ngôn ngữ chính
Kotlin
Star
52
Fork
15
Merge trung bình
1 ngày 15 giờ
Pull request đã merge (30 ngày)
36

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của SKaiNET-developers/SKaiNET

Tất cả issue của SKaiNET-developers/SKaiNET

Issue tương tự

Thêm issue về Kotlin

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.