Source code for swarmauri.core.experiment_stores.IExperimentStore

from abc import ABC, abstractmethod
from typing import List, Dict, Any, Union
from swarmauri.core.documents.IExperimentDocument import IExperimentDocument

[docs] class IExperimentStore(ABC): """ Interface for an Experiment Store that manages experimental documents and supports operations related to experimenting, evaluating, testing, and benchmarking. """
[docs] @abstractmethod def add_experiment(self, experiment: IExperimentDocument) -> None: """ Stores a single experiment in the experiment store. Parameters: - experiment (IExperimentDocument): The experimental document to be stored. """ pass
[docs] @abstractmethod def add_experiments(self, experiments: List[IExperimentDocument]) -> None: """ Stores multiple experiments in the experiment store. Parameters: - experiments (List[IExperimentDocument]): The list of experimental documents to be stored. """ pass
[docs] @abstractmethod def get_experiment(self, experiment_id: str) -> Union[IExperimentDocument, None]: """ Retrieves an experimental document by its ID. Parameters: - experiment_id (str): The unique identifier of the experiment. Returns: - Union[IExperimentDocument, None]: The requested experimental document, or None if not found. """ pass
[docs] @abstractmethod def get_all_experiments(self) -> List[IExperimentDocument]: """ Retrieves all experimental documents stored in the experiment store. Returns: - List[IExperimentDocument]: A list of all experimental documents. """ pass
[docs] @abstractmethod def update_experiment(self, experiment_id: str, updated_experiment: IExperimentDocument) -> None: """ Updates an experimental document in the experiment store. Parameters: - experiment_id (str): The unique identifier of the experiment to update. - updated_experiment (IExperimentDocument): The updated experimental document. """ pass
[docs] @abstractmethod def delete_experiment(self, experiment_id: str) -> None: """ Deletes an experimental document from the experiment store by its ID. Parameters: - experiment_id (str): The unique identifier of the experimental document to be deleted. """ pass