Skip to content

Commit a3c191c

Browse files
authored
Fix PA test. Add assert for boolean arg type (#518)
1 parent 5134ba3 commit a3c191c

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

model_analyzer/perf_analyzer/perf_config.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ class PerfAnalyzerConfig:
4949

5050
input_to_verbose = ['verbose', 'extra-verbose', 'verbose-csv']
5151

52-
additive_args = ['input-data', 'shape', 'streaming']
52+
additive_args = ['input-data', 'shape']
5353

5454
boolean_args = [
5555
'streaming', 'async', 'sync', 'binary-search', 'ssl-grpc-use-ssl'
@@ -326,6 +326,9 @@ def _parse_boolean_args(self, key, value, temp_args):
326326
"""
327327
Parse perf analyzer long args that should not add a value to the cli string
328328
"""
329+
assert type(value) in [
330+
str, type(None)
331+
], f"Data type for arg {key} must be a (boolean) string instead of {type(value)}"
329332
if value != None and value.lower() == "true":
330333
temp_args.append(f'--{key}')
331334
return temp_args

qa/L0_perf_analyzer/test_config_generator.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,8 @@ def generate_additive_args(self):
8484
'perf_analyzer_flags': {
8585
'measurement-mode': 'count_windows',
8686
'measurement-interval': 50,
87-
'streaming': ['header1:value1', 'header2:value2']
87+
'streaming': True,
88+
'shape': ['INPUT__0:1,2,3', 'FAKE_INPUT2:4,5,6']
8889
}
8990
}
9091
with open('./config-additive-args-count-no-adjust.yml', 'w') as f:

0 commit comments

Comments
 (0)