Skip to content

Commit 711cf6c

Browse files
zhxchen17facebook-github-bot
authored andcommitted
Fix test boltnn test failure.
Summary: Context: D48288890 Reviewed By: tugsbayasgalan Differential Revision: D48318520 fbshipit-source-id: 2f87c9e46e30f0876593f01c20d845684f6edd12
1 parent eba90b7 commit 711cf6c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

exir/serde/serialize.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -630,6 +630,10 @@ def deserialize(
630630
) -> exir.ExportedProgram:
631631
exported_program_str = exported_program_bytes.decode("utf-8")
632632
exported_program_dict = json.loads(exported_program_str)
633+
# Executorch tests save exported program on disk when we haven't
634+
# provided any compatibility guarantees.
635+
if "module_call_graph" not in exported_program_dict["graph_module"]:
636+
exported_program_dict["graph_module"]["module_call_graph"] = []
633637
serialized_exported_program = export_serialize._dict_to_dataclass(
634638
schema.ExportedProgram, exported_program_dict
635639
)

0 commit comments

Comments
 (0)