Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: fix the describe table display issue #1221

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions llama_stack/cli/model/describe.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
import argparse
import json

from termcolor import colored
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this gone?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

colored is used for model before, and the header has style by default, so no need to use colored, please correct me if I am understanding.


from llama_stack.cli.subcommand import Subcommand
from llama_stack.cli.table import print_table
from llama_stack.models.llama.sku_list import resolve_model
Expand Down Expand Up @@ -52,11 +50,12 @@ def _run_model_describe_cmd(self, args: argparse.Namespace) -> None:
)
return

headers = [
"Model",
model.descriptor(),
]

rows = [
(
colored("Model", "white", attrs=["bold"]),
colored(model.descriptor(), "white", attrs=["bold"]),
),
("Hugging Face ID", model.huggingface_repo or "<Not Available>"),
("Description", model.description),
("Context Length", f"{model.max_seq_length // 1024}K tokens"),
Expand All @@ -77,5 +76,6 @@ def _run_model_describe_cmd(self, args: argparse.Namespace) -> None:

print_table(
rows,
headers,
separate_rows=True,
)