Two small but important fixes

This commit is contained in:
Ashwin Bharambe 2025-02-21 11:21:37 -08:00
parent fba1664cd1
commit 4683770f68
2 changed files with 6 additions and 2 deletions

View file

@ -178,6 +178,12 @@ class StackRun(Subcommand):
# else must be venv since that is the only valid option left.
current_venv = os.environ.get("VIRTUAL_ENV")
venv = args.image_name or current_venv
if not venv:
cprint(
"No current virtual environment detected, please specify a virtual environment name with --image-name",
color="red",
)
return
script = importlib.resources.files("llama_stack") / "distribution/start_venv.sh"
run_args = [
script,
@ -206,5 +212,4 @@ class StackRun(Subcommand):
if args.tls_keyfile and args.tls_certfile:
run_args.extend(["--tls-keyfile", args.tls_keyfile, "--tls-certfile", args.tls_certfile])
run_with_pty(run_args)

View file

@ -44,7 +44,6 @@ class SentenceTransformersInferenceImpl(
pass
async def register_model(self, model: Model) -> None:
_ = self._load_sentence_transformer_model(model.provider_resource_id)
return model
async def unregister_model(self, model_id: str) -> None: