Skip to content

test(python): rewrite unsupported-compression test for legacy path - #3646

Open
rkuester wants to merge 1 commit into
tensorflow:mainfrom
rkuester:feat-decode/legacy-test-rewrite
Open

test(python): rewrite unsupported-compression test for legacy path#3646
rkuester wants to merge 1 commit into
tensorflow:mainfrom
rkuester:feat-decode/legacy-test-rewrite

Conversation

@rkuester

@rkuester rkuester commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

An upcoming change switches compress() to emitting DECODE-based
models. The Python ops resolver registers the DECODE operator
unconditionally, so those models load successfully even in a build
without compression support. That breaks this test's original
approach, which ran a model through compress() and expected the load
to fail. Rewrite it to instead inject a raw COMPRESSION_METADATA
entry into the flatbuffer via model_editor, directly exercising the
HasCompressionMetadata() detection path for legacy-compressed models.

Decoupling the test from compress() output lets it verify the
legacy-rejection behavior independently of what compress() emits, so
it passes both before and after the switch.

BUG=part of #3256

An upcoming change switches compress() to emitting DECODE-based
models. The Python ops resolver registers the DECODE operator
unconditionally, so those models load successfully even in a build
without compression support. That breaks this test's original
approach, which ran a model through compress() and expected the load
to fail. Rewrite it to instead inject a raw COMPRESSION_METADATA
entry into the flatbuffer via model_editor, directly exercising the
HasCompressionMetadata() detection path for legacy-compressed models.

Decoupling the test from compress() output lets it verify the
legacy-rejection behavior independently of what compress() emits, so
it passes both before and after the switch.

BUG=part of tensorflow#3256
@rkuester
rkuester requested a review from a team as a code owner August 1, 2026 22:24
@rkuester rkuester added the ci:full Triggers the comprehensive cross-platform test suite. label Aug 1, 2026
@rkuester
rkuester deployed to integration-test August 1, 2026 22:24 — with GitHub Actions Active
@rkuester
rkuester requested a review from veblush August 1, 2026 23:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci:full Triggers the comprehensive cross-platform test suite.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant