Skip to content

feat: add centralized eval queue with submitit backend#33

Open
BobbyZhouZijian wants to merge 1 commit intomainfrom
feat_implement_queue
Open

feat: add centralized eval queue with submitit backend#33
BobbyZhouZijian wants to merge 1 commit intomainfrom
feat_implement_queue

Conversation

@BobbyZhouZijian
Copy link
Copy Markdown
Collaborator

Summary

Closes #21

  • Replace direct in-process grading with a manager-based task queue using submitit as the job execution backend
  • Agents submit eval requests to .coral/queue/pending/ as JSON, poll .coral/queue/results/ for grading results
  • Manager's QueueDispatcher picks up pending requests, applies scheduling policy (fair/fifo/priority), and submits grader jobs via submitit (LocalExecutor or SlurmExecutor)
  • Queue config is nested under grader.queue — timeout defaults to grader.timeout + 60s
  • Atomic eval counter via fcntl.flock() replaces the racy _increment_eval_count()

Test plan

  • uv run pytest tests/test_queue.py -v — 22 queue-specific tests pass (types, counter concurrency, client submit/poll/timeout, dispatcher scheduling strategies, rate limiting, config integration)
  • uv run pytest tests/ -v — 101 tests pass, no regressions
  • uv run ruff check — lint clean on all changed files
  • Manual: coral start -c examples/kernel_builder/task.yaml agents.count=3 — agents queue and take turns grading

🤖 Generated with Claude Code

Replace direct in-process grading with a manager-based task queue.
Agents submit eval requests to .coral/queue/pending/ and poll for
results, while the manager's QueueDispatcher dispatches grader jobs
via submitit (LocalExecutor or SlurmExecutor).

- Add coral/queue/ package (types, client, dispatcher, worker, counter)
- Add QueueConfig nested under GraderConfig with strategy (fair/fifo/
  priority), rate limiting, max concurrency, and executor selection
- Queue timeout defaults to grader.timeout + 60s overhead
- Replace non-atomic eval counter with fcntl.flock-based counter
- Remove direct multiprocessing grading path from post_commit.py
- Integrate dispatcher into AgentManager.monitor_loop()
- Add 22 tests covering types, counter, client, scheduling, config

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel bot commented Mar 29, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
coral Ready Ready Preview, Comment Mar 29, 2026 2:51am

Request Review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[RFC] Task queue manager for eval execution

1 participant