From 015a2c2cbce49c49b24887ce9c2efa95ee3c4bc1 Mon Sep 17 00:00:00 2001 From: braf Date: Fri, 6 Oct 2023 22:44:21 +0000 Subject: [PATCH] Fix type checking errors --- .../config/generate/perf_analyzer_config_generator.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/model_analyzer/config/generate/perf_analyzer_config_generator.py b/model_analyzer/config/generate/perf_analyzer_config_generator.py index 52a4eebfd..7700e130c 100755 --- a/model_analyzer/config/generate/perf_analyzer_config_generator.py +++ b/model_analyzer/config/generate/perf_analyzer_config_generator.py @@ -16,7 +16,6 @@ import json import logging -import tempfile from copy import deepcopy from typing import Dict, Generator, List, Optional, Tuple @@ -290,7 +289,7 @@ def _generate_perf_configs(self) -> None: self._configs.append(all_perf_configs_for_a_given_parameter) def _create_new_perf_config( - self, parameter: int, unmodified_non_parameter_combination: List[Dict] + self, parameter: int, unmodified_non_parameter_combination: Dict ) -> PerfAnalyzerConfig: perf_config = self._create_base_perf_config() @@ -317,15 +316,15 @@ def _create_base_perf_config(self) -> PerfAnalyzerConfig: return perf_config def _extract_prompt_length( - self, unmodified_parameter_combination: List[Dict] - ) -> Tuple[int, List[Dict]]: + self, unmodified_parameter_combination: Dict + ) -> Tuple[int, Dict]: if self._cli_config.is_llm_model(): modified_parameter_combination = deepcopy(unmodified_parameter_combination) prompt_length = modified_parameter_combination.pop("prompt-length") return prompt_length, modified_parameter_combination else: - return None, unmodified_parameter_combination + return 0, unmodified_parameter_combination def _update_perf_config_based_on_non_parameter_combination( self, perf_config: PerfAnalyzerConfig, non_parameter_combination: Dict