Spaces:
Running

electrocheap / challenge_adapter_example.py
kugguk's picture
Repair complete-month feeds and add portable LLM forecast challenge
afb6251 verified
Raw History Blame Contribute Delete
331 Bytes
"""Minimal trusted adapter example: replace predict with our model's inference."""
def predict(task, system_prompt):
history = {r["timestamp"][:7]: r["value"] for r in task["history"]}
return [{"id": t["id"], "forecast": history[f"{int(t['timestamp'][:4])-1}{t['timestamp'][4:7]}"]}
for t in task["targets"]]