Class ApiController
java.lang.Object
com.knezevic.edaf.v3.web.controller.ApiController
REST API for polling dashboard updates.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordAPI payload for one bulk delete item.static final recordAPI payload for bulk delete request.static final recordAPI payload for bulk delete summary.static final recordAPI payload for one hard-delete experiment operation.static final recordAPI payload for cooperative stop requests.static final recordAPI payload for stop request result. -
Constructor Summary
ConstructorsConstructorDescriptionApiController(RunRepository runRepository, CocoRepository cocoRepository, RunArtifactService runArtifactService, GrammarTreeViewService grammarTreeViewService, DashboardStatsService dashboardStatsService) -
Method Summary
Modifier and TypeMethodDescriptioncompareProblemAlgorithms(String problemType, String direction, Double target, List<String> algorithms) org.springframework.http.ResponseEntity<String> compareProblemAlgorithmsLatex(String problemType, String direction, Double target, List<String> algorithms) deleteExperiment(String experimentId) experimentAnalytics(String experimentId, String direction, Double target) org.springframework.http.ResponseEntity<String> experimentLatex(String experimentId, String direction, Double target) facets()getCocoCampaign(String campaignId) getExperiment(String experimentId) getRunTree(String runId) listCheckpoints(String runId) listCocoAggregates(String campaignId) listCocoCampaigns(String q, String status, String suite, int page, int size, String sortBy, String sortDir) listCocoOptimizers(String campaignId) listCocoTrials(String campaignId, String optimizer, Integer functionId, Integer dimension, Boolean reachedTarget, int page, int size) listEvents(String runId, String eventType, String q, int page, int size) listExperimentRuns(String experimentId, int page, int size, String sortBy, String sortDir) listExperiments(String q, String algorithm, String model, String problem, String status, String from, String to, int page, int size, String sortBy, String sortDir) listIterations(String runId) listParams(String runId) listRuns(String q, String algorithm, String model, String problem, String status, String from, String to, Double minBest, Double maxBest, int page, int size, String sortBy, String sortDir) stopExperiment(String experimentId, ApiController.StopRequestBody body) stopRun(String runId, ApiController.StopRequestBody body)
-
Constructor Details
-
ApiController
public ApiController(RunRepository runRepository, CocoRepository cocoRepository, RunArtifactService runArtifactService, GrammarTreeViewService grammarTreeViewService, DashboardStatsService dashboardStatsService)
-
-
Method Details
-
dashboardSummary
-
listExperiments
@GetMapping("/experiments") public PageResult<ExperimentListItem> listExperiments(@RequestParam(required=false) String q, @RequestParam(required=false) String algorithm, @RequestParam(required=false) String model, @RequestParam(required=false) String problem, @RequestParam(required=false) String status, @RequestParam(required=false) String from, @RequestParam(required=false) String to, @RequestParam(defaultValue="0") int page, @RequestParam(defaultValue="25") int size, @RequestParam(defaultValue="latest_run_time") String sortBy, @RequestParam(defaultValue="desc") String sortDir) -
listRuns
@GetMapping("/runs") public PageResult<RunListItem> listRuns(@RequestParam(required=false) String q, @RequestParam(required=false) String algorithm, @RequestParam(required=false) String model, @RequestParam(required=false) String problem, @RequestParam(required=false) String status, @RequestParam(required=false) String from, @RequestParam(required=false) String to, @RequestParam(required=false) Double minBest, @RequestParam(required=false) Double maxBest, @RequestParam(defaultValue="0") int page, @RequestParam(defaultValue="25") int size, @RequestParam(defaultValue="start_time") String sortBy, @RequestParam(defaultValue="desc") String sortDir) -
getRun
-
getRunTree
@GetMapping("/runs/{runId}/tree") public GrammarTreeViewService.GrammarTreeView getRunTree(@PathVariable String runId) -
listIterations
@GetMapping("/runs/{runId}/iterations") public List<IterationMetric> listIterations(@PathVariable String runId) -
listEvents
@GetMapping("/runs/{runId}/events") public PageResult<EventRow> listEvents(@PathVariable String runId, @RequestParam(required=false) String eventType, @RequestParam(required=false) String q, @RequestParam(defaultValue="0") int page, @RequestParam(defaultValue="25") int size) -
listCheckpoints
@GetMapping("/runs/{runId}/checkpoints") public List<CheckpointRow> listCheckpoints(@PathVariable String runId) -
listParams
@GetMapping("/runs/{runId}/params") public List<ExperimentParamRow> listParams(@PathVariable String runId) -
facets
-
getExperiment
@GetMapping("/experiments/{experimentId}") public ExperimentDetail getExperiment(@PathVariable String experimentId) -
deleteExperiment
@DeleteMapping("/experiments/{experimentId}") public ApiController.DeleteExperimentResponse deleteExperiment(@PathVariable String experimentId) -
deleteExperimentsBulk
@PostMapping("/experiments/delete-bulk") public ApiController.BulkDeleteResponse deleteExperimentsBulk(@RequestBody ApiController.BulkDeleteRequest request) -
stopRun
@PostMapping("/runs/{runId}/stop") public ApiController.StopResponse stopRun(@PathVariable String runId, @RequestBody(required=false) ApiController.StopRequestBody body) -
stopExperiment
@PostMapping("/experiments/{experimentId}/stop") public ApiController.StopResponse stopExperiment(@PathVariable String experimentId, @RequestBody(required=false) ApiController.StopRequestBody body) -
listExperimentRuns
@GetMapping("/experiments/{experimentId}/runs") public PageResult<ExperimentRunItem> listExperimentRuns(@PathVariable String experimentId, @RequestParam(defaultValue="0") int page, @RequestParam(defaultValue="50") int size, @RequestParam(defaultValue="start_time") String sortBy, @RequestParam(defaultValue="desc") String sortDir) -
experimentAnalytics
@GetMapping("/experiments/{experimentId}/analysis") public ExperimentAnalytics experimentAnalytics(@PathVariable String experimentId, @RequestParam(required=false) String direction, @RequestParam(required=false) Double target) -
experimentLatex
-
compareProblemAlgorithms
@GetMapping("/analysis/problem/{problemType}") public ProblemComparisonReport compareProblemAlgorithms(@PathVariable String problemType, @RequestParam(required=false) String direction, @RequestParam(required=false) Double target, @RequestParam(name="algorithm",required=false) List<String> algorithms) -
compareProblemAlgorithmsLatex
@GetMapping(value="/analysis/problem/{problemType}/latex", produces="text/plain") public org.springframework.http.ResponseEntity<String> compareProblemAlgorithmsLatex(@PathVariable String problemType, @RequestParam(required=false) String direction, @RequestParam(required=false) Double target, @RequestParam(name="algorithm",required=false) List<String> algorithms) -
listCocoCampaigns
@GetMapping("/coco/campaigns") public PageResult<CocoCampaignListItem> listCocoCampaigns(@RequestParam(required=false) String q, @RequestParam(required=false) String status, @RequestParam(required=false) String suite, @RequestParam(defaultValue="0") int page, @RequestParam(defaultValue="25") int size, @RequestParam(defaultValue="created_at") String sortBy, @RequestParam(defaultValue="desc") String sortDir) -
getCocoCampaign
@GetMapping("/coco/campaigns/{campaignId}") public CocoCampaignDetail getCocoCampaign(@PathVariable String campaignId) -
listCocoOptimizers
@GetMapping("/coco/campaigns/{campaignId}/optimizers") public List<CocoOptimizerConfigRow> listCocoOptimizers(@PathVariable String campaignId) -
listCocoAggregates
@GetMapping("/coco/campaigns/{campaignId}/aggregates") public List<CocoAggregateMetric> listCocoAggregates(@PathVariable String campaignId) -
listCocoTrials
@GetMapping("/coco/campaigns/{campaignId}/trials") public PageResult<CocoTrialMetric> listCocoTrials(@PathVariable String campaignId, @RequestParam(required=false) String optimizer, @RequestParam(required=false) Integer functionId, @RequestParam(required=false) Integer dimension, @RequestParam(required=false) Boolean reachedTarget, @RequestParam(defaultValue="0") int page, @RequestParam(defaultValue="25") int size)
-