Skip to content

Commit

Permalink
Remove unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
dyastremsky committed Mar 7, 2024
1 parent 7080ab1 commit 21aba4c
Showing 1 changed file with 0 additions and 31 deletions.
31 changes: 0 additions & 31 deletions src/c++/perf_analyzer/genai-pa/genai_pa/llm_metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,13 +131,6 @@ def _is_time_field(self, field: str):
]
return field in time_fields

def _use_exact_length(self, value: str):
exact_value_length = 17
formatted_value = f"{value:.{exact_value_length}f}"
if len(formatted_value) < exact_value_length:
return formatted_value.ljust(exact_value_length)
return formatted_value[:exact_value_length]

def pretty_print(self):
table = Table(title="PA LLM Metrics")

Expand All @@ -162,30 +155,6 @@ def pretty_print(self):
console = Console()
console.print(table)

field_stats = {}

for key, value in self.__dict__.items():
if key.startswith(
(
"p25_",
"p50_",
"p75_",
"p90_",
"p95_",
"p99_",
"avg_",
"min_",
"max_",
"std_",
)
):
stat, field = key.split("_", 1)
stat = stat.replace("_", " ")

if field not in field_stats:
field_stats[field] = {}
field_stats[field][stat] = value


class LLMProfileData:
"""A class that calculates and aggregates all the LLM performance statistics
Expand Down

0 comments on commit 21aba4c

Please sign in to comment.