Commit graph

4 commits

Author SHA1 Message Date
Esun Kim
807c35d6a9
Bazel Module (#3364)
* Work

* Review update

* Enabled tests

* Bazel: Suppress warnings from external repositories

* Fixed whl_test

* Formatted

* More format
2026-02-11 14:11:47 -08:00
Ryan Kuester
bbf70db499
feat(compression): add SpecBuilder for programmatic compression specs (#3133)
Add a fluent builder API for creating compression specifications
without writing YAML strings. This is useful in scripts and
Jupyter notebooks.

Example usage:
    spec = (compression.SpecBuilder()
        .add_tensor(subgraph=0, tensor=2)
            .with_lut(index_bitwidth=4)
        .build())

BUG=#3125

Co-authored-by: suleshahid <110432064+suleshahid@users.noreply.github.com>
2025-07-10 16:32:57 -04:00
Ryan Kuester
f50a6eaafd
feat(python): add compression module to tflite_micro Python package (#3129)
feat(python): add compression module to tflite_micro Python package

Integrate the TFLM compression tools into the tflite_micro Python
package, allowing users to compress models directly from Python code
that imports the package.

Usage:
  from tflite_micro import compression

Details:
- Add compress_lib py_library target in compression BUILD
- Create compression package with __init__.py exposing public API
- Include compression module in Python package dependencies
- Add compression dependencies to wheel requirements

BUG=see description
2025-07-08 20:18:04 +00:00
Ryan Kuester
ca74563c11
feat: build and test a Python distribution package tflite_micro (#2151)
Add the build configuration and integrated test to generate a Python
distribution package named `tflite_micro` for publishing the tflm interpreter
as a Python module with a native extension.

Use the build tools provided in @rules_python, augmented by a custom rule
`py_namespace` for the reasons documented in `python/py_namespace.bzl`.

Provide an integration test at `//python/tflite_micro:whl_test`. Use a .tflite
model copied from the hello_world example. (Copied to avoid creating a
dependency.)

BUG=part of #1484
2023-08-01 22:27:53 +00:00