diff --git a/benchmark/scripts/app/main.py b/benchmark/scripts/app/main.py index 3c71260..5032cc1 100755 --- a/benchmark/scripts/app/main.py +++ b/benchmark/scripts/app/main.py @@ -183,4 +183,9 @@ def best_results(file, compare): data = json.load(f) except Exception as e: return render_template("error.html", message=str(e), compare=compare) - return render_template("report_best.html", data=data, compare=compare) + return render_template( + "report_best.html", + data=data, + compare=compare, + framework=current_app.config[FRAMEWORK], + ) diff --git a/benchmark/scripts/app/templates/partials/cfg_select_bootstrap.jinja b/benchmark/scripts/app/templates/partials/cfg_select_bootstrap.jinja index f530810..a4ceef5 100644 --- a/benchmark/scripts/app/templates/partials/cfg_select_bootstrap.jinja +++ b/benchmark/scripts/app/templates/partials/cfg_select_bootstrap.jinja @@ -1,5 +1,8 @@ -{%- macro header(title) -%} +{%- macro header(title, close=False, url="") -%}
+{%- if close -%} + +{%- endif -%}

{{ title }}

{%- endmacro -%} @@ -44,4 +47,10 @@ float-left {%- endmacro -%} {%- macro get_right_position() -%} float-right +{%- endmacro -%} +{%- macro get_row_head_class() -%} +bg-primary text-white +{%- endmacro -%} +{%- macro get_align_center() -%} +text-center {%- endmacro -%} \ No newline at end of file diff --git a/benchmark/scripts/app/templates/partials/cfg_select_bulma.jinja b/benchmark/scripts/app/templates/partials/cfg_select_bulma.jinja index 862074a..9c75baf 100644 --- a/benchmark/scripts/app/templates/partials/cfg_select_bulma.jinja +++ b/benchmark/scripts/app/templates/partials/cfg_select_bulma.jinja @@ -1,6 +1,9 @@ -{%- macro header(title) -%} +{%- macro header(title, close=False, url="") -%}
+ {%- if close -%} + + {%- endif -%}

{{ title }}

@@ -38,9 +41,18 @@ level {%- macro get_align_right() -%} has-text-right {%- endmacro -%} +{%- macro get_align_center() -%} +has-text-center +{%- endmacro -%} {%- macro get_left_position() -%} float-left {%- endmacro -%} {%- macro get_right_position() -%} float-right +{%- endmacro -%} +{%- macro get_row_head_class() -%} +is-selected +{%- endmacro -%} +{%- macro get_align_center() -%} +has-text-center {%- endmacro -%} \ No newline at end of file diff --git a/benchmark/scripts/app/templates/partials/table_select.html b/benchmark/scripts/app/templates/partials/table_select.html index f74e4b4..9c74d04 100644 --- a/benchmark/scripts/app/templates/partials/table_select.html +++ b/benchmark/scripts/app/templates/partials/table_select.html @@ -26,7 +26,7 @@ {{ "%s" % data["title"] }} {{ "%.6f" % data["score"] }} - {{ select.get_button_tag("eye", "showFile('" ~ file ~ "')") | safe }} + {{ select.get_button_tag("table-eye", "showFile('" ~ file ~ "')") | safe }} {% set file_best = "best_results_" ~ parts[1] ~ "_" ~ parts[2] ~ ".json" %} {{ select.get_button_tag("star-circle-outline", "redirectDouble('best_results', '" ~ file_best ~ "')", visible=False, name="best_buttons") | safe }} - - - Dataset - Score - Hyperparameters - File - - - - {% for dataset, info in data.items() %} - - {{ dataset }} - {{ '%9.7f' % info[0] }} - {{ info[1] }} - - {% set url = url_for(request.endpoint, **request.view_args)|urlencode %} - {{ info[2] }} - - - {% endfor %} - - +{% set title = "Best Results" %} +{% extends "base_" ~ framework ~ ".html" %} +{% import "partials/cfg_select_" ~ framework ~ ".jinja" as select %} +{% block content %} + {{ select.header(title, True, url_for("main.index", compare=compare)) }} + + + + + + + + + + + + {% for dataset, info in data.items() %} + + + + + + + {% endfor %} + +
DatasetScoreHyperparametersFile
{{ dataset }}{{ '%9.7f' % info[0] }}{{ info[1] }} + {% set url = url_for(request.endpoint, **request.view_args)|urlencode %} + {{ info[2] }} +
+
+{% endblock %} +{% block jscript %} + +{% endblock %} +