[JIT] Make objects throw Python AttributeError on nonexistant attr access (#45911)
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/45911
Test Plan: Imported from OSS
Reviewed By: robieta
Differential Revision: D24140971
Pulled By: jamesr66a
fbshipit-source-id: 046a2cffff898efad5bcc36a41bf992f36f555f9