DeMemWM / algorithms /common /base_algo.py
BonanDing's picture
Initial commit
b47a1ce
raw
history blame contribute delete
454 Bytes
from abc import ABC, abstractmethod
from typing import Any, Dict, List, Optional, Tuple, Union
from omegaconf import DictConfig
class BaseAlgo(ABC):
"""
A base class for generic algorithms.
"""
def __init__(self, cfg: DictConfig):
super().__init__()
self.cfg = cfg
@abstractmethod
def run(*args: Any, **kwargs: Any) -> Any:
"""
Run the algorithm.
"""
raise NotImplementedError