Source code for lomas_server.dataset_store.private_dataset_observer

from abc import ABC, abstractmethod


[docs] class PrivateDatasetObserver(ABC): """ We use this abstract class to "subscribe" to object instances (PrivateDataset) so that they can notify instances of this abstract class (LRUDatasetStore or other DatasetStore implementing caching) when their memory usage changes. """
[docs] @abstractmethod def update_memory_usage(self) -> None: """Abstract method to update total memory used by datasets"""