mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-12-22 22:42:25 +00:00
t fix(ci): allow tests to skip llama stack client instantiation
This commit is contained in:
parent
dfce05d0c5
commit
f0e9d78099
3 changed files with 19 additions and 7 deletions
|
|
@ -36,12 +36,15 @@ def pytest_sessionstart(session):
|
|||
|
||||
# pull client instantiation to session start so all the complex logs during initialization
|
||||
# don't clobber the test one-liner outputs
|
||||
print("instantiating llama_stack_client")
|
||||
start_time = time.time()
|
||||
with warnings.catch_warnings():
|
||||
warnings.filterwarnings("ignore", category=DeprecationWarning)
|
||||
session._llama_stack_client = instantiate_llama_stack_client(session)
|
||||
print(f"llama_stack_client instantiated in {time.time() - start_time:.3f}s")
|
||||
|
||||
if not getattr(session.config, "skip_llama_stack_client_instantiation", False):
|
||||
print("instantiating llama_stack_client")
|
||||
start_time = time.time()
|
||||
with warnings.catch_warnings():
|
||||
warnings.filterwarnings("ignore", category=DeprecationWarning)
|
||||
|
||||
session._llama_stack_client = instantiate_llama_stack_client(session)
|
||||
print(f"llama_stack_client instantiated in {time.time() - start_time:.3f}s")
|
||||
|
||||
|
||||
def pytest_runtest_teardown(item):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue