(self, tx, name: str)
| 121 | return result |
| 122 | |
| 123 | def call_hasattr(self, tx, name: str) -> "VariableTracker": |
| 124 | mod = tx.output.get_submodule(self.module_key) |
| 125 | result = hasattr(mod, name) |
| 126 | install_guard( |
| 127 | NNModuleSource(AttrSource(self.source, name)).make_guard( |
| 128 | GuardBuilder.HASATTR |
| 129 | ) |
| 130 | ) |
| 131 | return variables.ConstantVariable.create(result) |
| 132 | |
| 133 | def is_training(self, tx): |
| 134 | mod = tx.output.get_submodule(self.module_key) |
nothing calls this directly
no test coverage detected