move model retrain to runners closes #94
This commit is contained in:
@@ -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: {
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user