Skip to content

Commit c8af1c4

Browse files
bottlerfacebook-github-bot
authored andcommitted
fix broken config for GenericModel
Summary: D42760349 (9540c29) (make Module.__init__ automatic) didn't account properly for inheritance. Reviewed By: shapovalov Differential Revision: D42834466 fbshipit-source-id: 53ee4c788985c1678ad905c06ccf12b2b41361e9
1 parent 7dfa691 commit c8af1c4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pytorch3d/implicitron/tools/config.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -944,7 +944,7 @@ def init(self, *args, **kwargs) -> None:
944944
torch.nn.Module.__init__(self)
945945
getattr(self, _DATACLASS_INIT)(*args, **kwargs)
946946

947-
assert not hasattr(some_class, _DATACLASS_INIT)
947+
assert _DATACLASS_INIT not in some_class.__dict__
948948

949949
setattr(some_class, _DATACLASS_INIT, some_class.__init__)
950950
some_class.__init__ = init

0 commit comments

Comments
 (0)