Merge branch 'main' into rag-metadata-support

This commit is contained in:
Francisco Arceo 2025-05-13 21:14:02 -06:00 committed by GitHub
commit 227ff4c9b3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
42 changed files with 1294 additions and 563 deletions

View file

@ -11,7 +11,7 @@ pytest --help
Here are the most important options:
- `--stack-config`: specify the stack config to use. You have three ways to point to a stack:
- a URL which points to a Llama Stack distribution server
- a template (e.g., `fireworks`, `together`) or a path to a run.yaml file
- a template (e.g., `fireworks`, `together`) or a path to a `run.yaml` file
- a comma-separated list of api=provider pairs, e.g. `inference=fireworks,safety=llama-guard,agents=meta-reference`. This is most useful for testing a single API surface.
- `--env`: set environment variables, e.g. --env KEY=value. this is a utility option to set environment variables required by various providers.

View file

@ -6,6 +6,7 @@
from collections import defaultdict
from pathlib import Path
import pytest
from pytest import CollectReport
@ -65,6 +66,7 @@ class Report:
def __init__(self, config):
self.distro_name = None
self.config = config
self.output_path = Path(config.getoption("--report")) if config.getoption("--report") else None
stack_config = self.config.getoption("--stack-config")
if stack_config:
@ -161,7 +163,7 @@ class Report:
"|:-----|:-----|:-----|:-----|:-----|",
]
provider = [p for p in providers if p.api == str(api_group.name)]
provider_str = ",".join(provider) if provider else ""
provider_str = ",".join(str(p) for p in provider) if provider else ""
for api, capa_map in API_MAPS[api_group].items():
for capa, tests in capa_map.items():
for test_name in tests:
@ -184,10 +186,12 @@ class Report:
# Get values from fixtures for report output
if model_id := item.funcargs.get("text_model_id"):
text_model = model_id.split("/")[1]
parts = model_id.split("/")
text_model = parts[1] if len(parts) > 1 else model_id
self.text_model_id = self.text_model_id or text_model
elif model_id := item.funcargs.get("vision_model_id"):
vision_model = model_id.split("/")[1]
parts = model_id.split("/")
vision_model = parts[1] if len(parts) > 1 else model_id
self.vision_model_id = self.vision_model_id or vision_model
if not self.client: