public async Task <IActionResult> GetDetail(long id) { var experiment = await experimentRepository .GetAll() .Include(x => x.Template) .Include(x => x.TemplateVersion) .Include(x => x.DataSet) .Include(x => x.DataSetVersion) .Include(x => x.TrainingHistory).ThenInclude(x => x.DataSet) .Include(x => x.ExperimentPreprocess).ThenInclude(x => x.TrainingHistory).ThenInclude(x => x.DataSet) .SingleOrDefaultAsync(x => x.Id == id); if (experiment == null) { return(JsonNotFound($"Experiment ID {id} is not found.")); } var preprocessStatus = await UpdateStatus(experiment.ExperimentPreprocess?.TrainingHistory); var trainingStatus = await UpdateStatus(experiment.TrainingHistory); var status = GetExperimentStatus(preprocessStatus, trainingStatus); var model = new DetailsOutputModel(experiment, status.ToString()); return(JsonOK(model)); }
public static string Json() { return(Serializer.ToJson(new { experiments = ViewModelMapper.ProjectExperiments(ExperimentRepository.GetAll().OrderByDescending(e => e.CreatedAt)), /*metrics = ViewModelMapper.ProjectMetrics(metrics.Metrics.AllSorted)*/ })); }
// // GET: /Experiments/ public ActionResult Index() { var experiments = experimentRepository.GetAll(); return(View(experiments)); }