Persist current weights to the online model file.
(path: Path | None = None)
| 104 | |
| 105 | |
| 106 | def save_online_model(path: Path | None = None) -> None: |
| 107 | """Persist current weights to the online model file.""" |
| 108 | if _model is None: |
| 109 | return |
| 110 | p = path or _get_online_model_path() |
| 111 | p.parent.mkdir(parents=True, exist_ok=True, mode=0o700) |
| 112 | _model.save(p) |
| 113 | |
| 114 | |
| 115 | def rollback_online_model() -> bool: |
no test coverage detected