minor fixes

This commit is contained in:
Hardik Shah 2024-08-06 18:56:22 -07:00
parent f83b97992c
commit ade574a0ef
4 changed files with 4 additions and 5 deletions

View file

@ -102,8 +102,8 @@ def configure_llama_distribution(dist: "Distribution", config: Dict[str, Any]):
}
dist_config = {
"providers": provider_configs,
**existing_config,
"providers": provider_configs,
}
config_path = DISTRIBS_BASE_DIR / existing_config["name"] / "config.yaml"

View file

@ -49,9 +49,9 @@ class ModelDescribe(Subcommand):
rows = [
(
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),
("Context Length", f"{model.max_seq_length // 1024}K tokens"),
("Weights format", model.quantization_format.value),

View file

@ -45,7 +45,7 @@ def format_row(row, col_widths):
def print_table(rows, headers=None, separate_rows: bool = False):
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]
if not headers:

View file

@ -50,7 +50,6 @@ class InferenceClient(Inference):
headers={"Content-Type": "application/json"},
timeout=20,
) as response:
print("Headers", response.headers)
if response.status_code != 200:
content = await response.aread()
cprint(