(
layer: Layer | Callable[..., Any],
path: str,
input_spec: Sequence[InputSpec | Tensor | object] | None = None,
**configs: Unpack[_SaveOptions],
)
| 826 | @wrap_decorator |
| 827 | def _run_save_pre_hooks(func: _SaveFunction) -> _SaveFunction: |
| 828 | def wrapper( |
| 829 | layer: Layer | Callable[..., Any], |
| 830 | path: str, |
| 831 | input_spec: Sequence[InputSpec | Tensor | object] | None = None, |
| 832 | **configs: Unpack[_SaveOptions], |
| 833 | ) -> None: |
| 834 | global _save_pre_hooks |
| 835 | for hook in _save_pre_hooks: |
| 836 | hook(layer, input_spec, configs) |
| 837 | func(layer, path, input_spec, **configs) |
| 838 | |
| 839 | return wrapper |
| 840 |
no test coverage detected