Allow markdownlint to run locally (#36398)
Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
This commit is contained in:
@@ -1153,11 +1153,11 @@ def _render_table(
|
||||
) -> list[str]:
|
||||
"""Render a markdown table from column specs and backend data."""
|
||||
header = "| " + " | ".join(name for name, _ in columns) + " |"
|
||||
sep = "|" + "|".join("-" * (len(name) + 2) for name, _ in columns) + "|"
|
||||
sep = "| " + " | ".join("-" * len(name) for name, _ in columns) + " |"
|
||||
lines = [header, sep]
|
||||
for info in sorted(backends, key=_sort_key):
|
||||
row = "| " + " | ".join(fmt(info) for _, fmt in columns) + " |"
|
||||
lines.append(row)
|
||||
lines.append(row.replace(" ", " "))
|
||||
return lines
|
||||
|
||||
|
||||
@@ -1268,7 +1268,7 @@ def _priority_table(title: str, backends: list[str]) -> list[str]:
|
||||
f"**{title}:**",
|
||||
"",
|
||||
"| Priority | Backend |",
|
||||
"|----------|---------|",
|
||||
"| -------- | ------- |",
|
||||
*[f"| {i} | `{b}` |" for i, b in enumerate(backends, 1)],
|
||||
"",
|
||||
]
|
||||
@@ -1317,7 +1317,7 @@ def generate_legend() -> str:
|
||||
return """## Legend
|
||||
|
||||
| Column | Description |
|
||||
|--------|-------------|
|
||||
| ------ | ----------- |
|
||||
| **Dtypes** | Supported model data types (fp16, bf16, fp32) |
|
||||
| **KV Dtypes** | Supported KV cache data types (`auto`, `fp8`, `fp8_e4m3`, etc.) |
|
||||
| **Block Sizes** | Supported KV cache block sizes (%N means multiples of N) |
|
||||
@@ -1348,7 +1348,7 @@ def generate_mla_section(
|
||||
"configuration.",
|
||||
"",
|
||||
"| Backend | Description | Compute Cap. | Enable | Disable | Notes |",
|
||||
"|---------|-------------|--------------|--------|---------|-------|",
|
||||
"| ------- | ----------- | ------------ | ------ | ------- | ----- |",
|
||||
]
|
||||
|
||||
for backend in prefill_backends:
|
||||
@@ -1360,7 +1360,7 @@ def generate_mla_section(
|
||||
backend["disable"],
|
||||
backend.get("notes", ""),
|
||||
)
|
||||
lines.append(row)
|
||||
lines.append(row.replace(" ", " "))
|
||||
|
||||
lines.extend(
|
||||
[
|
||||
|
||||
Reference in New Issue
Block a user