Change model_path to model_name in timeline report (#5457)
This commit is contained in:
@@ -13,7 +13,7 @@
|
||||
<h2>Memcheck report</h2>
|
||||
{% for timeline in timelines %}
|
||||
<div class="w3-container">
|
||||
<h4> {{ timeline['device'][0]|e }} {{ timeline['model'][0]|e }} {{ timeline['test_name'][0]|e }} </h4>
|
||||
<h4> {{ timeline['device'][0]|e }} {{ timeline['model_name'][0]|e }} {{ timeline['test_name'][0]|e }} </h4>
|
||||
<div class={{ '"w3-text-green"' if timeline['status'] else '"w3-text-red"' }}>
|
||||
{{ "PASS" if timeline['status'] else "FAIL" }}
|
||||
</div>
|
||||
|
||||
@@ -80,8 +80,8 @@ def info_from_test_config(test_conf):
|
||||
test_conf_root = test_conf_obj.getroot()
|
||||
records = {}
|
||||
for model_rec in test_conf_root.find("models"):
|
||||
model = model_rec.attrib["path"]
|
||||
records[Path(model)] = {
|
||||
model_name = model_rec.attrib["name"]
|
||||
records[model_name] = {
|
||||
"framework": model_rec.attrib.get("framework"),
|
||||
"source": model_rec.attrib.get("source"),
|
||||
}
|
||||
@@ -235,7 +235,7 @@ def create_memcheck_report(records, db_url, db_collection, output_path):
|
||||
""" Create memcheck timeline HTML report for records.
|
||||
"""
|
||||
records.sort(
|
||||
key=lambda item: f"{item['status']}{item['device']}{item['model']}{item['test_name']}")
|
||||
key=lambda item: f"{item['status']}{item['device']}{item['model_name']}{item['test_name']}")
|
||||
timelines = query_timeline(records, db_url, db_collection)
|
||||
import jinja2 # pylint: disable=import-outside-toplevel
|
||||
env = jinja2.Environment(
|
||||
|
||||
@@ -177,7 +177,7 @@ def main():
|
||||
if test_conf:
|
||||
info = info_from_test_config(test_conf)
|
||||
for record in records:
|
||||
record.update(info.get(Path(record["model"]), {}))
|
||||
record.update(info.get(record["model_name"], {}))
|
||||
|
||||
# upload
|
||||
if args.upload:
|
||||
|
||||
Reference in New Issue
Block a user