Skip to content

feat(python): enable compression in the official pypi package #3145

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

rkuester
Copy link
Contributor

Enable TFLM compression support in the official Python package builds
by adding --//:with_compression=true to the bazel commands in
pypi_build.sh.

This ensures that:

  • Users who install tflite_micro from PyPI can use compressed models
  • The compression module functionality is available out of the box
  • Both the wheel build and tests run with compression enabled

The Python package is primarily used for testing and development
on desktop/server systems, not on embedded targets. There's no
benefit to disabling compression support to save a few kilobytes
when the package runs on machines with gigabytes of RAM. Enabling
compression by default provides a better developer experience
without any practical downside.

BUG=#3125

Enable TFLM compression support in the official Python package builds
by adding --//:with_compression=true to the bazel commands in
pypi_build.sh.

This ensures that:
- Users who install tflite_micro from PyPI can use compressed models
- The compression module functionality is available out of the box
- Both the wheel build and tests run with compression enabled

The Python package is primarily used for testing and development
on desktop/server systems, not on embedded targets. There's no
benefit to disabling compression support to save a few kilobytes
when the package runs on machines with gigabytes of RAM. Enabling
compression by default provides a better developer experience
without any practical downside.

BUG=tensorflow#3125
@rkuester rkuester marked this pull request as ready for review July 14, 2025 15:05
@rkuester rkuester requested a review from a team as a code owner July 14, 2025 15:05
@rkuester rkuester requested review from pyu10055 and removed request for pyu10055 July 14, 2025 15:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants