Reduce TF-Text wheel size by filtering ICU 77 data and stripping binaries. - #1539
Merged
Conversation
copybara-service
Bot
force-pushed
the
test_967959313
branch
2 times, most recently
from
August 20, 2026 18:59
d7df0a8 to
30e472f
Compare
…ries.
- Regenerate `normalization_data.c.oss` using ICU 77.1 with `filters.json` enabled ("normalization": "include") rather than bundling the entire unfiltered ICU data archive. This reduces the source data file from ~91 MB to ~616 KB (and compiled in-binary `.rodata` from ~32 MB to ~220 KB across dependent shared libraries).
- Add shared library symbol stripping (`strip -x` on macOS, `strip --strip-unneeded` on Linux) in `build_pip_package.py` to eliminate unnecessary DWARF debug sections and local symbol tables from wheels.
- Drops the final `.whl` package size from ~60-95 MB down to ~5-7 MB, resolving PyPI upload limits.
PiperOrigin-RevId: 967966028
copybara-service
Bot
force-pushed
the
test_967959313
branch
from
August 20, 2026 19:01
30e472f to
9c8dad9
Compare
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.
Reduce TF-Text wheel size by filtering ICU 77 data and stripping binaries.
normalization_data.c.ossusing ICU 77.1 withfilters.jsonenabled ("normalization": "include") rather than bundling the entire unfiltered ICU data archive. This reduces the source data file from ~91 MB to ~616 KB (and compiled in-binary.rodatafrom ~32 MB to ~220 KB across dependent shared libraries).strip -xon macOS,strip --strip-unneededon Linux) inbuild_pip_package.pyto eliminate unnecessary DWARF debug sections and local symbol tables from wheels..whlpackage size from ~60-95 MB down to ~5-7 MB, resolving PyPI upload limits.