From e667dac82fe1e394d05793e4cdeb2bbadc841df4 Mon Sep 17 00:00:00 2001 From: Aaron Pham <29749331+aarnphm@users.noreply.github.com> Date: Sun, 12 Nov 2023 18:36:19 -0500 Subject: [PATCH] chore(cli): always show available models (#621) Signed-off-by: Aaron <29749331+aarnphm@users.noreply.github.com> --- openllm-python/src/openllm_cli/entrypoint.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/openllm-python/src/openllm_cli/entrypoint.py b/openllm-python/src/openllm_cli/entrypoint.py index 2bcdcd80..41ba1e1c 100644 --- a/openllm-python/src/openllm_cli/entrypoint.py +++ b/openllm-python/src/openllm_cli/entrypoint.py @@ -1169,7 +1169,8 @@ class ModelItem(t.TypedDict): @click.option( '--show-available', is_flag=True, - default=False, + default=True, + hidden=True, help="Show available models in local store (mutually exclusive with '-o porcelain').", ) def models_command(show_available: bool) -> dict[t.LiteralString, ModelItem]: @@ -1177,7 +1178,7 @@ def models_command(show_available: bool) -> dict[t.LiteralString, ModelItem]: \b ```bash - openllm models --show-available + openllm models ``` """ result: dict[t.LiteralString, ModelItem] = { @@ -1187,9 +1188,7 @@ def models_command(show_available: bool) -> dict[t.LiteralString, ModelItem]: supported_backends=config.__openllm_backend__, installation='pip install ' + (f'"openllm[{m}]"' if m in OPTIONAL_DEPENDENCIES or config.__openllm_requirements__ else 'openllm'), - items=[] - if not show_available - else [ + items=[ str(md.tag) for md in bentoml.models.list() if 'framework' in md.info.labels