Pass through attributes defined in the model if they are not overridden by ds-engine.
(self, name)
| 871 | return self._global_grad_norm |
| 872 | |
| 873 | def __getattr__(self, name): |
| 874 | """ |
| 875 | Pass through attributes defined in the model if they are not overridden by ds-engine. |
| 876 | """ |
| 877 | |
| 878 | _module = {} |
| 879 | if "module" in self.__dict__: |
| 880 | _module = self.__dict__['module'] |
| 881 | if name in dir(self): |
| 882 | return getattr(self, name) |
| 883 | elif name in dir(_module): |
| 884 | return getattr(_module, name) |
| 885 | else: |
| 886 | raise AttributeError(f"'{type(self).__name__}' object has no attribute '{name}'") |
| 887 | |
| 888 | def checkpoint_serialization_enabled(self): |
| 889 | return self._config.checkpoint_config[CHECKPOINT_SERIALIZATION] |
no outgoing calls
no test coverage detected