mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-08-13 05:17:26 +00:00
fix: fix the describe table display issue
Signed-off-by: reidliu <reid201711@gmail.com>
This commit is contained in:
parent
19ae4b35d9
commit
5a9cb0fd4f
1 changed files with 6 additions and 6 deletions
|
@ -7,8 +7,6 @@
|
||||||
import argparse
|
import argparse
|
||||||
import json
|
import json
|
||||||
|
|
||||||
from termcolor import colored
|
|
||||||
|
|
||||||
from llama_stack.cli.subcommand import Subcommand
|
from llama_stack.cli.subcommand import Subcommand
|
||||||
from llama_stack.cli.table import print_table
|
from llama_stack.cli.table import print_table
|
||||||
from llama_stack.models.llama.sku_list import resolve_model
|
from llama_stack.models.llama.sku_list import resolve_model
|
||||||
|
@ -52,11 +50,12 @@ class ModelDescribe(Subcommand):
|
||||||
)
|
)
|
||||||
return
|
return
|
||||||
|
|
||||||
|
headers = [
|
||||||
|
"Model",
|
||||||
|
model.descriptor(),
|
||||||
|
]
|
||||||
|
|
||||||
rows = [
|
rows = [
|
||||||
(
|
|
||||||
colored("Model", "white", attrs=["bold"]),
|
|
||||||
colored(model.descriptor(), "white", attrs=["bold"]),
|
|
||||||
),
|
|
||||||
("Hugging Face ID", model.huggingface_repo or "<Not Available>"),
|
("Hugging Face ID", model.huggingface_repo or "<Not Available>"),
|
||||||
("Description", model.description),
|
("Description", model.description),
|
||||||
("Context Length", f"{model.max_seq_length // 1024}K tokens"),
|
("Context Length", f"{model.max_seq_length // 1024}K tokens"),
|
||||||
|
@ -77,5 +76,6 @@ class ModelDescribe(Subcommand):
|
||||||
|
|
||||||
print_table(
|
print_table(
|
||||||
rows,
|
rows,
|
||||||
|
headers,
|
||||||
separate_rows=True,
|
separate_rows=True,
|
||||||
)
|
)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue