From adceb599c9840690dd9e1b027d4e1a491af2cf53 Mon Sep 17 00:00:00 2001 From: Tarun Karuturi Date: Mon, 2 Oct 2023 23:49:21 -0700 Subject: [PATCH] If arg is None during OpGraph generation then ignore it (#530) Summary: Found this while testing out inspector on some large models. Reviewed By: vmpuri Differential Revision: D49760767 --- sdk/edir/et_schema.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sdk/edir/et_schema.py b/sdk/edir/et_schema.py index 3f4da234322..487960d8bd5 100644 --- a/sdk/edir/et_schema.py +++ b/sdk/edir/et_schema.py @@ -16,6 +16,7 @@ from collections import defaultdict from enum import Enum +from types import NoneType from typing import Any, Dict, List, Optional, Set, Tuple import torch @@ -147,6 +148,8 @@ def _parse_args( # noqa: C901 raise Exception( f"Unsupported argument encountered in list {arg}, {type(arg[0])}" ) + elif isinstance(arg, NoneType): + continue else: raise Exception(f"Unsupported argument encountered {op}, {name}, {arg}")