aboutsummaryrefslogtreecommitdiff
path: root/backend/api
diff options
context:
space:
mode:
Diffstat (limited to 'backend/api')
-rw-r--r--backend/api/api/Controllers/ExperimentController.cs2
-rw-r--r--backend/api/api/Controllers/ModelController.cs14
-rw-r--r--backend/api/api/Models/Experiment.cs1
-rw-r--r--backend/api/api/Models/Model.cs1
4 files changed, 14 insertions, 4 deletions
diff --git a/backend/api/api/Controllers/ExperimentController.cs b/backend/api/api/Controllers/ExperimentController.cs
index 0063c532..c2cde931 100644
--- a/backend/api/api/Controllers/ExperimentController.cs
+++ b/backend/api/api/Controllers/ExperimentController.cs
@@ -75,7 +75,7 @@ namespace api.Controllers
return Ok(experiment);
}
- [HttpPost("getMyExperiments")]
+ [HttpGet("getMyExperiments")]
[Authorize(Roles = "User,Guest")]
public async Task<ActionResult<List<Experiment>>> getMyExperiments()
{
diff --git a/backend/api/api/Controllers/ModelController.cs b/backend/api/api/Controllers/ModelController.cs
index 618b15e8..fc403ccf 100644
--- a/backend/api/api/Controllers/ModelController.cs
+++ b/backend/api/api/Controllers/ModelController.cs
@@ -33,10 +33,13 @@ namespace api.Controllers
_mlConnectionService = mlConnectionService;
}
- [HttpPost("sendModel")]
+ [HttpPost("trainModel")]
[Authorize(Roles = "User,Guest")]
- public async Task<ActionResult<string>> Test([FromBody] string modelId,string experimentId)
+ public async Task<ActionResult<string>> Test([FromBody] TrainModelObject trainModelObject)
{
+ string experimentId = trainModelObject.ExperimentId;
+ string modelId = trainModelObject.ModelId;
+
string uploaderId;
var header = Request.Headers[HeaderNames.Authorization];
if (AuthenticationHeaderValue.TryParse(header, out var headerValue))
@@ -238,4 +241,11 @@ namespace api.Controllers
}
}
+
+ public class TrainModelObject
+ {
+ public string ModelId { get; set; }
+ public string ExperimentId { get; set; }
+
+ }
}
diff --git a/backend/api/api/Models/Experiment.cs b/backend/api/api/Models/Experiment.cs
index d5ce7627..bf029116 100644
--- a/backend/api/api/Models/Experiment.cs
+++ b/backend/api/api/Models/Experiment.cs
@@ -10,6 +10,7 @@ namespace api.Models
public string _id { get; set; }
public string name { get; set; }
public string description { get; set; }
+ public string encoding { get; set; }
public List<string> ModelIds { get; set; }
public string datasetId { get; set; }
public string uploaderId { get; set; }
diff --git a/backend/api/api/Models/Model.cs b/backend/api/api/Models/Model.cs
index f0e4d346..72f989a6 100644
--- a/backend/api/api/Models/Model.cs
+++ b/backend/api/api/Models/Model.cs
@@ -23,7 +23,6 @@ namespace api.Models
//Neural net training
public string type { get; set; }
- public string encoding { get; set; }
public string optimizer { get; set; }
public string lossFunction { get; set; }
//public int inputNeurons { get; set; }