BonanDing's picture
Add isolated Minecraft and RE10K baseline evaluation suite
59630ba verified
Raw History Blame Contribute Delete
460 Bytes
from abc import ABC, abstractmethod
from typing import Any
from omegaconf import DictConfig
class BaseAlgo(ABC):
"""
A base class for generic algorithms.
"""
def __init__(self, cfg: DictConfig):
super().__init__()
self.cfg = cfg
self.debug = self.cfg.debug
@abstractmethod
def run(self, *args: Any, **kwargs: Any) -> Any:
"""
Run the algorithm.
"""
raise NotImplementedError