Skip to content

Commit e100f18

Browse files
tarun292facebook-github-bot
authored andcommitted
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
1 parent 7642538 commit e100f18

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

sdk/edir/et_schema.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
from collections import defaultdict
1717

1818
from enum import Enum
19+
from types import NoneType
1920
from typing import Any, Dict, List, Optional, Set, Tuple
2021

2122
import torch
@@ -147,6 +148,8 @@ def _parse_args( # noqa: C901
147148
raise Exception(
148149
f"Unsupported argument encountered in list {arg}, {type(arg[0])}"
149150
)
151+
elif isinstance(arg, NoneType):
152+
continue
150153
else:
151154
raise Exception(f"Unsupported argument encountered {op}, {name}, {arg}")
152155

0 commit comments

Comments
 (0)