Skip to main content

Lightweight reporting SDK for evo experiments. Zero dependencies.

Project description

evo-hq-agent (Python SDK)

Lightweight reporting SDK for evo experiments. Zero dependencies, Python 3.10+.

Mirrors the @evo-hq/evo-agent Node SDK surface: Run for per-task logging + scoring, Gate for safety checks with exit codes.

Install

pip install evo-hq-agent

Install name and import name differ (same pattern as python-dateutil / dateutil):

from evo_agent import Run, Gate

Usage

Benchmark (Run)

from evo_agent import Run

with Run() as run:
    for task in tasks:
        run.log(task["id"], "starting task")
        result = evaluate(task)
        run.log(task["id"], {"output": result.output})
        run.report(
            task["id"],
            score=result.score,
            summary=f"reward={result.score:.2f}",
            failure_reason=None if result.passed else "task_failed",
        )
# finish() called automatically on __exit__:
#  - prints score JSON to stdout (the contract evo reads)
#  - per-task trace files were written to $EVO_TRACES_DIR as each report() ran

Gate

from evo_agent import Gate

with Gate() as gate:
    for task in critical_tasks:
        result = evaluate(task)
        gate.check(task["id"], score=result.score, detail=f"reward={result.score:.2f}")
# exits 0 if all passed, 1 otherwise

Environment

  • EVO_TRACES_DIR directory where task_<id>.json files are written (set by evo run)
  • EVO_EXPERIMENT_ID experiment label embedded in each trace

Both are set automatically when the evo CLI spawns your benchmark. Missing vars are tolerated -- traces are just skipped.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

evo_hq_agent-0.4.0a11.tar.gz (12.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

evo_hq_agent-0.4.0a11-py3-none-any.whl (11.4 kB view details)

Uploaded Python 3

File details

Details for the file evo_hq_agent-0.4.0a11.tar.gz.

File metadata

  • Download URL: evo_hq_agent-0.4.0a11.tar.gz
  • Upload date:
  • Size: 12.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for evo_hq_agent-0.4.0a11.tar.gz
Algorithm Hash digest
SHA256 e6f858708d4c8f4cdd15e4d585c2aa62092680a0bf613f2af48ba55be641aabb
MD5 31bc1af0502135ecc9567aa72e6c4198
BLAKE2b-256 6d7c8833719ace7264a32eb841c5816b76a98b64f10a6451eb6a6345d5d7b875

See more details on using hashes here.

File details

Details for the file evo_hq_agent-0.4.0a11-py3-none-any.whl.

File metadata

File hashes

Hashes for evo_hq_agent-0.4.0a11-py3-none-any.whl
Algorithm Hash digest
SHA256 62cb4edde79d3d1b3608845c95f7d52fec5947829099b45adcfc51fb8a9c98e2
MD5 d404d72f30beca3e5f68692f03c5b84d
BLAKE2b-256 43a1c7039941b8567c9f4e48c6f6e66443fa59540fcf77c74d6c6a91138dcf4a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page