(self, cfg: Config)
| 97 | remat_policies: Required[Dict[str, RematSpec]] = REQUIRED |
| 98 | |
| 99 | def __init__(self, cfg: Config): |
| 100 | super().__init__(cfg) |
| 101 | cfg = self.config |
| 102 | self._remat_policies = cfg.remat_policies |
| 103 | |
| 104 | def __call__(self, cfg: SpmdTrainer.Config) -> SpmdTrainer.Config: |
| 105 | """Update the remat policy for the specified modules. |