MCPcopy
hub / github.com/gpustack/gpustack / render_open_source_replacement

Function render_open_source_replacement

hack/perf/perf_doc_common.py:534–583  ·  view source on GitHub ↗
(
    profiles: dict[str, dict[str, Any]],
)

Source from the content-addressed store, hash-verified

532
533
534def render_open_source_replacement(
535 profiles: dict[str, dict[str, Any]],
536) -> list[str]:
537 dataset_names = {
538 str(profile.get("dataset_name") or "").strip().lower()
539 for profile in profiles.values()
540 if profile
541 }
542 lines = [
543 "### Open-Source Replacement",
544 "",
545 "If you do not use GPUStack, you can replace the GPUStack benchmark workflow with direct `guidellm benchmark` commands.",
546 "",
547 ]
548 if "sharegpt" in dataset_names:
549 lines.extend(
550 [
551 "For profiles with `dataset_name: ShareGPT`:",
552 "",
553 "```bash",
554 "guidellm benchmark \\",
555 " --target ${target} \\",
556 " --profile constant \\",
557 " --rate ${request_rate} \\",
558 " --max-requests ${total_requests} \\",
559 " --processor ${model_path} \\",
560 " --data ./ShareGPT_V3_unfiltered_cleaned_split.json",
561 "```",
562 "",
563 ]
564 )
565 if "random" in dataset_names:
566 lines.extend(
567 [
568 "For profiles with `dataset_name: Random`:",
569 "",
570 "```bash",
571 "guidellm benchmark \\",
572 " --target ${target} \\",
573 " --profile constant \\",
574 " --rate ${request_rate} \\",
575 " --max-requests ${total_requests} \\",
576 " --processor ${model_path} \\",
577 ' --data "prompt_tokens=${dataset_input_tokens},output_tokens=${dataset_output_tokens}" \\',
578 " --random-seed ${dataset_seed:-42}",
579 "```",
580 "",
581 ]
582 )
583 return lines
584
585
586def collect_profiles_from_results(

Callers 2

generate_markdownFunction · 0.85

Calls 2

extendMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected