From f0f9a128076f2f0deae8f597dd780527b54819dd Mon Sep 17 00:00:00 2001 From: TAMARA JERINIC Date: Sun, 17 Apr 2022 17:25:22 +0200 Subject: Izmenjen izgled item-predictor i my-predictors, dodata funkcija za brisanje prediktora u predictors.component.ts. --- .../item-predictor/item-predictor.component.html | 35 ++++++++++++++-------- 1 file changed, 22 insertions(+), 13 deletions(-) (limited to 'frontend/src/app/_elements') diff --git a/frontend/src/app/_elements/item-predictor/item-predictor.component.html b/frontend/src/app/_elements/item-predictor/item-predictor.component.html index 7ae26fd3..3199dcc8 100644 --- a/frontend/src/app/_elements/item-predictor/item-predictor.component.html +++ b/frontend/src/app/_elements/item-predictor/item-predictor.component.html @@ -1,26 +1,35 @@
-
- {{predictor.name}} +
+ +
Prediktor
+
-
+
+ Opis

- {{predictor.description}} + {{predictor.description}}

-
- + + Ulazne kolone +
+ +
- +
{{column}}{{column}}
- arrow_downward -

- {{predictor.output}} -

+
+ Izlazna kolona: {{predictor.output}} +
+
+ + +
calendar_today Kreirano{{predictor.dateCreated |date}}
\ No newline at end of file -- cgit v1.2.3 From 57f235fc814473f5be947e2b31e7d57f83fcbdd8 Mon Sep 17 00:00:00 2001 From: Danijel Anđelković Date: Sun, 17 Apr 2022 21:52:27 +0200 Subject: Sredio komponentu za notifikacije, tako da moze da se skroluje ako ima puno notifikacija i da mogu da se obrisu notifikacije. Ako stigne notifikacija treniranja za isti model iz prethodne notifikacije, prethodna se prepisuje. --- frontend/src/app/_data/Notification.ts | 1 - .../notifications/notifications.component.html | 16 ++++++++----- .../notifications/notifications.component.ts | 26 +++++++++++++++++++--- 3 files changed, 33 insertions(+), 10 deletions(-) (limited to 'frontend/src/app/_elements') diff --git a/frontend/src/app/_data/Notification.ts b/frontend/src/app/_data/Notification.ts index c505d399..94a3be1d 100644 --- a/frontend/src/app/_data/Notification.ts +++ b/frontend/src/app/_data/Notification.ts @@ -1,5 +1,4 @@ export default class Notification { - _id: string = ''; constructor( public title: string = 'Treniranje u toku...', public id: string = '042', diff --git a/frontend/src/app/_elements/notifications/notifications.component.html b/frontend/src/app/_elements/notifications/notifications.component.html index ef897cfc..3b2f4eaa 100644 --- a/frontend/src/app/_elements/notifications/notifications.component.html +++ b/frontend/src/app/_elements/notifications/notifications.component.html @@ -11,14 +11,18 @@ -
+
-
-

{{notification.title}}

-
-
-
+
+
+

{{notification.title}}

+
+
+
+
+
+
\ No newline at end of file diff --git a/frontend/src/app/_elements/notifications/notifications.component.ts b/frontend/src/app/_elements/notifications/notifications.component.ts index e199f70a..9b460240 100644 --- a/frontend/src/app/_elements/notifications/notifications.component.ts +++ b/frontend/src/app/_elements/notifications/notifications.component.ts @@ -21,13 +21,33 @@ export class NotificationsComponent implements OnInit { this.notifications.push(new Notification(`Obrađen izvor podataka: ${dName}`, dId, 1.0, false)); }); - this.signalRService.hubConnection.on("NotifyEpoch", (epoch: string, mName: string, mId: string, numEpochs) => { - //todo epoch - this.notifications.push(new Notification(`Treniranje modela: ${mName}`, mId, 0.5)); + this.signalRService.hubConnection.on("NotifyEpoch", (mName: string, mId: string, stat: string, totalEpochs: number, currentEpoch: number) => { + const existingNotification = this.notifications.find(x => x.id === mId) + const progress = ((currentEpoch + 1) / totalEpochs); + console.log("Ukupno epoha", totalEpochs, "Trenutna epoha:", currentEpoch); + if (!existingNotification) + this.notifications.push(new Notification(`Treniranje modela: ${mName}`, mId, progress, true)); + else { + existingNotification.progress = progress; + } + }); + + this.signalRService.hubConnection.on("NotifyModel", (mName: string, mId: string, stat: string, totalEpochs: number, currentEpoch: number) => { + const existingNotification = this.notifications.find(x => x.id === mId) + const progress = ((currentEpoch + 1) / totalEpochs); + if (!existingNotification) + this.notifications.push(new Notification(`Treniranje modela: ${mName}`, mId, progress, true)); + else { + existingNotification.progress = progress; + } }); } else { console.warn("Notifications: No connection!"); } } + removeNotification(notification: Notification) { + this.notifications.splice(this.notifications.indexOf(notification), 1); + } + } -- cgit v1.2.3 From 4df9512443b2a12c955379860bf759d7d7c9d388 Mon Sep 17 00:00:00 2001 From: TAMARA JERINIC Date: Sun, 17 Apr 2022 23:41:44 +0200 Subject: Uklonjen datum iz treniraj model, broj uzoraka po iteraciji je predstavljen stepenom dvojke, dodat je broj epoha, promenjen naziv funkcije gubitka, dodata ruta. --- .../_elements/model-load/model-load.component.html | 48 ++++++++++++++++------ .../_elements/model-load/model-load.component.ts | 5 +++ frontend/src/app/app-routing.module.ts | 2 + 3 files changed, 42 insertions(+), 13 deletions(-) (limited to 'frontend/src/app/_elements') diff --git a/frontend/src/app/_elements/model-load/model-load.component.html b/frontend/src/app/_elements/model-load/model-load.component.html index f40ea476..85caca0d 100644 --- a/frontend/src/app/_elements/model-load/model-load.component.html +++ b/frontend/src/app/_elements/model-load/model-load.component.html @@ -43,11 +43,7 @@
-
-    - -
+

Parametri treniranja modela:

@@ -58,7 +54,7 @@
- +
- + + + {{newModel.batchSize}} + +
+ +
+
+
+ +
+
+ +
@@ -147,8 +169,8 @@
#{{i+1}}
-
-   -