Split Python publishing: nlpo3 (base) + nlpo3-deepcut (optional ONNX package)#104
Draft
Copilot wants to merge 1 commit into
Draft
Split Python publishing: nlpo3 (base) + nlpo3-deepcut (optional ONNX package)#104Copilot wants to merge 1 commit into
Copilot wants to merge 1 commit into
Conversation
… packages Agent-Logs-Url: https://github.com/PyThaiNLP/nlpo3/sessions/534769b5-7d6a-4616-9dff-a15552dbc2c4 Co-authored-by: bact <128572+bact@users.noreply.github.com>
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.
Bundling the deepcut ONNX model and
tract-onnxruntime into everynlpo3wheel added ~7 MB to an install most users don't need. This splits the Python publication into a lightweight base and an opt-in deepcut package.New packages
nlpo3nlpo3-python/NewmmTokenizer,NewmmFstTokenizer, deepcut shimnlpo3-deepcutnlpo3-deepcut-python/DeepcutTokenizer+ ONNX model +tract-onnxBase package (
nlpo3)deepcutCargo feature → notract-onnx, nondarray, no embedded ONNX bytesDeepcutTokenizerremains importable fromnlpo3as a Python-level forwarding shim:nlpo3_deepcut.DeepcutTokenizeris constructed and returnedImportErrorwith install hintNew
nlpo3-deepcutpackagenlpo3-deepcut-python/— full package withCargo.toml,pyproject.toml,src/lib.rs, Python package, stubs, testsdeepcutfeature (default); embedsmodel/deepcut.onnxviainclude_bytes!nlpo3~=2.0runtime dependencyDeepcutTokenizeraccessible directly or via base shim — same call site, same resultsCI
build-python-wheels.yml: adds parallelbuild_wheels_deepcut/build_sdist_deepcutjobs;publish_pypiuploads both packagestest-nlpo3-python.yml: addstest-python-deepcutjob; base job no longer needs deepcut availableDocs
docs/design.md: "Proposed split packaging" → implemented; updated with actual layout and behaviordocs/implementation.md: new "Split Python packaging" section documenting shim mechanics and module namesCHANGELOG.md: breaking-change note with migration instructions