Worker protocol

You only need this page if you're adding support for a new language. If you just want to write evals, head to Cases and runners.

The short version

eac starts a worker process for your language and talks to it with JSON, one message per line:

  • Requests come in on fd 3 and responses go out on fd 4, so stdout and stderr stay free for logs.
  • The worker's first line says which protocol it speaks, and optionally its SDK's language and version, so eac can tell users when it's out of date: {"protocol": 1, "sdk": {"language": "Python", "version": "0.0.1"}}.
  • eac sends one request at a time and waits for the answer.
  • When eac closes fd 3, the worker should exit.
{"id": 1, "method": "case.run", "params": {}}
{"id": 1, "result": {"run_results": {}}}

Methods

MethodWhat it does
discoverLoad a dataset and list its cases.
args.validateReport the credentials a run needs, before anything runs.
seed.setupSet up a fixture.
seed.teardownClean up a fixture.
case.runRun one case.
case.judgeScore one case's output.
online.executeCollect production runs as cases.
online.judgeScore one collected case.
credentials.checkReport which credentials are ready.
credentials.loginLog in to a credential.

The full spec, with every param and result, is in core/PROTOCOL.md.