Add your description here
Project description
TrustyAI LM-Eval as and Out-of-Tree Llama Stack Provider
About
This repository implements TrustyAI's LM-Eval as an out-of-tree Llama Stack remote provider.
Use
Prerequsites
- Admin access to an OpenShift cluster with RHOAI installed
- Login to your OpenShift cluster with
oc login --token=<TOKEN> --server=<SERVER> - Installation of
uv - Installation of
occli tool - Installation of
llama stackcli tool
-
Clone this repository
git clone https://github.com/trustyai-explainability/llama-stack-provider-lmeval.git -
Set
llama-stack-provider-lmevalas your working directory.cd llama-stack-provider-lmeval -
Deploy
microsoft/Phi-3-mini-4k-instructon vLLM Serving Runtimea. Create a namespace with a name of your choice
TEST_NS=<NAMESPACE> oc create ns $TEST_NS oc get ns $TEST_NS
b. Deploy the model via vLLM
oc apply -k demos/resources/kustomization.yaml
-
Before continuing, preform a sanity check to make sure the model was sucessfully deployed
oc get pods | grep "predictor"
Expected output:
phi-3-predictor-00002-deployment-794fb6b4b-clhj7 3/3 Running 0 5h55m -
Create and activate a virtual enviornment
uv venv .llamastack-venvsource .llamastack-venv/bin/activate -
Install the required libraries
uv pip install -e . -
Define the following ennvironment variables
export VLLM_URL=https://$(oc get $(oc get ksvc -o name | grep predictor) --template={{.status.url}})/v1/completions export TRUSTYAI_LM_EVAL_NAMESPACE=$(oc project | cut -d '"' -f2) -
Start the llama stack server in a virtual enviornment
llama stack run run.yaml --image-type venvExpected output:
INFO: Application startup complete. INFO: Uvicorn running on http://['::', '0.0.0.0']:8321 (Press CTRL+C to quit) -
Navigate to
demos/to run the demo notebooks
TLS Support
This provider supports TLS for secure communication with model inference endpoints. TLS configuration is controlled through environment variables:
Environment Variables
TRUSTYAI_LMEVAL_TLS: Set totrueto enable TLS supportTRUSTYAI_LMEVAL_CERT_FILE: Name of the certificate file in the secret (e.g.,custom-ca.pem)TRUSTYAI_LMEVAL_CERT_SECRET: Name of the Kubernetes secret containing the TLS certificate
Structured Configuration
The provider also supports structured TLS configuration through the TLSConfig class:
from llama_stack_provider_lmeval.config import TLSConfig
tls_config = TLSConfig(
enable=True, # Enable TLS support
cert_file="custom-ca.pem", # Certificate filename in secret
cert_secret="vllm-ca-bundle" # Kubernetes secret name
)
Note: When using structured configuration, both cert_file and cert_secret must be provided together, or neither should be provided (for simple TLS verification).
TLS Configuration Modes
The provider supports two TLS configuration modes:
- Environment Variables: Set TLS configuration via environment variables for runtime flexibility
- Provider Config: Set TLS configuration via the
TLSConfigobject for code-based configuration
Priority Order
TLS configuration follows this priority order:
- Environment Variables (highest priority)
- Provider Config (
TLSConfigobject) - No TLS (default)
Contributing
We welcome contributions! Please see CONTRIBUTING.md for detailed information on:
- Development setup and prerequisites
- Pre-commit hooks and code quality standards
- Running tests and development workflow
- Troubleshooting common issues
License
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.
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
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 llama_stack_provider_lmeval-0.2.4.tar.gz.
File metadata
- Download URL: llama_stack_provider_lmeval-0.2.4.tar.gz
- Upload date:
- Size: 32.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
06220f358e5d992bac6c3584de8d7d92fc87042fd8e02e35b5cfaf5c718cd1c2
|
|
| MD5 |
06a879d5bf59ccbe1f7fdac7cf81a8a8
|
|
| BLAKE2b-256 |
443906c06062d7a793f1533676f721631d6029e383dd213a344226580ede69ba
|
Provenance
The following attestation bundles were made for llama_stack_provider_lmeval-0.2.4.tar.gz:
Publisher:
build-and-push.yaml on trustyai-explainability/llama-stack-provider-lmeval
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
llama_stack_provider_lmeval-0.2.4.tar.gz -
Subject digest:
06220f358e5d992bac6c3584de8d7d92fc87042fd8e02e35b5cfaf5c718cd1c2 - Sigstore transparency entry: 496227330
- Sigstore integration time:
-
Permalink:
trustyai-explainability/llama-stack-provider-lmeval@86ce2de207e31dd4279cacbdc2eea8ded0b1c989 -
Branch / Tag:
refs/tags/v0.2.4 - Owner: https://github.com/trustyai-explainability
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build-and-push.yaml@86ce2de207e31dd4279cacbdc2eea8ded0b1c989 -
Trigger Event:
release
-
Statement type:
File details
Details for the file llama_stack_provider_lmeval-0.2.4-py3-none-any.whl.
File metadata
- Download URL: llama_stack_provider_lmeval-0.2.4-py3-none-any.whl
- Upload date:
- Size: 22.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4b6063925a6227166ce0c1bb45dd9cc7c78e23ee8296c29d8aded7d2c0620563
|
|
| MD5 |
f4c1b9120fcd48b4f4e20eaf7da1ae86
|
|
| BLAKE2b-256 |
74d198bf44113e7d5870749738504deec27bc8da72ca574cc125b36bb7765cff
|
Provenance
The following attestation bundles were made for llama_stack_provider_lmeval-0.2.4-py3-none-any.whl:
Publisher:
build-and-push.yaml on trustyai-explainability/llama-stack-provider-lmeval
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
llama_stack_provider_lmeval-0.2.4-py3-none-any.whl -
Subject digest:
4b6063925a6227166ce0c1bb45dd9cc7c78e23ee8296c29d8aded7d2c0620563 - Sigstore transparency entry: 496227363
- Sigstore integration time:
-
Permalink:
trustyai-explainability/llama-stack-provider-lmeval@86ce2de207e31dd4279cacbdc2eea8ded0b1c989 -
Branch / Tag:
refs/tags/v0.2.4 - Owner: https://github.com/trustyai-explainability
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build-and-push.yaml@86ce2de207e31dd4279cacbdc2eea8ded0b1c989 -
Trigger Event:
release
-
Statement type: