Skip to main content

Python SDK for interacting with the Chatbot Evaluation API.

Project description

Evaluation Client SDK

Usage examples and sample artefacts now live alongside the SDK in services/client-examples/. Copy the .env.example file in that directory, adjust any paths/URLs, and run the scripts via uv run --project services/client-examples -m examples.<script> or ./scripts/client.sh examples.<script>.

Installation

Install from PyPI or an internal index once the package is published:

pip install evaluation-client

Client SDK quickstart

Instantiate the reusable SDK from clients.evaluation_client to interact with the API:

from pathlib import Path

from evaluation_client import (
    ApiConfig,
    AssetBundle,
    EvaluationClient,
    LocalPaths,
    RunOptions,
)

assets_root = Path("assets").resolve()
runs_root = Path("runs-out").resolve()
bundle = AssetBundle(
    datasets={
        "my-dataset@1": assets_root / "datasets" / "my-dataset" / "v1" / "data.jsonl",
    },
    judges={
        "judge@1": assets_root / "judges" / "llm" / "judge" / "v1" / "config.yaml",
    },
)

api_cfg = ApiConfig(base_url="http://localhost:8000")
local_cfg = LocalPaths(runs_root=runs_root, download_root=runs_root)
client = EvaluationClient.from_configs(api_cfg, local=local_cfg)
result = client.run_suite_with_assets(
    suite=assets_root / "suites" / "my-suite.yaml",
    assets=bundle,
    options=RunOptions(log_level="normal"),
)
print(result.status, result.run_uri)

See services/client-examples/examples/ for richer console flows built on this SDK. They demonstrate how to build custom AssetBundle instances for prompts, judges, datasets, or retrieval bundles and how to tune monitoring verbosity via RunOptions.

If you have already uploaded specific assets, pass assets=None (the default) and the client will skip the upload step.

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

evaluation_client-0.1.0.tar.gz (16.4 kB view details)

Uploaded Source

Built Distribution

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

evaluation_client-0.1.0-py3-none-any.whl (21.9 kB view details)

Uploaded Python 3

File details

Details for the file evaluation_client-0.1.0.tar.gz.

File metadata

  • Download URL: evaluation_client-0.1.0.tar.gz
  • Upload date:
  • Size: 16.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for evaluation_client-0.1.0.tar.gz
Algorithm Hash digest
SHA256 34301a4a2a866abdb29c1268aa22c9c121ce9d3e4f7020f9185d1aa77ba12dcb
MD5 467eec1afd83da63ac1d99284f5aacb2
BLAKE2b-256 50cdd5e23f591070f6e0b0ff37e1de0fa3941d18c1d8fe30f4457eabe18e0cc6

See more details on using hashes here.

File details

Details for the file evaluation_client-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for evaluation_client-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f6fdc7465044cbc25678cce90b911ed0b4d5f7edd5d536ab6b2f3f528e0bff1d
MD5 5ea161d8ff7d344d99b5ae1bf19eb5ea
BLAKE2b-256 7fa60fd3c13045470b8427d4b5bcae89ddb1d769276743d43193a61ab0b59914

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