From 83cfc3e5f54be43138b7614ce299c6a9640d8a8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ricardo=20Montan=CC=83ana?= Date: Sun, 28 May 2023 03:20:15 +0200 Subject: [PATCH] Enhance report templates --- benchmark/scripts/templates/error.html | 33 ++-- .../partials/table_report_bootstrap.html | 83 +++++++++ .../partials/table_report_bulma.html | 89 +++++++++ benchmark/scripts/templates/report.html | 174 +----------------- 4 files changed, 189 insertions(+), 190 deletions(-) create mode 100644 benchmark/scripts/templates/partials/table_report_bootstrap.html create mode 100644 benchmark/scripts/templates/partials/table_report_bulma.html diff --git a/benchmark/scripts/templates/error.html b/benchmark/scripts/templates/error.html index 4156b77..a809305 100644 --- a/benchmark/scripts/templates/error.html +++ b/benchmark/scripts/templates/error.html @@ -1,23 +1,20 @@ + + Error + + + +
+ - - + \ No newline at end of file diff --git a/benchmark/scripts/templates/partials/table_report_bootstrap.html b/benchmark/scripts/templates/partials/table_report_bootstrap.html new file mode 100644 index 0000000..20f56da --- /dev/null +++ b/benchmark/scripts/templates/partials/table_report_bootstrap.html @@ -0,0 +1,83 @@ +
+
+
+
+ +

{{ data.title }}

+
+
+ + + + + + + + {% if data.duration > 7200 %} + {% set unit = "h" %} + {% set divider = 3600 %} + {% else %} + {% set unit = "min" %} + {% set divider = 60 %} + {% endif %} + + + + + + + + + + + + + + + + + + + + + + +
PlatformModelDateTimeDuration ({{ unit }})StratifiedDiscretized# Folds
{{ data.platform }}{{ data.model }} {{ data.version }}{{ data.date}}{{ data.time}}{{ "%.2f" % (data.duration/divider) }}{{ data.stratified }}{{ data.discretized }}{{ data.folds }}
Language{{ data.language }} {{ data.language_version }}Seeds{{ data.seeds }}
+ + + + + + + + + + + + + + + {% include "partials/table_report.html" %} + +
DatasetSamplesFeaturesClassesNodes{{data.score_name|capitalize}}Timehyperparameters
+ {% if summary|length > 0 %} +
+ + + + + + + + + {% include "partials/table_summary.html" %} +
SymbolMeaningCount
+
+ {% endif %} + + + Total score: {{ "%.6f" % (data.results | sum(attribute="score")) }} + +
+
+
\ No newline at end of file diff --git a/benchmark/scripts/templates/partials/table_report_bulma.html b/benchmark/scripts/templates/partials/table_report_bulma.html new file mode 100644 index 0000000..ea5d400 --- /dev/null +++ b/benchmark/scripts/templates/partials/table_report_bulma.html @@ -0,0 +1,89 @@ +
+
+
+
+
+ +

{{ data.title }}

+
+
+
+
+
+
+
+ + + + + + + + {% if data.duration > 7200 %} + {% set unit = "h" %} + {% set divider = 3600 %} + {% else %} + {% set unit = "min" %} + {% set divider = 60 %} + {% endif %} + + + + + + + + + + + + + + + + + + + + + + +
PlatformModelDateTimeDuration ({{ unit }})StratifiedDiscretized# Folds
{{ data.platform }}{{ data.model }} {{ data.version }}{{ data.date}}{{ data.time}}{{ "%.2f" % (data.duration/divider) }}{{ data.stratified }}{{ data.discretized }}{{ data.folds }}
Language{{ data.language }} {{ data.language_version }}Seeds{{ data.seeds }}
+ + + + + + + + + + + + + + + {% include "partials/table_report.html" %} + +
DatasetSamplesFeaturesClassesNodes{{data.score_name|capitalize}}Timehyperparameters
+ {% if summary|length > 0 %} +
+ + + + + + + + + {% include "partials/table_summary.html" %} +
SymbolMeaningCount
+
+ {% endif %} +

+ + Total score: {{ "%.6f" % (data.results | sum(attribute="score")) }} +

+
+
+
\ No newline at end of file diff --git a/benchmark/scripts/templates/report.html b/benchmark/scripts/templates/report.html index 82e7f5c..ce91983 100644 --- a/benchmark/scripts/templates/report.html +++ b/benchmark/scripts/templates/report.html @@ -8,180 +8,10 @@ {% if used_framework == "bootstrap" %} {% set center = "text-center" %} {% set right = "text-end" %} -
-
-
-
- -

{{ data.title }}

-
-
- - - - - - - - {% if data.duration > 7200 %} - {% set unit = "h" %} - {% set divider = 3600 %} - {% else %} - {% set unit = "min" %} - {% set divider = 60 %} - {% endif %} - - - - - - - - - - - - - - - - - - - - - - -
PlatformModelDateTimeDuration ({{ unit }})StratifiedDiscretized# Folds
{{ data.platform }}{{ data.model }} {{ data.version }}{{ data.date}}{{ data.time}}{{ "%.2f" % (data.duration/divider) }}{{ data.stratified }}{{ data.discretized }}{{ data.folds }}
Language{{ data.language }} {{ data.language_version }}Seeds{{ data.seeds }}
- - - - - - - - - - - - - - - {% include "partials/table_report.html" %} - -
DatasetSamplesFeaturesClassesNodes{{data.score_name|capitalize}}Timehyperparameters
- {% if summary|length > 0 %} -
- - - - - - - - - {% include "partials/table_summary.html" %} -
SymbolMeaningCount
-
- {% endif %} - - - Total score: {{ "%.6f" % (data.results | sum(attribute="score")) }} - -
-
-
+ {% include "partials/table_report_bootstrap.html" %} {% else %} {% set center = "has-text-centered" %} {% set right = "has-text-right" %} -
-
-
-
-
- -

{{ data.title }}

-
-
-
-
-
-
-
- - - - - - - - {% if data.duration > 7200 %} - {% set unit = "h" %} - {% set divider = 3600 %} - {% else %} - {% set unit = "min" %} - {% set divider = 60 %} - {% endif %} - - - - - - - - - - - - - - - - - - - - - - -
PlatformModelDateTimeDuration ({{ unit }})StratifiedDiscretized# Folds
{{ data.platform }}{{ data.model }} {{ data.version }}{{ data.date}}{{ data.time}}{{ "%.2f" % (data.duration/divider) }}{{ data.stratified }}{{ data.discretized }}{{ data.folds }}
Language{{ data.language }} {{ data.language_version }}Seeds{{ data.seeds }}
- - - - - - - - - - - - - - - {% include "partials/table_report.html" %} - -
DatasetSamplesFeaturesClassesNodes{{data.score_name|capitalize}}Timehyperparameters
- {% if summary|length > 0 %} -
- - - - - - - - - {% include "partials/table_summary.html" %} -
SymbolMeaningCount
-
- {% endif %} -

- - Total score: {{ "%.6f" % (data.results | sum(attribute="score")) }} -

-
-
-
+ {% include "partials/table_report_bulma.html" %} {% endif %} {% endblock %}