Pass through attributes defined in the model if they are not overridden by ds-engine.
(self, name)
| 1453 | return self._global_grad_norm |
| 1454 | |
| 1455 | def __getattr__(self, name): |
| 1456 | """ |
| 1457 | Pass through attributes defined in the model if they are not overridden by ds-engine. |
| 1458 | """ |
| 1459 | try: |
| 1460 | return super().__getattr__(name) |
| 1461 | except AttributeError: |
| 1462 | _module = self.__dict__.get("module") |
| 1463 | if _module is None: |
| 1464 | try: |
| 1465 | _module = super().__getattr__("module") |
| 1466 | except AttributeError: |
| 1467 | _module = None |
| 1468 | if _module is not None: |
| 1469 | try: |
| 1470 | return getattr(_module, name) |
| 1471 | except AttributeError: |
| 1472 | pass |
| 1473 | raise AttributeError(f"'{type(self).__name__}' object has no attribute '{name}'") |
| 1474 | |
| 1475 | def checkpoint_serialization_enabled(self): |
| 1476 | return self._config.checkpoint_config[CHECKPOINT_SERIALIZATION] |
no test coverage detected