Skip to content

Commit a78fcc5

Browse files
tarun292facebook-github-bot
authored andcommitted
If arg is None during OpGraph generation then ignore it
Summary: Found this while testing out inspector on some large models. Reviewed By: vmpuri Differential Revision: D49760767
1 parent 4b2f0b7 commit a78fcc5

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
@@ -17,6 +17,7 @@
1717

1818
from dataclasses import dataclass
1919
from enum import Enum
20+
from types import NoneType
2021
from typing import Any, Dict, List, Optional, Set, Tuple
2122

2223
import numpy as np
@@ -526,6 +527,8 @@ def _parse_args( # noqa: C901
526527
raise Exception(
527528
f"Unsupported argument encountered in list {arg}, {type(arg[0])}"
528529
)
530+
elif isinstance(arg, NoneType):
531+
pass
529532
else:
530533
raise Exception(f"Unsupported argument encountered {op}, {name}, {arg}")
531534

0 commit comments

Comments
 (0)