Package dev.dokimos.server.service
Class ExperimentService
java.lang.Object
dev.dokimos.server.service.ExperimentService
-
Constructor Summary
ConstructorsConstructorDescriptionExperimentService(ExperimentRepository experimentRepository, ExperimentRunRepository runRepository) -
Method Summary
Modifier and TypeMethodDescriptionvoiddeleteExperiment(UUID experimentId, TenantScope scope) Deletes an experiment visible under the scope; FKs cascade to its runs, items, and evals.getExperiment(UUID experimentId, TenantScope scope) getOrCreateExperiment(Project project, String name, TenantScope scope) Resolves an experiment of the project by name within the scope, creating it stamped with the scope's tenant when absent.getTrends(UUID experimentId, int limit, TenantScope scope) listExperiments(Project project, TenantScope scope)
-
Constructor Details
-
ExperimentService
public ExperimentService(ExperimentRepository experimentRepository, ExperimentRunRepository runRepository)
-
-
Method Details
-
getOrCreateExperiment
@Transactional public Experiment getOrCreateExperiment(@NonNull Project project, @NonNull String name, TenantScope scope) Resolves an experiment of the project by name within the scope, creating it stamped with the scope's tenant when absent. The parent project was already loaded scoped, so this never reaches a foreign tenant.- Parameters:
project- the owning projectname- the experiment namescope- the tenant scope of the caller- Returns:
- the existing or newly created experiment
-
listExperiments
@Transactional(readOnly=true) @NonNull public List<ExperimentSummary> listExperiments(Project project, TenantScope scope) -
getExperiment
-
deleteExperiment
Deletes an experiment visible under the scope; FKs cascade to its runs, items, and evals. -
getTrends
@Transactional(readOnly=true) public TrendData getTrends(UUID experimentId, int limit, TenantScope scope)
-