Track LLM evaluations to Valohai LLM
Project description
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
- Get
VALOHAI_LLM_API_KEYfrom Valohai LLM - Make sure
VALOHAI_LLM_API_KEYis set in your environment - 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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
valohai_llm-0.1.0.tar.gz
(7.6 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file valohai_llm-0.1.0.tar.gz.
File metadata
- Download URL: valohai_llm-0.1.0.tar.gz
- Upload date:
- Size: 7.6 kB
- Tags: Source
- Uploaded using 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}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9c146df4d35717904821f7c0065e666b9da34fbeae12a79cefe5fb9ec263988a
|
|
| MD5 |
127e72bfa3da6a069acfd278a5ae207c
|
|
| BLAKE2b-256 |
d178c8938637a4fb0500ff3f37c76099e2cabb01498a5b55f9df6c43d731c0f7
|
File details
Details for the file valohai_llm-0.1.0-py3-none-any.whl.
File metadata
- Download URL: valohai_llm-0.1.0-py3-none-any.whl
- Upload date:
- Size: 9.6 kB
- Tags: Python 3
- Uploaded using 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}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9d54419f3abbb21f0f792c1922540eb6bdecbbd578ab964c3a38ed83fe3076ad
|
|
| MD5 |
f08bbd01c1af750d7e3f174e63c484b3
|
|
| BLAKE2b-256 |
3610c94f9a08fa7e6b022a8b668b53138461722184bf0c1b850fd9e4ddf32b27
|