Skip to main content

annotations-orchestration

Generic Python library for orchestrating LLM evaluation runs: a resumable parallel scheduler over experiment manifests, plus span metrics for precision/recall/F1 against gold annotations — computed by annotations-evaluate, the family's spec-driven metrics library.

Part of the annotations-* family: the annotation pipeline lives in annotations4all, this library provides the evaluation/experiment infrastructure, and concrete run projects combine both.

Features

  • Library-agnostic: the scheduler speaks a subprocess CLI contract (RunSpec → flags), not annotations4all types. Reusable for any LLM evaluation workflow.
  • Conservative concurrency: documents within a run are processed linearly; remote runs share a pool (execution.remote_parallelism, default 3); self_hosted runs get one sequential lane per host.
  • Resumable: run state is persisted; completed runs are skipped, interrupted/failed runs re-execute on restart.
  • Manifest-driven and validated: experiment YAMLs + optional controller manifests (defaults/execution/order). Run fields (model, host, port, context, shots, data_dir, net, api_url, api_key_env, reasoning, tagger, nested) are checked for type and allowed values, and unknown keys are rejected instead of being ignored silently — with file, key and the list of allowed keys (plus a typo suggestion); errors are one line (error: …, exit code 2) instead of a traceback.
  • Metrics: span evaluation with precision/recall/F1, provided by annotations-evaluate — the SemEval-2013 compatible flat schemes (strict, entity type, partial, exact) used for the run reports, and that library's nested standard report (levels, structure, decode rate) for nested annotations.

Installation

python -m pip install annotations-orchestration

Requires Python 3.11+.

The metrics library of the family, annotations-evaluate, is installed as a regular dependency from PyPI.

Quickstart

# Validate an experiments directory (dry run, no execution)
annotations-orchestrate --experiments-dir experiments/ --dry-run

# Run the experiments
annotations-orchestrate --experiments-dir experiments/

Python API

from pathlib import Path

from annotations_orchestration import calculate_metrics, evaluate_classifier

# One record in the harness format: gold spans per annotation tool, predicted spans.
records = [
    {
        "ground_truth": {"prodigy": [{"start": 0, "end": 3, "label": "PER"}]},
        "predictions": [{"start": 0, "end": 3, "label": "PER"}],
    }
]

# Pass records in memory, or omit "predictions" to read a run directory.
overall, per_tag = evaluate_classifier(
    data_dir=Path("data"),
    eval_dir=Path("results"),
    predictions=records,
)
f1 = calculate_metrics(overall, "ent_type")["f1"]  # 1.0

CLI

annotations-orchestrate options: --manifest, --experiments-dir, --state, --results-dir, --dry-run, --active-self-hosted, --graceful-shutdown-seconds.

Development

uv sync
uv run ruff check .
uv run ruff format --check .
uv run pytest

Citation

If you use this software in academic work, please cite it as follows:

Dresselhaus, Nicole. (2026). annotations-orchestration (Version 0.2.0) [Software]. Humboldt-Universität zu Berlin. https://scm.cms.hu-berlin.de/annotations4all/annotations-orchestration

DOI: 10.5281/zenodo.22797759

Machine-readable metadata is available in CITATION.cff.

License

MIT.

The metrics are computed by annotations-evaluate (MIT, same family) — the earlier vendored snapshot of MantisAI/nervaluate was removed in GitLab issue #3.

Metadata

Release files for annotations-orchestration 0.2.0

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

Source distribution (sdist)

Source distribution for annotations-orchestration 0.2.0
File Size Uploaded
annotations_orchestration-0.2.0.tar.gz 28.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for annotations-orchestration 0.2.0
File Interpreter ABI Platform
annotations_orchestration-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 56.0 kB

Release files / annotations_orchestration-0.2.0.tar.gz

Download URL annotations_orchestration-0.2.0.tar.gz
Size 28.2 kB
Tags Source
SHA-256 checksum
How to use checksums
8b998bf9b856730b884de2d4c69815c5eb821decc75c29d555aa9427ff1bb6e9
BLAKE2b-256 checksum
How to use checksums
957307b2d3521ec001547ec97fffb356ba57bc4ab5a1079b06d38bd3209ff36c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.13 {"installer":{"name":"uv","version":"0.12.13","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / annotations_orchestration-0.2.0-py3-none-any.whl

Download URL annotations_orchestration-0.2.0-py3-none-any.whl
Size 27.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e32c912a246b6d060b6ccaf4009d0d99de8bb65f271e6c33e2f8539a4b0a760d
BLAKE2b-256 checksum
How to use checksums
14cf87a70e5eeff4dc55ed9776a8da973862c5a56e5f89e3609af455152a8ddc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.13 {"installer":{"name":"uv","version":"0.12.13","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

0.1.0

2 release files

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