jegue / code /engine_base.py
fdemelo's picture
Jegue 0.2: self-contained (backbone files, adapter, heads, HF and vLLM classes), Decision Index 0.3 public suite 59.59
63ae4a0 verified
Raw History Blame Contribute Delete
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 {}