Download GeometryForcing/algorithms/common/base_algo.py from BonanDing/worldmem-baseline-evals: direct link, hf CLI and curl.
- Browser
- Download file 460 Bytes
-
https://huggingface.co/BonanDing/worldmem-baseline-evals/resolve/main/GeometryForcing/algorithms/common/base_algo.py
- Command line
-
hf download hf://BonanDing/worldmem-baseline-evals/GeometryForcing/algorithms/common/base_algo.py
-
curl -L -o base_algo.py https://huggingface.co/BonanDing/worldmem-baseline-evals/resolve/main/GeometryForcing/algorithms/common/base_algo.py
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 | |
| def run(self, *args: Any, **kwargs: Any) -> Any: | |
| """ | |
| Run the algorithm. | |
| """ | |
| raise NotImplementedError | |