mirror of
https://github.com/Doctorado-ML/benchmark.git
synced 2025-08-18 08:55:53 +00:00
container-fluid and error tolerance in compare
This commit is contained in:
@@ -65,7 +65,10 @@ def show():
|
|||||||
selected_file = request.form["selected-file"]
|
selected_file = request.form["selected-file"]
|
||||||
with open(os.path.join(Folders.results, selected_file)) as f:
|
with open(os.path.join(Folders.results, selected_file)) as f:
|
||||||
data = json.load(f)
|
data = json.load(f)
|
||||||
summary = process_data(selected_file, data)
|
try:
|
||||||
|
summary = process_data(selected_file, data)
|
||||||
|
except Exception as e:
|
||||||
|
return render_template("error.html", message=str(e))
|
||||||
return render_template(
|
return render_template(
|
||||||
"report.html",
|
"report.html",
|
||||||
data=data,
|
data=data,
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
<div id="app">
|
<div id="app">
|
||||||
<section class="section">
|
<section class="section">
|
||||||
<div class="container">
|
<div class="container-fluid">
|
||||||
<div class="p-4 bg-primary text-white">
|
<div class="p-4 bg-primary text-white">
|
||||||
<button type="button" class="btn-close" aria-label="Close" onclick="location.href='/index';"></button>
|
<button type="button" class="btn-close" aria-label="Close" onclick="location.href='/index';"></button>
|
||||||
<h1>{{ data.title }}</h1>
|
<h1>{{ data.title }}</h1>
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
<div id="app">
|
<div id="app">
|
||||||
<header>
|
<header>
|
||||||
<div class="container">
|
<div class="container is-fluid">
|
||||||
<div class="hero is-info is-bold">
|
<div class="hero is-info is-bold">
|
||||||
<div class="hero-body">
|
<div class="hero-body">
|
||||||
<button class="delete is-large" onclick="location.href='/index';"></button>
|
<button class="delete is-large" onclick="location.href='/index';"></button>
|
||||||
@@ -10,7 +10,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
<section class="section">
|
<section class="section">
|
||||||
<div class="container">
|
<div class="container is-fluid">
|
||||||
<div>
|
<div>
|
||||||
<table class="table is-fullwidth is-striped is-bordered">
|
<table class="table is-fullwidth is-striped is-bordered">
|
||||||
<thead>
|
<thead>
|
||||||
|
@@ -1,35 +1,39 @@
|
|||||||
<table id="file-table" class="{{ table_class }}">
|
<table id="file-table" class="{{ table_class }}">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Model</th>
|
<th>Model</th>
|
||||||
<th>Metric</th>
|
<th>Metric</th>
|
||||||
<th>Platform</th>
|
<th>Platform</th>
|
||||||
<th>Date</th>
|
<th>Date</th>
|
||||||
<th>Time</th>
|
<th>Time</th>
|
||||||
<th>Stratified</th>
|
<th>Stratified</th>
|
||||||
<th>Title</th>
|
<th>Title</th>
|
||||||
<th>Score</th>
|
<th>Score</th>
|
||||||
<th></th>
|
<th></th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
{% for file, data in files.items() %}
|
{% for file, data in files.items() %} {% set parts = file.split('_') %} {%
|
||||||
{% set parts = file.split('_') %}
|
set stratified = parts[6].split('.')[0] %}
|
||||||
{% set stratified = parts[6].split('.')[0] %}
|
<tr>
|
||||||
<tr>
|
<td>{{ parts[2] }}</td>
|
||||||
<td>{{ parts[2] }}</td>
|
<td>{{ parts[1] }}</td>
|
||||||
<td>{{ parts[1] }}</td>
|
<td>{{ parts[3] }}</td>
|
||||||
<td>{{ parts[3] }}</td>
|
<td>{{ parts[4] }}</td>
|
||||||
<td>{{ parts[4] }}</td>
|
<td>{{ parts[5] }}</td>
|
||||||
<td>{{ parts[5] }}</td>
|
<td>{{ 'True' if stratified =='1' else 'False' }}</td>
|
||||||
<td>{{ 'True' if stratified =='1' else 'False' }}</td>
|
<td>{{ "%s" % data["title"] }}</td>
|
||||||
<td>{{ "%s" % data["title"] }}</td>
|
<td class="{{ align_right }}">{{ "%.6f" % data["score"] }}</td>
|
||||||
<td>{{ "%.6f" % data["score"] }}</td>
|
<td>
|
||||||
<td>
|
{{ button_pre | safe }}{{ file }}{{ button_post | safe }}
|
||||||
{{ button_pre | safe }}{{ file }}{{ button_post | safe }}
|
<input
|
||||||
<input type="checkbox" class="{{ checkbox_class }}" name="selected_files" value="{{ file }}">
|
type="checkbox"
|
||||||
</td>
|
class="{{ checkbox_class }}"
|
||||||
</tr>
|
name="selected_files"
|
||||||
{% endfor %}
|
value="{{ file }}"
|
||||||
</tbody>
|
/>
|
||||||
</table>
|
</td>
|
||||||
|
</tr>
|
||||||
|
{% endfor %}
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
<div class="container">
|
<div class="{{ container }}">
|
||||||
<h1 class="{{ h1_class }}"><b>Benchmark Results</b></h1>
|
<h1 class="{{ h1_class }}"><b>Benchmark Results</b></h1>
|
||||||
<div class="{{ level }}">
|
<div class="{{ level }}">
|
||||||
<div class="{{ frbutton_position }}">
|
<div class="{{ frbutton_position }}">
|
||||||
|
@@ -1,42 +1,41 @@
|
|||||||
{% set title = "Benchmark Results" %}
|
{% set title = "Benchmark Results" %}
|
||||||
{% extends "base.html" %}
|
{% extends "base.html" %}
|
||||||
{% if framework == "bootstrap" %}
|
{% if framework == "bootstrap" %}
|
||||||
{% set button_class = "btn btn-primary bt-sm" %}
|
{% set button_class = "btn btn-primary bt-sm" %}
|
||||||
{% set h1_class = "text-center" %}
|
{% set h1_class = "text-center" %}
|
||||||
{% set table_class = "table table-striped table-hover table-bordered" %}
|
{% set table_class = "table table-striped table-hover table-bordered" %}
|
||||||
{% set button_pre = '<button class="btn btn-primary btn-sm"
|
{% set button_pre = '<button class="btn btn-primary btn-sm"
|
||||||
style="--bs-btn-padding-y: .25rem; --bs-btn-padding-x: .5rem; --bs-btn-font-size: .75rem;"
|
style="--bs-btn-padding-y: .25rem; --bs-btn-padding-x: .5rem; --bs-btn-font-size: .75rem;"
|
||||||
onclick="showFile(\''%}
|
onclick="showFile(\''%}
|
||||||
{% set button_post = '\')">View</button>' %}
|
{% set button_post = '\')">View</button>' %}
|
||||||
{% set selected = "selected" %}
|
{% set selected = "selected" %}
|
||||||
{% set tag_class = "badge bg-primary bg-small" %}
|
{% set tag_class = "badge bg-primary bg-small" %}
|
||||||
{% set frbutton_position = "float-left" %}
|
{% set frbutton_position = "float-left" %}
|
||||||
{% set frtag_position = "float-right" %}
|
{% set frtag_position = "float-right" %}
|
||||||
{% set level = "navbar" %}
|
{% set level = "navbar" %}
|
||||||
"tag is-primary"
|
{% set align_right = "text-end" %}
|
||||||
{% else %}
|
{% set container = "container-fluid" %}
|
||||||
{% set button_class = "button is-primary is-small" %}
|
{% else %}
|
||||||
{% set h1_class = "title is-1 has-text-centered" %}
|
{% set button_class = "button is-primary is-small" %}
|
||||||
{% set table_class = "table is-striped is-hoverable cell-border is-bordered" %}
|
{% set h1_class = "title is-1 has-text-centered" %}
|
||||||
{% set button_pre = '<span class="tag is-link is-normal" type="button" onclick="showFile(\'' %}
|
{% set table_class = "table is-striped is-hoverable cell-border is-bordered" %}
|
||||||
{% set button_post = '\')">View</span>' %}
|
{% set button_pre = '<span class="tag is-link is-normal" type="button" onclick="showFile(\'' %}
|
||||||
{% set selected = "is-selected" %}
|
{% set button_post = '\')">View</span>' %}
|
||||||
{% set tag_class = "tag is-primary is-normal" %}
|
{% set selected = "is-selected" %}
|
||||||
{% set frbutton_position = "level-left" %}
|
{% set align_right = "text-end" %}
|
||||||
{% set frtag_position = "level-right" %}
|
{% set container = "container is-fluid" %}
|
||||||
{% set level = "level" %}
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% block content %}
|
{% block content %}
|
||||||
{% include "partials/table_select_design.html" %}
|
{% include "partials/table_select_design.html" %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block jscript %}
|
{% block jscript %}
|
||||||
<script src="https://cdn.datatables.net/1.10.25/js/jquery.dataTables.min.js"></script>
|
<script src="https://cdn.datatables.net/1.10.25/js/jquery.dataTables.min.js"></script>
|
||||||
{% if framework == "bootstrap" %}
|
{% if framework == "bootstrap" %}
|
||||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/js/bootstrap.min.js" integrity="sha384-cuYeSxntonz0PPNlHhBs68uyIAVpIIOZZ5JqeqvYYIcEL727kskC66kF92t6Xl2V"
|
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/js/bootstrap.min.js" integrity="sha384-cuYeSxntonz0PPNlHhBs68uyIAVpIIOZZ5JqeqvYYIcEL727kskC66kF92t6Xl2V"
|
||||||
crossorigin="anonymous"></script>
|
crossorigin="anonymous"></script>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<script>
|
<script>
|
||||||
{% include "partials/js_select.js" %}
|
{% include "partials/js_select.js" %}
|
||||||
</script>
|
</script>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@@ -13,3 +13,4 @@ xgboost
|
|||||||
graphviz
|
graphviz
|
||||||
Wodt @ git+ssh://git@github.com/doctorado-ml/Wodt.git#egg=Wodt
|
Wodt @ git+ssh://git@github.com/doctorado-ml/Wodt.git#egg=Wodt
|
||||||
unittest-xml-reporting
|
unittest-xml-reporting
|
||||||
|
flask
|
||||||
|
Reference in New Issue
Block a user