Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions config/templates/jinja/20_harness_pod.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,8 @@ spec:
value: "{{ fma.launcherConfigurator.port }}"
- name: LLMDBENCH_FMA_ITERATIONS
value: "{{ fma.iterations }}"
- name: LLMDBENCH_FMA_SLEEPER_LIMIT
Comment thread
aavarghese marked this conversation as resolved.
Outdated
value: "{{ fma.dualPod.sleeperLimit }}"
{% endif %}
Comment thread
aavarghese marked this conversation as resolved.
{% if harness.extraEnvVars is defined and harness.extraEnvVars %}
{% for env_entry in harness.extraEnvVars %}
Expand Down
187 changes: 142 additions & 45 deletions llmdbenchmark/analysis/benchmark_report/native_to_br0_1.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,21 +52,29 @@ def _get_llmd_benchmark_envars() -> dict:
* int(os.environ.get("LLMDBENCH_VLLM_COMMON_REPLICAS", "-1")),
"accelerator": [
{
"model": os.environ.get("LLMDBENCH_VLLM_COMMON_AFFINITY", "").split(
":", 1
)[-1],
"model": os.environ.get(
"LLMDBENCH_VLLM_COMMON_AFFINITY", ""
).split(":", 1)[-1],
"count": int(
os.environ.get("LLMDBENCH_VLLM_COMMON_TENSOR_PARALLELISM", "-1")
os.environ.get(
"LLMDBENCH_VLLM_COMMON_TENSOR_PARALLELISM", "-1"
)
)
* int(os.environ.get("LLMDBENCH_VLLM_COMMON_DATA_PARALLELISM", "-1")),
* int(
os.environ.get(
"LLMDBENCH_VLLM_COMMON_DATA_PARALLELISM", "-1"
)
),
"parallelism": {
"tp": int(
os.environ.get(
"LLMDBENCH_VLLM_COMMON_TENSOR_PARALLELISM", "-1"
)
),
"dp": int(
os.environ.get("LLMDBENCH_VLLM_COMMON_DATA_PARALLELISM", "-1")
os.environ.get(
"LLMDBENCH_VLLM_COMMON_DATA_PARALLELISM", "-1"
)
),
},
}
Expand Down Expand Up @@ -97,14 +105,18 @@ def _get_llmd_benchmark_envars() -> dict:
},
},
"metadata": {
"load_format": os.environ.get("LLMDBENCH_VLLM_COMMON_VLLM_LOAD_FORMAT", ""),
"load_format": os.environ.get(
"LLMDBENCH_VLLM_COMMON_VLLM_LOAD_FORMAT", ""
),
"logging_level": os.environ.get(
"LLMDBENCH_VLLM_COMMON_VLLM_LOGGING_LEVEL", ""
),
"vllm_server_dev_mode": os.environ.get(
"LLMDBENCH_VLLM_COMMON_VLLM_SERVER_DEV_MODE", ""
),
"preprocess": os.environ.get("LLMDBENCH_VLLM_STANDALONE_PREPROCESS", ""),
"preprocess": os.environ.get(
"LLMDBENCH_VLLM_STANDALONE_PREPROCESS", ""
),
},
},
"metadata": {
Expand Down Expand Up @@ -150,89 +162,117 @@ def _get_llmd_benchmark_envars() -> dict:
"model": {"name": os.environ.get("LLMDBENCH_DEPLOY_CURRENT_MODEL", "")},
"host": {
"type": ["prefill"]
* int(os.environ.get("LLMDBENCH_VLLM_MODELSERVICE_PREFILL_REPLICAS", "-1"))
* int(
os.environ.get(
"LLMDBENCH_VLLM_MODELSERVICE_PREFILL_REPLICAS", "-1"
)
)
+ ["decode"]
* int(os.environ.get("LLMDBENCH_VLLM_MODELSERVICE_DECODE_REPLICAS", "-1")),
* int(
os.environ.get(
"LLMDBENCH_VLLM_MODELSERVICE_DECODE_REPLICAS", "-1"
)
),
"accelerator": [
{
"model": os.environ.get("LLMDBENCH_VLLM_COMMON_AFFINITY", "").split(
":", 1
)[-1],
"model": os.environ.get(
"LLMDBENCH_VLLM_COMMON_AFFINITY", ""
).split(":", 1)[-1],
"count": int(
os.environ.get(
"LLMDBENCH_VLLM_MODELSERVICE_PREFILL_TENSOR_PARALLELISM", "-1"
"LLMDBENCH_VLLM_MODELSERVICE_PREFILL_TENSOR_PARALLELISM",
"-1",
)
)
* int(
os.environ.get(
"LLMDBENCH_VLLM_MODELSERVICE_PREFILL_DATA_LOCAL_PARALLELISM", "-1"
"LLMDBENCH_VLLM_MODELSERVICE_PREFILL_DATA_LOCAL_PARALLELISM",
"-1",
)
),
"parallelism": {
"tp": int(
os.environ.get(
"LLMDBENCH_VLLM_MODELSERVICE_PREFILL_TENSOR_PARALLELISM", "-1"
"LLMDBENCH_VLLM_MODELSERVICE_PREFILL_TENSOR_PARALLELISM",
"-1",
)
),
"dp": int(
os.environ.get(
"LLMDBENCH_VLLM_MODELSERVICE_PREFILL_DATA_PARALLELISM", "-1"
"LLMDBENCH_VLLM_MODELSERVICE_PREFILL_DATA_PARALLELISM",
"-1",
)
),
"dpLocal": int(
os.environ.get(
"LLMDBENCH_VLLM_MODELSERVICE_PREFILL_DATA_LOCAL_PARALLELISM", "-1"
"LLMDBENCH_VLLM_MODELSERVICE_PREFILL_DATA_LOCAL_PARALLELISM",
"-1",
)
),
"workers": int(
os.environ.get(
"LLMDBENCH_VLLM_MODELSERVICE_PREFILL_NUM_WORKERS_PARALLELISM", "-1"
"LLMDBENCH_VLLM_MODELSERVICE_PREFILL_NUM_WORKERS_PARALLELISM",
"-1",
)
),
},
}
]
* int(os.environ.get("LLMDBENCH_VLLM_MODELSERVICE_PREFILL_REPLICAS", "-1"))
* int(
os.environ.get(
"LLMDBENCH_VLLM_MODELSERVICE_PREFILL_REPLICAS", "-1"
)
)
+ [
{
"model": os.environ.get("LLMDBENCH_VLLM_COMMON_AFFINITY", "").split(
":", 1
)[-1],
"model": os.environ.get(
"LLMDBENCH_VLLM_COMMON_AFFINITY", ""
).split(":", 1)[-1],
"count": int(
os.environ.get(
"LLMDBENCH_VLLM_MODELSERVICE_DECODE_TENSOR_PARALLELISM", "-1"
"LLMDBENCH_VLLM_MODELSERVICE_DECODE_TENSOR_PARALLELISM",
"-1",
)
)
* int(
os.environ.get(
"LLMDBENCH_VLLM_MODELSERVICE_DECODE_DATA_LOCAL_PARALLELISM", "-1"
"LLMDBENCH_VLLM_MODELSERVICE_DECODE_DATA_LOCAL_PARALLELISM",
"-1",
)
),
"parallelism": {
"tp": int(
os.environ.get(
"LLMDBENCH_VLLM_MODELSERVICE_DECODE_TENSOR_PARALLELISM", "-1"
"LLMDBENCH_VLLM_MODELSERVICE_DECODE_TENSOR_PARALLELISM",
"-1",
)
),
"dp": int(
os.environ.get(
"LLMDBENCH_VLLM_MODELSERVICE_DECODE_DATA_PARALLELISM", "-1"
"LLMDBENCH_VLLM_MODELSERVICE_DECODE_DATA_PARALLELISM",
"-1",
)
),
"dpLocal": int(
os.environ.get(
"LLMDBENCH_VLLM_MODELSERVICE_DECODE_DATA_LOCAL_PARALLELISM", "-1"
"LLMDBENCH_VLLM_MODELSERVICE_DECODE_DATA_LOCAL_PARALLELISM",
"-1",
)
),
"workers": int(
os.environ.get(
"LLMDBENCH_VLLM_MODELSERVICE_DECODE_NUM_WORKERS_PARALLELISM", "-1"
"LLMDBENCH_VLLM_MODELSERVICE_DECODE_NUM_WORKERS_PARALLELISM",
"-1",
)
),
},
}
]
* int(os.environ.get("LLMDBENCH_VLLM_MODELSERVICE_DECODE_REPLICAS", "-1")),
* int(
os.environ.get(
"LLMDBENCH_VLLM_MODELSERVICE_DECODE_REPLICAS", "-1"
)
),
},
"platform": {
"metadata": {
Expand All @@ -257,8 +297,16 @@ def _get_llmd_benchmark_envars() -> dict:
}
]
* (
int(os.environ.get("LLMDBENCH_VLLM_MODELSERVICE_PREFILL_REPLICAS", "-1"))
+ int(os.environ.get("LLMDBENCH_VLLM_MODELSERVICE_DECODE_REPLICAS", "-1"))
int(
os.environ.get(
"LLMDBENCH_VLLM_MODELSERVICE_PREFILL_REPLICAS", "-1"
)
)
+ int(
os.environ.get(
"LLMDBENCH_VLLM_MODELSERVICE_DECODE_REPLICAS", "-1"
)
)
),
},
},
Expand Down Expand Up @@ -1393,7 +1441,9 @@ def _stats(raw: dict | None, units: Units) -> dict | None:
"sessions_per_second": results.get("sessions_per_second"),
"session_duration": _stats(results.get("session_duration_sec"), Units.S),
"num_events": _stats(results.get("num_events"), Units.COUNT),
"num_events_cancelled": _stats(results.get("num_events_cancelled"), Units.COUNT),
"num_events_cancelled": _stats(
results.get("num_events_cancelled"), Units.COUNT
),
"total_input_tokens": _stats(results.get("total_input_tokens"), Units.COUNT),
"total_output_tokens": _stats(results.get("total_output_tokens"), Units.COUNT),
}
Expand All @@ -1418,7 +1468,8 @@ def _stats(raw: dict | None, units: Units) -> dict | None:
},
"requests": {
"total": results.get("total_events", 0),
"failures": results.get("total_events", 0) - results.get("total_events_completed", 0),
"failures": results.get("total_events", 0)
- results.get("total_events_completed", 0),
"input_length": {
"units": Units.COUNT,
"mean": get_nested(results, ["total_input_tokens", "mean"], 0),
Expand Down Expand Up @@ -2134,7 +2185,7 @@ def _import_categories(cat_list: list[dict[str, Any]]) -> list[dict[str, Any]]:
"args": engine["args"],
"metadata": {
"image": engine["image"],
}
},
}
engines.append(e)

Expand All @@ -2154,6 +2205,7 @@ def _import_categories(cat_list: list[dict[str, Any]]) -> list[dict[str, Any]]:
"deploy_methods": results["scenario"]["deploy_methods"],
"load_format": results["scenario"]["load_format"],
"sleep_mode": results["scenario"]["sleep_mode"],
"sleeper_limit": results["scenario"].get("sleeper_limit", 0),
Comment thread
aavarghese marked this conversation as resolved.
Outdated
"gpus": results["scenario"]["gpus"],
Comment thread
aavarghese marked this conversation as resolved.
},
},
Expand Down Expand Up @@ -2341,42 +2393,87 @@ def _import_categories(cat_list: list[dict[str, Any]]) -> list[dict[str, Any]]:
}
vllm_metadatas.append(metadata_dict)

results_dict["metrics"]["metadata"].append({"name": metrics_name, "value": vllm_metadatas})
results_dict["metrics"]["metadata"].append(
{"name": metrics_name, "value": vllm_metadatas}
)

metrics_name = "extra_metrics"
fma_metadatas = []
for extra_metric in results.get(metrics_name, []):
for extra_metric in results.get(metrics_name, []):
if extra_metric["name"] != "fma":
continue

metadata_dict = {"name": extra_metric["name"]}
iterations = []
for iteration in extra_metric.get("iterations", []):
it = { "iteration": { "units": Units.COUNT, "value": iteration["iteration"] } }
it = {"iteration": {"units": Units.COUNT, "value": iteration["iteration"]}}
launcher_infos = []
for launcher_info in iteration.get("launcher_infos", []):
info = { "name": launcher_info["name"] }
info = {"name": launcher_info["name"]}

requester_info = launcher_info["requester_info"]
ri = { "name": requester_info["name"] }
ri["creation_timestamp"] = { "units": Units.S, "value": requester_info["creation_timestamp"]}
ri["ready_timestamp"] = { "units": Units.S, "value": requester_info["ready_timestamp"]}
ri["dual_label_timestamp"] = { "units": Units.S, "value": requester_info["dual_label_timestamp"]}
ri = {"name": requester_info["name"]}
ri["creation_timestamp"] = {
"units": Units.S,
"value": requester_info["creation_timestamp"],
}
ri["ready_timestamp"] = {
"units": Units.S,
"value": requester_info["ready_timestamp"],
}
ri["dual_label_timestamp"] = {
"units": Units.S,
"value": requester_info["dual_label_timestamp"],
}
info["requester_info"] = ri

info["actuation_condition"] = launcher_info["actuation_condition"]
info["launcher_endpoint"] = launcher_info["launcher_endpoint"]
info["vllm_endpoint"] = launcher_info["vllm_endpoint"]
info["ttft"] = { "units": Units.S, "value": launcher_info["ttft"]}
info["ttft"] = {"units": Units.S, "value": launcher_info["ttft"]}
info["launcher_creation_timestamp"] = {
"units": Units.S,
"value": launcher_info.get("launcher_creation_timestamp", 0.0),
}
info["launcher_node"] = launcher_info.get("launcher_node", "")
if launcher_info.get("t_wake") is not None:
info["t_wake"] = {
"units": Units.S,
"value": launcher_info["t_wake"],
}
if launcher_info.get("t_instance_create") is not None:
info["t_instance_create"] = {
"units": Units.S,
"value": launcher_info["t_instance_create"],
}
if launcher_info.get("t_cold_launcher") is not None:
info["t_cold_launcher"] = {
"units": Units.S,
"value": launcher_info["t_cold_launcher"],
}
launcher_infos.append(info)

it["launcher_infos"] = launcher_infos
it["hot_hit_rate"] = {
"units": Units.COUNT,
"value": iteration.get("hot_hit_rate", 0.0),
}
it["warm_hit_rate"] = {
"units": Units.COUNT,
"value": iteration.get("warm_hit_rate", 0.0),
}
it["cold_launcher_hit_rate"] = {
"units": Units.COUNT,
"value": iteration.get("cold_launcher_hit_rate", 0.0),
}
iterations.append(it)

metadata_dict["iterations"] = iterations
fma_metadatas.append(metadata_dict)

results_dict["metrics"]["metadata"].append({"name": metrics_name, "value": fma_metadatas})
results_dict["metrics"]["metadata"].append(
{"name": metrics_name, "value": fma_metadatas}
)

update_dict(br_dict, results_dict)

Expand Down
Loading