Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 37 additions & 18 deletions add_results_summary.py
Original file line number Diff line number Diff line change
Expand Up @@ -795,15 +795,15 @@ def get_table_header(division, category, scenarios_filter):
required_scenarios_edge = checker.MODEL_CONFIG[version]["required-scenarios-edge"][mlperf_model]
else:
required_scenarios_edge = []
for scenario_tmp in data[model]:
if scenario_tmp not in scenarios_filter:
scenarios_filter.append(scenario_tmp)
for scenario_tmp in data[model]:
if scenario_tmp not in scenarios_filter:
scenarios_filter.append(scenario_tmp)

if division == "closed":
if category == "datacenter":
scenarios_filter = list(set(scenarios_filter) | set(required_scenarios_datacenter))
else:
scenarios_filter = list(set(scenarios_filter) | set(required_scenarios_edge))
if division == "closed":
if category == "datacenter":
scenarios_filter = list(set(scenarios_filter) | set(required_scenarios_datacenter))
else:
scenarios_filter = list(set(scenarios_filter) | set(required_scenarios_edge))

button_links = get_button_links(details, division)
html_table = get_table_header(division, category, scenarios_filter)
Expand Down Expand Up @@ -832,6 +832,10 @@ def get_table_header(division, category, scenarios_filter):
required_scenarios_datacenter = checker.MODEL_CONFIG[version]["required-scenarios-datacenter"][mlperf_model]
else:
required_scenarios_datacenter = []
if mlperf_model in checker.MODEL_CONFIG[version]["optional-scenarios-datacenter"]:
optional_scenarios_datacenter = checker.MODEL_CONFIG[version]["optional-scenarios-datacenter"][mlperf_model]
else:
optional_scenarios_datacenter = []
if mlperf_model in checker.MODEL_CONFIG[version]["required-scenarios-edge"]:
required_scenarios_edge = checker.MODEL_CONFIG[version]["required-scenarios-edge"][mlperf_model]
else:
Expand Down Expand Up @@ -859,24 +863,33 @@ def get_table_header(division, category, scenarios_filter):
html_table += f"""<td class="accuracy">{round_dict_values(data[model]["Server"]["Accuracy"])}</td>"""
html_table += f"""<td class="units">{data[model]["Server"]["Performance_Units"]}</td> <td class="perf">{data[model]["Server"]["Performance_Result"]:.2f}</td>"""
else:
if "Server" in required_scenarios_datacenter and division == "closed": #must be open
html_table += scenario_missing_td
if "Server" in scenarios_filter and division == "closed": #must be open
if "Server" in required_scenarios_datacenter or "Server" in optional_scenarios_datacenter:
html_table += scenario_missing_td
else:
html_table += f"""<td class="na" colspan="{colspan}"> N/A </td>"""

if "Interactive" in data[model]:
if division == "open":
html_table += f"""<td class="accuracy">{round_dict_values(data[model]["Interactive"]["Accuracy"])}</td>"""
html_table += f"""<td class="units">{data[model]["Interactive"]["Performance_Units"]}</td> <td class="perf">{data[model]["Interactive"]["Performance_Result"]:.2f}</td>"""
else:
if "Interactive" in required_scenarios_datacenter and division == "closed": #must be open
html_table += scenario_missing_td
if "Interactive" in scenarios_filter and division == "closed": #must be open
if "Interactive" in required_scenarios_datacenter or "Interactive" in optional_scenarios_datacenter:
html_table += scenario_missing_td
else:
html_table += f"""<td class="na" colspan="{colspan}"> N/A </td>"""

if "Offline" in data[model]:
if division == "open":
html_table += f"""<td class="accuracy">{round_dict_values(data[model]["Offline"]["Accuracy"])}</td>"""
html_table += f"""<td class="units">{data[model]["Offline"]['Performance_Units']}</td> <td class="perf">{data[model]["Offline"]["Performance_Result"]:.2f}</td>"""
else:
if "Offline" in required_scenarios_datacenter and division == "closed": #must be open
html_table += scenario_missing_td
if "Offline" in scenarios_filter and division == "closed": #must be open
if "Offline" in required_scenarios_datacenter:
html_table += scenario_missing_td
else:
html_table += f"""<td class="na" colspan="{colspan}"> N/A </td>"""

if "edge" in category:
if "SingleStream" in data[model]:
Expand All @@ -885,17 +898,23 @@ def get_table_header(division, category, scenarios_filter):
html_table += f"""<td class="accuracy">{round_dict_values(data[model][scenario]["Accuracy"])}</td>"""
html_table += f"""<td class="units">{data[model][scenario]["Performance_Units"]}</td> <td class="perf">{data[model][scenario]["Performance_Result"]:.2f}</td>"""
else:
if "SingleStream" in required_scenarios_edge and division == "closed": #must be open
html_table += scenario_missing_td
if "SingleStream" in scenarios_filter and division == "closed": #must be open
if "SingleStream" in required_scenarios_datacenter:
html_table += scenario_missing_td
else:
html_table += f"""<td class="na" colspan="{colspan}"> N/A </td>"""

if "MultiStream" in data[model]:
scenario = "MultiStream"
if division == "open":
html_table += f"""<td class="accuracy">{round_dict_values(data[model][scenario]["Accuracy"])}</td>"""
html_table += f"""<td class="units">{data[model][scenario]["Performance_Units"]}</td> <td class="perf">{data[model][scenario]["Performance_Result"]:.2f}</td>"""
else:
if "MultiStream" in required_scenarios_edge and division == "closed": #must be open
html_table += scenario_missing_td
if "MultiStream" in scenarios_filter and division == "closed": #must be open
if "MultiStream" in required_scenarios_datacenter:
html_table += scenario_missing_td
else:
html_table += f"""<td class="na" colspan="{colspan}"> N/A </td>"""

#html_table += "<td></td> <td></td>"
#html_table += "<td></td> <td></td>"
Expand Down