Ejemplo n.º 1
0
        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));
        }
Ejemplo n.º 2
0
 public static string Json()
 {
     return(Serializer.ToJson(new
     {
         experiments = ViewModelMapper.ProjectExperiments(ExperimentRepository.GetAll().OrderByDescending(e => e.CreatedAt)),
         /*metrics = ViewModelMapper.ProjectMetrics(metrics.Metrics.AllSorted)*/
     }));
 }
Ejemplo n.º 3
0
        //
        // GET: /Experiments/
        public ActionResult Index()
        {
            var experiments = experimentRepository.GetAll();

            return(View(experiments));
        }