Ensure the model is loaded and running.
(self, model_type: str = "primary")
| 349 | self._loaded = False |
| 350 | |
| 351 | def ensure_model(self, model_type: str = "primary") -> bool: |
| 352 | """Ensure the model is loaded and running.""" |
| 353 | if self._loaded and self._server and self._server.is_running(): |
| 354 | return True |
| 355 | return self.load_primary() |
| 356 | |
| 357 | def get_loaded_model(self) -> Optional[str]: |
| 358 | """Get the currently loaded model type.""" |
no test coverage detected