Track some events
linter / quality (push) Has been cancelled
tests / ci (8.3) (push) Successful in 3m57s

This commit is contained in:
2026-09-19 10:43:05 +02:00
parent ae676343a5
commit 6d8e3438f0
2 changed files with 27 additions and 16 deletions
+16 -7
View File
@@ -1,5 +1,6 @@
<script setup lang="ts">
import { useForm } from '@inertiajs/vue3';
import { trackUmamiEvent } from '@jaseeey/vue-umami-plugin';
import { ref, watch } from 'vue';
import {
Form,
@@ -148,6 +149,17 @@ watch(selectedDatasetCopy, (newvalue) => {
const trainingId = ref<string>('');
function startTraining() {
trackUmamiEvent('perceptron-training-start', {
type: props.type,
dataset: selectedDatasetCopy.value,
weight_init_method: selectedMethod.value,
hidden_layers: hiddenLayers.value,
hidden_layers_neurons: hiddenLayersNeurons.value,
min_error: minError.value,
learning_rate: learningRate.value,
max_iterations: maxIterations.value,
});
if (!selectedDatasetCopy.value) {
form.setError(
'dataset',
@@ -173,13 +185,6 @@ function startTraining() {
max_iterations: maxIterations.value,
});
console.debug('[max_iterations] submitting', {
displayed: maxIterationsInput.value?.inputElement?.value,
refValue: maxIterations.value,
formValue: form.max_iterations,
limit: props.maxIterationsLimit,
});
form.post('/perceptron/run', {
preserveScroll: true,
});
@@ -188,6 +193,10 @@ function startTraining() {
const emit = defineEmits(['update:selectedDataset', 'update:trainingId']);
async function cancelTraining() {
trackUmamiEvent('perceptron-training-cancel', {
training_id: trainingId.value,
});
form.cancel();
await fetch(cancel().url, {