Skip to main content

agent-eval

A utility for evaluating agents on a suite of Inspect-formatted evals, with the following primary benefits:

  1. Task suite specifications as config.
  2. Extracts the token usage of the agent from log files, and computes cost using litellm.
  3. Submits task suite results to a leaderboard, with submission metadata and easy upload to a HuggingFace repo for distribution of scores and logs.

Installation

To install from pypi, use pip install agent-eval.

For leaderboard extras, use pip install agent-eval[leaderboard].

Usage

Run evaluation suite

agenteval eval --config-path CONFIG_PATH --split SPLIT LOG_DIR

Evaluate an agent on the supplied eval suite configuration. Results are written to agenteval.json in the log directory.

See sample-config.yml for a sample configuration file.

For aggregation in a leaderboard, each task specifies a primary_metric as {scorer_name}/{metric_name}. The scoring utils will look for a corresponding stderr metric, by looking for another metric with the same scorer_name and with a metric_name containing the string "stderr".

Weighted Macro Averaging with Tags

Tasks can be grouped using tags for computing summary statistics. The tags support weighted macro averaging, allowing you to assign different weights to tasks within a tag group.

Tags are specified as simple strings on tasks. To adjust weights for specific tag-task combinations, use the macro_average_weight_adjustments field at the split level. Tasks not specified in the adjustments default to a weight of 1.0.

See sample-config.yml for an example of the tag and weight adjustment format.

Score results

agenteval score [OPTIONS] LOG_DIR

Compute scores for the results in agenteval.json and update the file with the computed scores.

Publish scores to leaderboard

agenteval lb publish [OPTIONS] LOG_DIR

Upload the scored results to HuggingFace datasets.

View leaderboard scores

agenteval lb view [OPTIONS]

View results from the leaderboard.

To save plots:

agenteval lb view --save-dir DIR [OPTIONS]

Administer the leaderboard

Prior to publishing scores, two HuggingFace datasets should be set up, one for full submissions and one for results files.

If you want to call load_dataset() on the results dataset (e.g., for populating a leaderboard), you probably want to explicitly tell HuggingFace about the schema and dataset structure (otherwise, HuggingFace may fail to propertly auto-convert to Parquet). This is done by updating the configs attribute in the YAML metadata block at the top of the README.md file at the root of the results dataset (the metadata block is identified by lines with just --- above and below it). This attribute should contain a list of configs, each of which specifies the schema (under the features key) and dataset structure (under the data_files key). See sample-config-hf-readme-metadata.yml for a sample metadata block corresponding to sample-comfig.yml (note that the metadata references the raw schema data, which must be copied).

To facilitate initializing new configs, agenteval lb publish will automatically add this metadata if it is missing.

Development

See Development.md for development instructions.

Metadata

Release files for agent-eval 0.1.56

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for agent-eval 0.1.56
File Size Uploaded Provenance Actions
agent_eval-0.1.56.tar.gz 53.2 kB Without provenance Details for agent_eval-0.1.56.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for agent-eval 0.1.56
File Interpreter ABI Platform Actions
agent_eval-0.1.56-py3-none-any.whl Python 3 none any Details for agent_eval-0.1.56-py3-none-any.whl

Total release size: 99.8 kB

Release files / agent_eval-0.1.56.tar.gz

Download URL agent_eval-0.1.56.tar.gz
Size 53.2 kB
Tags Source
SHA-256 checksum
How to use checksums
b02c090251e998094e5116d43a606009da34899daa367ef4e96b5ae84a25b788
BLAKE2b-256 checksum
How to use checksums
473b5ceb345805cd5637468d69e9e570adedf609abe1fbe3752e008579891925
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.10.9

Release files / agent_eval-0.1.56-py3-none-any.whl

Download URL agent_eval-0.1.56-py3-none-any.whl
Size 46.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4ab9547185bde68f22877aa604907f30fab19d43d039b354bb84fd140e72bef7
BLAKE2b-256 checksum
How to use checksums
a9470720ce84f9844bd27a9785a262ed1ef8dbd535402f33fc3aa9dcf14b1640
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.10.9

Security for agent-eval 0.1.56

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.56 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page