for this purpose, using a custom dataset is the recommended approach. You can follow this guide:
https://docs.kedro.org/en/0.19.14/data/how_to_create_a_custom_dataset.html#advanced-tutorial-to-create-a-custom-dataset
The implementation should be straightforward - you mainly need to define the _save
method like this:
class YourModelDataset(AbstractDataset):
def __init__(self, filepath: str):
self._filepath = filepath
def _save(self, model: PipelineModel) -> None:
model.save(self._filepath)
Once defined, just register the dataset in your catalog.yml
with the appropriate type and filepath.