Skip to main content

valohai-llm

Python instrumentation library for Valohai large language model and generative AI tools.

Installation

pip install valohai-llm

# `uv` project with pip-compatibility
uv pip install valohai-llm

# `uv`-managed project
uv add valohai-llm

Usage

  1. Get VALOHAI_LLM_API_KEY from Valohai LLM
  2. Make sure VALOHAI_LLM_API_KEY is set in your environment
  3. Use the library e.g. the simplest case:
import valohai_llm

def main():
    result = valohai_llm.post_result(
        task="my-evaluation",
        labels={"model": "gpt-4", "dataset": "mmlu", "category": "math"},
        metrics={"accuracy": 0.85, "latency_ms": 150},
    )
    print("Result posted:", result)

if __name__ == "__main__":
    main()

Development

# auto-format and lint code
just format

# run unit tests
uv run pytest

# configure setup to run examples
cp .env.dev-example .env
# edit the .env
uv run --env-file=.env --with-editable=. examples/simple_example.py

Release files for valohai-llm 0.1.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 valohai-llm 0.1.0
File Size Uploaded
valohai_llm-0.1.0.tar.gz 7.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for valohai-llm 0.1.0
File Interpreter ABI Platform
valohai_llm-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 17.2 kB

Release files / valohai_llm-0.1.0.tar.gz

Download URL valohai_llm-0.1.0.tar.gz
Size 7.6 kB
Tags Source
SHA-256 checksum
How to use checksums
9c146df4d35717904821f7c0065e666b9da34fbeae12a79cefe5fb9ec263988a
BLAKE2b-256 checksum
How to use checksums
d178c8938637a4fb0500ff3f37c76099e2cabb01498a5b55f9df6c43d731c0f7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"22.04","id":"jammy","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / valohai_llm-0.1.0-py3-none-any.whl

Download URL valohai_llm-0.1.0-py3-none-any.whl
Size 9.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9d54419f3abbb21f0f792c1922540eb6bdecbbd578ab964c3a38ed83fe3076ad
BLAKE2b-256 checksum
How to use checksums
3610c94f9a08fa7e6b022a8b668b53138461722184bf0c1b850fd9e4ddf32b27
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"22.04","id":"jammy","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.1.0 This release

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