mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-06-28 19:04:19 +00:00
Allow overriding MODEL_IDS for inference test
This commit is contained in:
parent
02be26098a
commit
9fcf5d58e0
1 changed files with 8 additions and 4 deletions
|
@ -5,6 +5,7 @@
|
||||||
# the root directory of this source tree.
|
# the root directory of this source tree.
|
||||||
|
|
||||||
import itertools
|
import itertools
|
||||||
|
import os
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
import pytest_asyncio
|
import pytest_asyncio
|
||||||
|
@ -50,14 +51,17 @@ def get_expected_stop_reason(model: str):
|
||||||
return StopReason.end_of_message if "Llama3.1" in model else StopReason.end_of_turn
|
return StopReason.end_of_message if "Llama3.1" in model else StopReason.end_of_turn
|
||||||
|
|
||||||
|
|
||||||
|
if "MODEL_IDS" not in os.environ:
|
||||||
|
MODEL_IDS = [Llama_8B, Llama_3B]
|
||||||
|
else:
|
||||||
|
MODEL_IDS = os.environ["MODEL_IDS"].split(",")
|
||||||
|
|
||||||
|
|
||||||
# This is going to create multiple Stack impls without tearing down the previous one
|
# This is going to create multiple Stack impls without tearing down the previous one
|
||||||
# Fix that!
|
# Fix that!
|
||||||
@pytest_asyncio.fixture(
|
@pytest_asyncio.fixture(
|
||||||
scope="session",
|
scope="session",
|
||||||
params=[
|
params=[{"model": m} for m in MODEL_IDS],
|
||||||
{"model": Llama_8B},
|
|
||||||
{"model": Llama_3B},
|
|
||||||
],
|
|
||||||
ids=lambda d: d["model"],
|
ids=lambda d: d["model"],
|
||||||
)
|
)
|
||||||
async def inference_settings(request):
|
async def inference_settings(request):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue