mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-07-02 20:40:36 +00:00
add pytest option to generate a functional report for distribution (#833)
# What does this PR do? add pytest option (`--report`) to support generating a functional report for llama stack distribution ## Test Plan ``` export LLAMA_STACK_CONFIG=./llama_stack/templates/fireworks/run.yaml /opt/miniconda3/envs/stack/bin/pytest -s -v tests/client-sdk/ --report ``` See a report file was generated under `./llama_stack/templates/fireworks/report.md` ## Sources Please link relevant resources if necessary. ## Before submitting - [ ] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case). - [ ] Ran pre-commit to handle lint / formatting issues. - [ ] Read the [contributor guideline](https://github.com/meta-llama/llama-stack/blob/main/CONTRIBUTING.md), Pull Request section? - [ ] Updated relevant documentation. - [ ] Wrote necessary unit or integration tests.
This commit is contained in:
parent
e41873f268
commit
edf56884a7
6 changed files with 324 additions and 6 deletions
|
@ -10,11 +10,27 @@ import pytest
|
|||
from llama_stack import LlamaStackAsLibraryClient
|
||||
from llama_stack.providers.tests.env import get_env_or_fail
|
||||
from llama_stack_client import LlamaStackClient
|
||||
from report import Report
|
||||
|
||||
|
||||
def pytest_configure(config):
|
||||
config.option.tbstyle = "short"
|
||||
config.option.disable_warnings = True
|
||||
if config.getoption("--report"):
|
||||
config.pluginmanager.register(Report())
|
||||
|
||||
|
||||
def pytest_addoption(parser):
|
||||
parser.addoption(
|
||||
"--report",
|
||||
default=False,
|
||||
action="store_true",
|
||||
help="Knob to determine if we should generate report, e.g. --output=True",
|
||||
)
|
||||
|
||||
|
||||
TEXT_MODEL = "meta-llama/Llama-3.1-8B-Instruct"
|
||||
INFERENCE_MODEL = "meta-llama/Llama-3.2-11B-Vision-Instruct"
|
||||
|
||||
|
||||
@pytest.fixture(scope="session")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue