From 2477f1796ba88ab1ae7d8aa869a55a8b37d1d8bb Mon Sep 17 00:00:00 2001 From: Danijel Anđelković Date: Thu, 12 May 2022 12:49:06 +0200 Subject: Promeni hovere tako da ne menjaju glavni prikaz komponenti (folder, column-table). Pomerio dugme za pozadinu u centar tako da se ne preklapa sa notifikacijama. --- backend/api/api/appsettings.json | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'backend') diff --git a/backend/api/api/appsettings.json b/backend/api/api/appsettings.json index 56d1861c..ec8f7dd8 100644 --- a/backend/api/api/appsettings.json +++ b/backend/api/api/appsettings.json @@ -24,14 +24,14 @@ "PredictorCollectionName": "Predictor", "FilesCollectionName": "Files", "ExperimentCollectionName": "Experiment" - /* - "ConnectionString": "mongodb+srv://si_user:si_user@sidatabase.twtfm.mongodb.net/myFirstDatabase?retryWrites=true&w=majority", - "DatabaseName": "si_db", - "CollectionName": "users", - "DatasetCollectionName": "Dataset", - "ModelCollectionName": "Model", - "PredictorCollectionName": "Predictor", - "FilesCollectionName": "Files", - "ExperimentCollectionName": "Experiment" */ + + /*"ConnectionString": "mongodb+srv://si_user:si_user@sidatabase.twtfm.mongodb.net/myFirstDatabase?retryWrites=true&w=majority", + "DatabaseName": "si_db", + "CollectionName": "users", + "DatasetCollectionName": "Dataset", + "ModelCollectionName": "Model", + "PredictorCollectionName": "Predictor", + "FilesCollectionName": "Files", + "ExperimentCollectionName": "Experiment" */ } } \ No newline at end of file -- cgit v1.2.3 From e05bb6783e0bc0ce28a80c3e306215a1096c37d1 Mon Sep 17 00:00:00 2001 From: Ivan Ljubisavljevic Date: Sat, 14 May 2022 21:42:32 +0200 Subject: Izmenjen Model --- backend/api/api/Controllers/ModelController.cs | 8 ++++---- backend/api/api/Models/Model.cs | 1 + backend/api/api/Services/FillAnEmptyDb.cs | 3 +++ 3 files changed, 8 insertions(+), 4 deletions(-) (limited to 'backend') diff --git a/backend/api/api/Controllers/ModelController.cs b/backend/api/api/Controllers/ModelController.cs index 3145a080..c9e36ca4 100644 --- a/backend/api/api/Controllers/ModelController.cs +++ b/backend/api/api/Controllers/ModelController.cs @@ -195,8 +195,8 @@ namespace api.Controllers var existingModel = _modelService.GetOneModel(model.uploaderId, model.name); - if (existingModel != null && !overwrite) - return NotFound($"Model with name = {model.name} exisits"); + if (existingModel != null && !overwrite && model.validationSize < 1 && model.validationSize > 0) + return NotFound($"Model with name = {model.name} exisits or validation size is not between 0-1"); else { //_modelService.Create(model); @@ -225,8 +225,8 @@ namespace api.Controllers var existingModel = _modelService.GetOneModel(userId, name); - if (existingModel == null) - return NotFound($"Model with name = {name} or user with ID = {userId} not found"); + if (existingModel == null && model.validationSize < 1 && model.validationSize > 0) + return NotFound($"Model with name = {name} or validation size is not between 0-1"); _modelService.Update(userId, name, model); return NoContent(); diff --git a/backend/api/api/Models/Model.cs b/backend/api/api/Models/Model.cs index a2740ca9..f09940d0 100644 --- a/backend/api/api/Models/Model.cs +++ b/backend/api/api/Models/Model.cs @@ -43,6 +43,7 @@ namespace api.Models public float randomTestSetDistribution { get; set; } public bool isPublic { get; set; } public bool accessibleByLink { get; set; } + public float validationSize { get; set; }//0-1 ne ukljucuje 0.1-0.9 ogranici } public class Layer diff --git a/backend/api/api/Services/FillAnEmptyDb.cs b/backend/api/api/Services/FillAnEmptyDb.cs index 69f534d8..32ce5c2e 100644 --- a/backend/api/api/Services/FillAnEmptyDb.cs +++ b/backend/api/api/Services/FillAnEmptyDb.cs @@ -106,6 +106,7 @@ namespace api.Services model.epochs = 5; model.isPublic = true; model.accessibleByLink = true; + model.validationSize = 0.1f;//proveri _modelService.Create(model); @@ -220,6 +221,7 @@ namespace api.Services model.epochs = 5; model.isPublic = true; model.accessibleByLink = true; + model.validationSize = 0.1f;//proveri _modelService.Create(model); @@ -333,6 +335,7 @@ namespace api.Services model.epochs = 1; model.isPublic = true; model.accessibleByLink = true; + model.validationSize = 0.1f;//proveri _modelService.Create(model); -- cgit v1.2.3