mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-07-29 15:23:51 +00:00
minor fixes
This commit is contained in:
parent
f83b97992c
commit
ade574a0ef
4 changed files with 4 additions and 5 deletions
|
@ -102,8 +102,8 @@ def configure_llama_distribution(dist: "Distribution", config: Dict[str, Any]):
|
||||||
}
|
}
|
||||||
|
|
||||||
dist_config = {
|
dist_config = {
|
||||||
"providers": provider_configs,
|
|
||||||
**existing_config,
|
**existing_config,
|
||||||
|
"providers": provider_configs,
|
||||||
}
|
}
|
||||||
|
|
||||||
config_path = DISTRIBS_BASE_DIR / existing_config["name"] / "config.yaml"
|
config_path = DISTRIBS_BASE_DIR / existing_config["name"] / "config.yaml"
|
||||||
|
|
|
@ -49,9 +49,9 @@ class ModelDescribe(Subcommand):
|
||||||
rows = [
|
rows = [
|
||||||
(
|
(
|
||||||
colored("Model", "white", attrs=["bold"]),
|
colored("Model", "white", attrs=["bold"]),
|
||||||
colored(model.sku.value, "white", attrs=["bold"]),
|
colored(model.descriptor(), "white", attrs=["bold"]),
|
||||||
),
|
),
|
||||||
("HuggingFace ID", model.huggingface_id or "<Not Available>"),
|
("HuggingFace ID", model.huggingface_repo or "<Not Available>"),
|
||||||
("Description", model.description_markdown),
|
("Description", model.description_markdown),
|
||||||
("Context Length", f"{model.max_seq_length // 1024}K tokens"),
|
("Context Length", f"{model.max_seq_length // 1024}K tokens"),
|
||||||
("Weights format", model.quantization_format.value),
|
("Weights format", model.quantization_format.value),
|
||||||
|
|
|
@ -45,7 +45,7 @@ def format_row(row, col_widths):
|
||||||
|
|
||||||
def print_table(rows, headers=None, separate_rows: bool = False):
|
def print_table(rows, headers=None, separate_rows: bool = False):
|
||||||
def itemlen(item):
|
def itemlen(item):
|
||||||
return len(strip_ansi_colors(item))
|
return max([len(line) for line in strip_ansi_colors(item).split("\n")])
|
||||||
|
|
||||||
rows = [[x or "" for x in row] for row in rows]
|
rows = [[x or "" for x in row] for row in rows]
|
||||||
if not headers:
|
if not headers:
|
||||||
|
|
|
@ -50,7 +50,6 @@ class InferenceClient(Inference):
|
||||||
headers={"Content-Type": "application/json"},
|
headers={"Content-Type": "application/json"},
|
||||||
timeout=20,
|
timeout=20,
|
||||||
) as response:
|
) as response:
|
||||||
print("Headers", response.headers)
|
|
||||||
if response.status_code != 200:
|
if response.status_code != 200:
|
||||||
content = await response.aread()
|
content = await response.aread()
|
||||||
cprint(
|
cprint(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue