Skip to content

Commit

Permalink
Fix for invalid results in results table
Browse files Browse the repository at this point in the history
  • Loading branch information
arjunsuresh committed Feb 15, 2024
1 parent ebf3223 commit 1f7bfbe
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions cm-mlops/script/app-mlperf-inference/customize.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,10 +221,10 @@ def postprocess(i):
if not state['cm-mlperf-inference-results'][state['CM_SUT_CONFIG_NAME']][model].get(scenario):
state['cm-mlperf-inference-results'][state['CM_SUT_CONFIG_NAME']][model][scenario] = {}
state['cm-mlperf-inference-results'][state['CM_SUT_CONFIG_NAME']][model][scenario][mode] = result
state['cm-mlperf-inference-results'][state['CM_SUT_CONFIG_NAME']][model][scenario][mode]['valid'] = valid[mode]
state['cm-mlperf-inference-results'][state['CM_SUT_CONFIG_NAME']][model][scenario][mode+'_valid'] = valid[mode]
if power:
state['cm-mlperf-inference-results'][state['CM_SUT_CONFIG_NAME']][model][scenario]['power'] = power
state['cm-mlperf-inference-results'][state['CM_SUT_CONFIG_NAME']][model][scenario]['power']['valid'] = valid['power']
state['cm-mlperf-inference-results'][state['CM_SUT_CONFIG_NAME']][model][scenario]['power_valid'] = valid['power']
if power_efficiency:
state['cm-mlperf-inference-results'][state['CM_SUT_CONFIG_NAME']][model][scenario]['power_efficiency'] = power_efficiency

Expand Down
12 changes: 6 additions & 6 deletions cm-mlops/script/get-mlperf-inference-utils/mlperf_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ def get_result_table(results):
row.append(scenario)
if results[model][scenario].get('accuracy'):
val = str(results[model][scenario]['accuracy'])
if not results[model][scenario]['accuracy']['valid']:
if not results[model][scenario]['accuracy_valid']:
val = "X "+val
row.append(val)
else:
Expand All @@ -227,21 +227,21 @@ def get_result_table(results):
row.append("-")
elif scenario.lower() == "singlestream":
val_qps = str(round(1000/float(results[model][scenario]['performance']), 3))
if not results[model][scenario]['performance']['valid']:
if not results[model][scenario]['performance_valid']:
val_qps = "X "+val_qps
row.appenx(val_qps)
elif scenario.lower() == "multistream":
val_qps = str(round(8000/float(results[model][scenario]['performance']), 3))
if not results[model][scenario]['performance']['valid']:
if not results[model][scenario]['performance_valid']:
val_qps = "X "+val_qps
row.appenx(val_qps)
val = str(results[model][scenario]['performance'])
if not results[model][scenario]['performance']['valid']:
if not results[model][scenario]['performance_valid']:
val = "X "+val
row.append(val)
else:
val = str(results[model][scenario]['performance'])
if not results[model][scenario]['performance']['valid']:
if not results[model][scenario]['performance_valid']:
val = "X "+val
row.append(val)
row.append("-")
Expand All @@ -250,7 +250,7 @@ def get_result_table(results):
# row.append(results[model][scenario]['power'])
if results[model][scenario].get('power_efficiency','') != '':
val = str(results[model][scenario]['power_efficiency'])
if not results[model][scenario]['power']['valid']:
if not results[model][scenario]['power_valid']:
val = "X "+val
row.append(val)
table.append(row)
Expand Down

0 comments on commit 1f7bfbe

Please sign in to comment.