Skip to content

Commit 00ae1e4

Browse files
dulinrileyfacebook-github-bot
authored andcommitted
Remove assert for ArgSchema (pytorch#6638)
Summary: In python 3.12, there were a few changes to runtime_checkable: https://docs.python.org/3/whatsnew/3.12.html#typing > The members of a runtime-checkable protocol are now considered “frozen” at runtime as soon as the class has been created. Monkey-patching attributes onto a runtime-checkable protocol will still work, but will have no impact on isinstance() checks comparing objects to the protocol I'm not sure what was monkey-patched here, but EdgeDialectOverloadPacket no longer passes the assert. I'm not sure how to fix this for real, but I just deleted it under the assumption it's not helpful enough to be worth breaking tests. Differential Revision: D65316894
1 parent c8967da commit 00ae1e4

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

exir/pass_base.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -726,7 +726,6 @@ def update(key: K, args: MutableMapping[K, PyTree], schema: ArgSchema) -> None:
726726
args[key] = fn(args[key], schema)
727727

728728
for i, schema in enumerate(op._schema.arguments):
729-
assert isinstance(schema, ArgSchema)
730729
if schema.name in kwargs:
731730
update(schema.name, kwargs, schema)
732731
elif not schema.kwarg_only and i < len(args):

0 commit comments

Comments
 (0)