"""
Each Model instance implements some model. Each model needs:
1. Access to the Dataset object to know the shape,
2. Access to a Model Description to create the architecture,
"""
from typing import Callable

from useckit.v2.dataset import Dataset


class Model:
    def __init__(self, dataset, model_description):
        self.dataset: Dataset = dataset
        self.model_description: Callable = model_description
        self.model = self.build_model(self.model_description)

    def build_model(self, model_description):
        raise NotImplementedError("Given the model_description, the model must be built.")

    def fit(self, dataset):
        raise NotImplementedError("Given the dataset, the model must be fitted.")

    def predict(self, dataset):
        raise NotImplementedError("Given the dataset, the model must be used for prediction.")

    def persist(self, path_like):
        raise NotImplementedError("Given the path_like, the model must be persisted.")

    def load(self, path_like):
        raise NotImplementedError("Given the path_like, the model must be loaded.")
