-
Notifications
You must be signed in to change notification settings - Fork 312
Open
Labels
type:BugSomething isn't workingSomething isn't working
Description
Description
The test_litert_export test for MoonshineAudioToText is currently failing due to a data type mismatch in the LiteRT model inputs.
Steps to Reproduce
- Run the test:
pytest keras_hub/src/models/moonshine/moonshine_audio_to_text_test.py::MoonshineAudioToTextTest::test_litert_export --run_large - The test attempts to export the model to LiteRT format and run inference
- The test fails when setting tensor inputs to the LiteRT interpreter
Expected Behavior
The test should pass, successfully exporting the MoonshineAudioToText model to LiteRT and running inference without errors.
Actual Behavior
The test fails with the following error:
ValueError: Cannot set tensor: Got value of type INT32 but expected type BOOL for input 2, name: serving_default_encoder_padding_mask:0
This indicates that the encoder_padding_mask input is expected to be of type BOOL (boolean) in the LiteRT model, but the test is providing it as INT32 (integer).
Environment
- Python 3.12.10
- TensorFlow/Keras (version from pyproject.toml: keras>=3.13)
- pytest-9.0.0
Additional Context
- The model signature shows
dtype=tf.boolforencoder_padding_mask - The test data is likely using integer values (0/1) instead of boolean values (True/False)
- This is blocking LiteRT export functionality for MoonshineAudioToText models
- The test is currently marked as skipped with
@pytest.mark.skip(reason="TODO: Bug with MoonshineAudioToText liteRT export")
Possible Fix
The issue likely requires updating the test input data to use boolean values for encoder_padding_mask, or adjusting the model export process to handle integer padding masks correctly.
Metadata
Metadata
Assignees
Labels
type:BugSomething isn't workingSomething isn't working