worldmem / algorithms /common /base_algo.py
xizaoqu
update
ae8fd03
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