aboutsummaryrefslogtreecommitdiff
path: root/tests/test_target_cortex_a_operators.py
diff options
context:
space:
mode:
authorGergely Nagy <gergely.nagy@arm.com>2023-11-21 12:29:38 +0000
committerGergely Nagy <gergely.nagy@arm.com>2023-12-07 17:09:31 +0000
commit54eec806272b7574a0757c77a913a369a9ecdc70 (patch)
tree2e6484b857b2a68279a2707dbb21e5c26685f4e2 /tests/test_target_cortex_a_operators.py
parent7c50f1d6367186c03a282ac7ecb8fca0f905ba30 (diff)
downloadmlia-54eec806272b7574a0757c77a913a369a9ecdc70.tar.gz
MLIA-835 Invalid JSON output
TFLiteConverter was producing log messages in the output that was not possible to capture and redirect to logging. The solution/workaround is to run it as a subprocess. This change required some refactoring around existing invocations of the converter. Change-Id: I394bd0d49d36e6686cfcb9d658e4aad05326cb87 Signed-off-by: Gergely Nagy <gergely.nagy@arm.com>
Diffstat (limited to 'tests/test_target_cortex_a_operators.py')
-rw-r--r--tests/test_target_cortex_a_operators.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/test_target_cortex_a_operators.py b/tests/test_target_cortex_a_operators.py
index 56d6c7b..16cdca5 100644
--- a/tests/test_target_cortex_a_operators.py
+++ b/tests/test_target_cortex_a_operators.py
@@ -6,7 +6,7 @@ from pathlib import Path
import pytest
import tensorflow as tf
-from mlia.nn.tensorflow.utils import convert_to_tflite
+from mlia.nn.tensorflow.tflite_convert import convert_to_tflite_bytes
from mlia.target.cortex_a.config import CortexAConfiguration
from mlia.target.cortex_a.operators import CortexACompatibilityInfo
from mlia.target.cortex_a.operators import get_cortex_a_compatibility_info
@@ -52,7 +52,7 @@ def test_get_cortex_a_compatibility_info_not_compatible(
]
)
keras_model.compile(optimizer="sgd", loss="mean_squared_error")
- tflite_model = convert_to_tflite(keras_model, quantized=False)
+ tflite_model = convert_to_tflite_bytes(keras_model, quantized=False)
monkeypatch.setattr(
"mlia.nn.tensorflow.tflite_graph.load_tflite", lambda _p: tflite_model