mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-12-28 04:10:25 +00:00
Merge branch 'main' into rag-metadata-support
This commit is contained in:
commit
227ff4c9b3
42 changed files with 1294 additions and 563 deletions
|
|
@ -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.
|
||||
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue