|
12 | 12 | # See the License for the specific language governing permissions and |
13 | 13 | # limitations under the License. |
14 | 14 |
|
15 | | -from typing import Dict, List, Optional, Any |
| 15 | +from typing import Dict, List, Optional, Any, Union |
16 | 16 | from model_analyzer.model_analyzer_exceptions \ |
17 | 17 | import TritonModelAnalyzerException |
18 | 18 | import yaml |
@@ -266,12 +266,11 @@ def _check_no_brute_search(self, args: Namespace, |
266 | 266 |
|
267 | 267 | def _check_no_multi_model(self, args: Namespace, |
268 | 268 | yaml_config: Optional[Dict[str, List]]) -> None: |
269 | | - profile_models = self._get_config_value('profile_models', args, |
270 | | - yaml_config) |
| 269 | + profile_models: Union[Dict, List, str] = self._get_config_value( |
| 270 | + 'profile_models', args, yaml_config) # type: ignore |
271 | 271 |
|
272 | | - profile_model_count = len(profile_models) if isinstance( |
273 | | - profile_models, list) else len( |
274 | | - profile_models.split(',')) # type: ignore |
| 272 | + profile_model_count = len(profile_models.split(',')) if isinstance( |
| 273 | + profile_models, str) else len(profile_models) |
275 | 274 |
|
276 | 275 | if profile_model_count > 1: |
277 | 276 | raise TritonModelAnalyzerException( |
|
0 commit comments