Repository navigation
[https://nvbugs/7054722][fix] Pin sentencepiece below 0.2.3 - #21790
Conversation
…ve mbart test sentencepiece 0.2.3 (released 2026-11-05) ships sentencepiece_model_pb2.py generated by protobuf 7.36.1. requirements.txt pins protobuf<7, so importing it fails with a protobuf VersionError. transformers then falls back to tiktoken, which cannot parse sentencepiece.bpe.model, and the mbart test fails with "ValueError: Error parsing line b'\x0e'". Pin sentencepiece below 0.2.3 and remove the waiver for the mbart test. Signed-off-by: Weimin Wang <[email protected]>
|
/bot run --stage-list "L40S-PyTorch-1, L40S-PyTorch-2" |
|
No actionable comments were generated in the recent review. WalkthroughThe ChangesDependency Constraint
Estimated code review effort: 1 (Trivial) | ~5 minutes Change: Bug fix Suggested reviewers: Merge Risk:
|
|
PR_Github #83065 [ run ] triggered by Bot. Commit: |
sunnyqgg
left a comment
There was a problem hiding this comment.
Thanks for the quick root-cause. I checked it, and the pin itself is right. sentencepiece 0.2.3's sentencepiece_model_pb2.py is protobuf 7.36.1 gencode, and its runtime version check fails under protobuf<7; 0.2.2 has no such check. <0.2.3 (rather than !=0.2.3) is right because upstream master still ships 7.36.1 gencode. CI installs requirements.txt through requirements-dev.txt, so the cap takes effect there. Findings: 1 blocker, 0 possibly blocking, 1 required, 2 nice to have. No pre-merge pipeline has run on f286c55 yet.
- [Required] release/1.3: the description says nvbug 7054722 also fails there.
release/1.3has the samesentencepiece>=0.1.99,protobuf>=6.30.2,<7andtransformers==5.5.4(requirements.txt:25,112,41on that branch), and itsl0_l40s.yml:43still lists the mbart test. CONTRIBUTING.md asks NVIDIA developers to "submit feature or bug fixes to the dedicated branch specified in the nvbug Keywords field". Please confirm which branch the nvbug targets, and open and link the release/1.3 counterpart (the same two lines) or a cherry-pick, so the bug isn't closed while 1.3 still fails.
…ece cap comment Address review feedback: - Keep the waiver for the mbart test. Open PRs that branched before the waiver landed run their own requirements.txt without the cap, so removing the waiver now would make the test fail again for them. Remove it in a follow-up PR once the cap has been on main for a few days. - Reword the sentencepiece comment: 0.2.3 does not declare a protobuf requirement, and its gencode needs protobuf>=7.36.1. Add a note at the protobuf pin so the two caps are lifted together. Signed-off-by: Weimin Wang <[email protected]>
|
Thanks for the review. In c6c664c I kept the mbart waiver and will remove it in a follow-up once the cap has been on main for a few days. I also updated the comment as you suggested and added a note at the protobuf pin. I'll leave the CPU import test and the release/1.3 change out of this PR. |
sunnyqgg
left a comment
There was a problem hiding this comment.
Follow-up review on c6c664c: 0 Blockers, 0 possibly blocking, 2 Required, 2 Nice to have. The earlier Blocker is fixed: the PR no longer touches waives.txt, and the mbart waive stays at tests/integration/test_lists/waives.txt:166. The cap works: in the stage-list run on f286c55 (L0_Test-x86_64-Single-GPU #10533, L40S-PyTorch-1), pip resolved sentencepiece<0.2.3,>=0.1.99 to 0.2.2 against the image's protobuf 6.33.6, and test_mbart_pytorch_generate_encoder_decoder_end_to_end passed. c6c664c has not run CI yet.
- [Required] release/1.3 (raised in the earlier review, still open): nvbug 7054722 is filed against Main with empty Keywords, so targeting
mainhere is right. But the bug's CI-report comment showsLLM/release-1.3/L0_PostMerge #53(L40S-PyTorch-1) failing the same mbart test, andrelease/1.3still hassentencepiece>=0.1.99andprotobuf>=6.30.2,<7(requirements.txt:25,112) and no waive for it. There is no release/1.3 PR for this yet. Please open the release/1.3 counterpart (the samerequirements.txtlines) and link it here, or clone the nvbug for 1.3, so the bug is not closed by this PR while 1.3 still fails. - [Nice to have] CI coverage of the cap (raised in the earlier review, still open): with the waive kept, nothing in CI exercises the cap until the follow-up removes it. The mbart test is the CI test that caught this (#21771 waived only that case), and
import sentencepiecealone does not loadsentencepiece_model_pb2; only transformers' slow-to-fast tokenizer conversion does. A tiny cpu_only test undertests/unittest/others/(the whole directory is inl0_cpu.yml) that doesfrom sentencepiece import sentencepiece_model_pb2would cover it; otherwise please remove the waive soon after this lands.
|
PR_Github #83065 [ run ] completed with state |
…sentencepiece cap note sentencepiece 0.2.3 gencode calls ValidateProtobufRuntimeVersion(PUBLIC, 7, 36, 1), which also rejects 7.34 through 7.36.0 runtimes. Removing the protobuf <7 cap is not enough; the sentencepiece cap can only go once the protobuf floor reaches 7.36.1. Signed-off-by: Weimin Wang <[email protected]>
|
/bot run |
|
PR_Github #83326 [ run ] triggered by Bot. Commit: |
|
Automatically added "ci: full pre-merge approved" because this PR has satisfied the required GitHub review approvals. Unresolved review conversations and other required checks remain independent merge requirements. |
|
PR_Github #83326 [ run ] completed with state
|
|
/bot skip --comment "Only requirements.txt changes. Fix verified in L0_MergeRequest_PR #68619" |
|
PR_Github #83597 [ skip ] triggered by Bot. Commit: |
|
PR_Github #83597 [ skip ] completed with state |
Dev Engineer Review
requirements.txtconstrainssentencepieceto>=0.1.99,<0.2.3. Comments explain that version 0.2.3 requires protobuf>=7.36.1, which conflicts with the currentprotobuf<7constraint. The comments state that the sentencepiece cap should be lifted only after the protobuf floor reaches 7.36.1. The protobuf constraint did not change. Review findings: not available.QA Engineer Review
No test changes.
Per-File QA Perspective
requirements.txt: Verify dependency resolution with the sentencepiece cap and current protobuf constraint. The reported mBART test waiver was not changed in this diff.Description
Since 2026-11-05,
llmapi/test_llm_api_pytorch_bart.py::test_mbart_pytorch_generate_encoder_decoder_end_to_endfails on L40S on both main and release/1.3 (https://nvbugs/7054722):Root cause: sentencepiece 0.2.3 was released on PyPI on 2026-11-05. Its
sentencepiece_model_pb2.pyis generated by protobuf 7.36.1, butrequirements.txtpinsprotobuf>=6.30.2,<7, so the import fails:transformers then falls back to the tiktoken converter. That converter cannot parse the binary
sentencepiece.bpe.model, so it raises theValueErrorabove. sentencepiece 0.2.2 ships an older generated file with no runtime version check, so it works with protobuf 6.Changes:
sentencepiece>=0.1.99,<0.2.3inrequirements.txt. 0.2.3 does not declare a protobuf requirement, so pip cannot resolve around it. Add a note at the protobuf pin so the two caps are lifted together.requirements.txt, so open PRs that branched before the waiver landed would fail this test again if the waiver were removed here. I will remove it in a follow-up PR once the cap has been on main for a few days.release/1.3 has the same requirements and will likely need the same fix.
Note: I skipped the
openengine-bindings-checkpre-commit hook locally because grpcio 1.67.1 does not build on my machine (Python 3.14 on macOS). That hook only reads theprotobufandgrpciolines ofrequirements.txt, which this PR does not change. All other hooks passed.Test Coverage
llmapi/test_llm_api_pytorch_bart.py::test_mbart_pytorch_generate_encoder_decoder_end_to_end(L40S-PyTorch-1/2, pre-merge). The cap was checked on the first commit (f286c55), which also removed the waiver, with/bot run --stage-list "L40S-PyTorch-1, L40S-PyTorch-2".PR Checklist
Please review the following before submitting your PR:
PR description clearly explains what and why. If using CodeRabbit's summary, please make sure it makes sense.
PR Follows TRT-LLM CODING GUIDELINES to the best of your knowledge.
Test cases are provided for new code paths (see test instructions)
If PR introduces API changes, an appropriate PR label is added - either
api-compatibleorapi-breaking. Forapi-breaking, includeBREAKINGin the PR title.Any new dependencies have been scanned for license and vulnerabilities
CODEOWNERS updated if ownership changes
Documentation updated as needed
Update tava architecture diagram if there is a significant design change in PR.
The reviewers assigned automatically/manually are appropriate for the PR.
Please check this after reviewing the above items as appropriate for this PR.
GitHub Bot Help
To see a list of available CI bot commands, please comment
/bot help.🤖 Generated with Claude Code