MCPcopy
hub / github.com/kvcache-ai/ktransformers / print_server_info

Function print_server_info

kt-kernel/python/cli/utils/console.py:217–231  ·  view source on GitHub ↗

Print server startup information.

(
    mode: str, host: str, port: int, gpu_experts: int, cpu_threads: int
)

Source from the content-addressed store, hash-verified

215
216
217def print_server_info(
218 mode: str, host: str, port: int, gpu_experts: int, cpu_threads: int
219) -> None:
220 """Print server startup information."""
221 table = Table(show_header=False, box=None)
222 table.add_column("Key", style="bold")
223 table.add_column("Value")
224
225 table.add_row(t("run_server_mode").split(":")[0], mode)
226 table.add_row("Host", host)
227 table.add_row("Port", str(port))
228 table.add_row(t("run_gpu_experts").split(":")[0], f"{gpu_experts}/layer")
229 table.add_row(t("run_cpu_threads").split(":")[0], str(cpu_threads))
230
231 console.print(Panel(table, title=t("run_server_started"), expand=False, border_style="green"))
232
233
234def print_api_info(host: str, port: int) -> None:

Callers

nothing calls this directly

Calls 2

tFunction · 0.90
printMethod · 0.45

Tested by

no test coverage detected