move model retrain to runners closes #94

This commit is contained in:
2024-04-16 17:48:52 +01:00
parent f182b205f8
commit 06642dcb1e
9 changed files with 165 additions and 96 deletions

View File

@@ -33,23 +33,35 @@
$effect(() => {
if (data && ctx) {
if (chart) {
console.log('update');
chart.data = {
labels: data.map((a) => a.name),
datasets: [
{
label: 'Training',
data: data.map((a) => a.training)
},
{
label: 'Testing',
data: data.map((a) => a.testing)
chart.destroy();
chart = new Chart(ctx, {
type: 'bar',
data: {
labels: data.map((a) => a.name),
datasets: [
{
label: 'Training',
data: data.map((a) => a.training)
},
{
label: 'Testing',
data: data.map((a) => a.testing)
}
]
},
options: {
animation: false,
scales: {
x: {
stacked: true
},
y: {
stacked: true
}
}
]
};
chart.update('resize');
}
});
} else {
console.log('create');
chart = new Chart(ctx, {
type: 'bar',
data: {

View File

@@ -85,6 +85,8 @@
Image Run
{:else if task.type == 2}
Model training
{:else if task.type == 3}
Model Re-training
{:else}
{task.type}
{/if}
@@ -98,7 +100,7 @@
width="30px"
style="object-fit: contain;"
/>
{:else if [2].includes(task.type)}{:else}
{:else if [2, 3].includes(task.type)}{:else}
TODO Show more information {task.status}
{/if}
</td>
@@ -117,7 +119,7 @@
{:else}
-
{/if}
{:else if [2].includes(task.type)}{:else}
{:else if [2, 3].includes(task.type)}{:else}
TODO Handle {task.type}
{/if}
</td>