Skip to content

Commit

Permalink
summary table in progress
Browse files Browse the repository at this point in the history
  • Loading branch information
nv-braf committed Nov 1, 2023
1 parent f229273 commit 709531b
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions model_analyzer/config/generate/generator_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,12 @@ def extract_value_from_request_parameter(request_parameter: Optional[str]) -> in
# Example: max_tokens:10:int
_, value, _ = request_parameter.split(":")

# this catches the case for non-LLM models where the user has specified request parameters
try:
int(value)
except ValueError as _:
return 0

return int(value)

@staticmethod
Expand All @@ -137,4 +143,10 @@ def extract_text_input_length_from_input_data(input_data: Optional[str]) -> int:
_, _, text_input_length = input_data.split("-")
text_input_length, _ = text_input_length.split(".")

# this catches the case for non-LLM models where the user has specified input data
try:
int(text_input_length)
except ValueError as _:
return 0

return int(text_input_length)

0 comments on commit 709531b

Please sign in to comment.