feat: Add batch evals api - #725
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 87a15e5e03
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "Codex (@codex) review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "Codex (@codex) address that feedback".
| async def _claim(self, run_id: str, action: str) -> bool: | ||
| result = await self.store.get_or_set(self._key(run_id, "claim", action), b"1") | ||
| return result.created |
There was a problem hiding this comment.
Make action claims recoverable after callback interruption
When a submit, task, scorer, classifier, or finalization callback raises—or the worker stops after this claim but before writing its result—the claim remains permanently stored. Every subsequent poll() sees created=False, skips the incomplete action, and can never satisfy the missing stage record, leaving the run in waiting forever with the memory store and generally until the run itself expires with Redis. Use a recoverable lease/state transition or otherwise permit retrying claims whose corresponding result was not persisted.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
solving this right now is overkill
Batch eval
Polling example
Webhook example
Handle
batch.completed: