Skip to content

Commit c335ed8

Browse files
author
Hardik Shah
committed
raise when client initialize fails
1 parent 62e5461 commit c335ed8

1 file changed

Lines changed: 12 additions & 12 deletions

File tree

llama_stack/distribution/library_client.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,6 @@
1717

1818
import httpx
1919
import yaml
20-
from llama_stack_client import (
21-
APIResponse,
22-
AsyncAPIResponse,
23-
AsyncLlamaStackClient,
24-
AsyncStream,
25-
LlamaStackClient,
26-
NOT_GIVEN,
27-
)
28-
from pydantic import BaseModel, TypeAdapter
29-
from rich.console import Console
30-
from termcolor import cprint
3120

3221
from llama_stack.distribution.build import print_pip_install_help
3322
from llama_stack.distribution.configure import parse_and_maybe_upgrade_config
@@ -46,6 +35,17 @@
4635
setup_logger,
4736
start_trace,
4837
)
38+
from llama_stack_client import (
39+
APIResponse,
40+
AsyncAPIResponse,
41+
AsyncLlamaStackClient,
42+
AsyncStream,
43+
LlamaStackClient,
44+
NOT_GIVEN,
45+
)
46+
from pydantic import BaseModel, TypeAdapter
47+
from rich.console import Console
48+
from termcolor import cprint
4949

5050
T = TypeVar("T")
5151

@@ -214,7 +214,7 @@ async def initialize(self) -> bool:
214214
f"Please run:\n\n{prefix}llama stack build --template {self.config_path_or_template_name} --image-type venv\n\n",
215215
"yellow",
216216
)
217-
return False
217+
raise _e
218218

219219
if Api.telemetry in self.impls:
220220
setup_logger(self.impls[Api.telemetry])

0 commit comments

Comments
 (0)