aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGergely Nagy <gergely.nagy@arm.com>2023-10-26 16:15:35 +0100
committerBenjamin Klimczak <benjamin.klimczak@arm.com>2023-10-31 14:59:50 +0000
commit0655c1cc43108c741a77e775b2a4ef46984829ce (patch)
treede3ad078e323112a86d66a29d8bc1bd836ee60f1
parentecc4264b93d4a89fa2cb40518b225d8371b7ffad (diff)
downloadmlia-0655c1cc43108c741a77e775b2a4ef46984829ce.tar.gz
MLIA-1019 Fix rebase artifact
Fixed an artifact that crept in during the upstream rebase process, change a6ae703b6e41c73 was being taken out, but 3cd84481fa25 reintroduced the first part of a try/except block which caused a syntax error. Change-Id: I7fc2e18a227a30ebaaee0763450ee68646611add Signed-off-by: Benjamin Klimczak <benjamin.klimczak@arm.com>
-rw-r--r--src/mlia/nn/rewrite/core/utils/numpy_tfrecord.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/mlia/nn/rewrite/core/utils/numpy_tfrecord.py b/src/mlia/nn/rewrite/core/utils/numpy_tfrecord.py
index 38ac1ed..0d2608b 100644
--- a/src/mlia/nn/rewrite/core/utils/numpy_tfrecord.py
+++ b/src/mlia/nn/rewrite/core/utils/numpy_tfrecord.py
@@ -30,12 +30,11 @@ def decode_fn(record_bytes: Any, type_map: dict) -> dict:
return features
-def make_decode_fn(filename: str, model_filename: str | Path | None = None) -> Callable:
+def make_decode_fn(filename: str) -> Callable:
"""Make decode filename."""
meta_filename = filename + ".meta"
- try:
- with open(meta_filename, encoding="utf-8") as file:
- type_map = json.load(file)["type_map"]
+ with open(meta_filename, encoding="utf-8") as file:
+ type_map = json.load(file)["type_map"]
return lambda record_bytes: decode_fn(record_bytes, type_map)