manager.trainer.get_last_model
manager.trainer.get_last_model(model_name, model_dir=None)Get the latest trained model from the cache.
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| model_name | str | Name of the model (e.g., ‘lgbm’, ‘xgb’). | required |
| model_dir | Optional[Union[str, Path]] | Directory where models are stored. If None, defaults to the library’s cache home. | None |
Returns
| Name | Type | Description |
|---|---|---|
| int | A tuple (iteration, model_instance). If no model is found, | |
| Any | returns (-1, None). |