diff --git a/exir/serde/export_serialize.py b/exir/serde/export_serialize.py index 79a5c12722..ab24688379 100644 --- a/exir/serde/export_serialize.py +++ b/exir/serde/export_serialize.py @@ -459,7 +459,10 @@ def export_nn_module_stack(val): path, ty = val assert isinstance(path, str) - normalized_ty = ty.__module__ + "." + ty.__qualname__ + if isinstance(ty, str): + normalized_ty = ty + else: + normalized_ty = ty.__module__ + "." + ty.__qualname__ return path + "," + normalized_ty # Serialize to "key,orig_path,type_str"