Download code/engine_base.py from fdemelo/jegue: direct link, hf CLI and curl.
- Browser
- Download file 749 Bytes
-
https://huggingface.co/fdemelo/jegue/resolve/main/code/engine_base.py
- Command line
-
hf download hf://fdemelo/jegue/code/engine_base.py
-
curl -L -o engine_base.py https://huggingface.co/fdemelo/jegue/resolve/main/code/engine_base.py
749 Bytes
| """Stand-in for decision_index.engines.base when the Decision Index kit is not installed (the engines use the kit's classes when it is).""" | |
| class Unsupported(ValueError): | |
| pass | |
| class Engine: | |
| name = "engine" | |
| provenance = {} | |
| latency = "In-process request wall time including prompt construction; excludes model loading." | |
| def __init__(self, **options): | |
| self.options = options | |
| def __call__(self, state, questions): | |
| raise NotImplementedError | |
| def warmup(self): | |
| warm = {"warmup": {"type": "choice", "instructions": "Which color is named?", "criteria": {"red": "red", "blue": "blue"}}} | |
| for _ in range(2): | |
| self("The color is red.", warm) | |
| def runtime(self): | |
| return {} | |