[TF FE][Tests] Fix non-deterministic FILM model test failure#33977
Open
evkotov wants to merge 2 commits intoopenvinotoolkit:masterfrom
Open
[TF FE][Tests] Fix non-deterministic FILM model test failure#33977evkotov wants to merge 2 commits intoopenvinotoolkit:masterfrom
evkotov wants to merge 2 commits intoopenvinotoolkit:masterfrom
Conversation
The test test_tf_hub_api_notebook1[CPU-film] was randomly failing with "ValueError: operands could not be broadcast together with shapes (1,200,200,2) (1,6,6,2)" due to non-deterministic output selection. Root cause: - The test used list(film_layer.values())[0] to select the first output - Python dict iteration order is non-deterministic (PYTHONHASHSEED) - TensorFlow SavedModel signature uses protobuf map (no order guarantee) - Different runs could return different outputs (image vs flow pyramid) Fix: - Select output by name (film_layer['image']) instead of by position - The 'image' output is the interpolated frame - the main FILM result Investigation showed that fixing this in TF Frontend is impossible because: 1. TensorFlow itself doesn't guarantee output order in SavedModel signatures 2. Protobuf map fields have undefined iteration order 3. Python dict hash randomization affects order at runtime CVS-180301
mvafin
requested changes
Feb 5, 2026
dorloff
reviewed
Feb 5, 2026
mvafin
approved these changes
Feb 5, 2026
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.
Details:
The test
test_tf_hub_api_notebook1[CPU-film]was failing randomly in CI with shape mismatch error:ValueError: operands could not be broadcast together with shapes (1,200,200,2) (1,6,6,2)
Root cause: The test used
list(film_layer.values())[0]to select the model output. This is incorrect because:The fix selects the output by name (
film_layer['image']) instead of by position.Why the fix is in the test, not in OpenVINO TF Frontend
Fixing this in OpenVINO is not possible because TensorFlow itself does not guarantee output order:
map<string, TensorInfo>for outputs, which has no defined iteration order per protobuf specificationOpenVINO cannot preserve an order that TensorFlow does not define. The only reliable way to select a specific output is by name.
Tickets: