Search in sources :

Example 1 with LazyInitializer

use of org.apache.commons.lang3.concurrent.LazyInitializer in project cyberduck by iterate-ch.

the class RemoteProfilesFinder method find.

@Override
public Set<ProfileDescription> find(final Visitor visitor) throws BackgroundException {
    if (log.isInfoEnabled()) {
        log.info(String.format("Fetch profiles from %s", session.getHost()));
    }
    final ProfileFilter filter = new ProfileFilter();
    final AttributedList<Path> list = session.getFeature(ListService.class).list(new DelegatingHomeFeature(new DefaultPathHomeFeature(session.getHost())).find(), new DisabledListProgressListener());
    return list.filter(filter).toStream().map(file -> visitor.visit(new RemoteProfileDescription(protocols, file, new LazyInitializer<Local>() {

        @Override
        protected Local initialize() throws ConcurrentException {
            try {
                final Read read = session.getFeature(Read.class);
                if (log.isInfoEnabled()) {
                    log.info(String.format("Download profile %s", file));
                }
                final InputStream in = read.read(file.withAttributes(new PathAttributes(file.attributes()).withVersionId(null)), new TransferStatus().withLength(TransferStatus.UNKNOWN_LENGTH), new DisabledConnectionCallback());
                final Local temp = TemporaryFileServiceFactory.get().create(file.getName());
                new DefaultLocalTouchFeature().touch(temp);
                final OutputStream out = temp.getOutputStream(false);
                try {
                    IOUtils.copy(in, out);
                } finally {
                    in.close();
                    out.close();
                }
                return temp;
            } catch (BackgroundException | IOException e) {
                throw new ConcurrentException(e);
            }
        }
    }))).collect(Collectors.toSet());
}
Also used : Path(ch.cyberduck.core.Path) Read(ch.cyberduck.core.features.Read) DelegatingHomeFeature(ch.cyberduck.core.shared.DelegatingHomeFeature) DefaultLocalTouchFeature(ch.cyberduck.core.local.DefaultLocalTouchFeature) TransferStatus(ch.cyberduck.core.transfer.TransferStatus) ListService(ch.cyberduck.core.ListService) TemporaryFileServiceFactory(ch.cyberduck.core.local.TemporaryFileServiceFactory) ProtocolFactory(ch.cyberduck.core.ProtocolFactory) Filter(ch.cyberduck.core.Filter) Local(ch.cyberduck.core.Local) ConcurrentException(org.apache.commons.lang3.concurrent.ConcurrentException) DisabledConnectionCallback(ch.cyberduck.core.DisabledConnectionCallback) PathAttributes(ch.cyberduck.core.PathAttributes) OutputStream(java.io.OutputStream) Session(ch.cyberduck.core.Session) AttributedList(ch.cyberduck.core.AttributedList) Set(java.util.Set) IOException(java.io.IOException) DisabledListProgressListener(ch.cyberduck.core.DisabledListProgressListener) BackgroundException(ch.cyberduck.core.exception.BackgroundException) Collectors(java.util.stream.Collectors) LazyInitializer(org.apache.commons.lang3.concurrent.LazyInitializer) DefaultPathHomeFeature(ch.cyberduck.core.shared.DefaultPathHomeFeature) IOUtils(org.apache.commons.io.IOUtils) Logger(org.apache.logging.log4j.Logger) Path(ch.cyberduck.core.Path) Pattern(java.util.regex.Pattern) LogManager(org.apache.logging.log4j.LogManager) InputStream(java.io.InputStream) LazyInitializer(org.apache.commons.lang3.concurrent.LazyInitializer) DelegatingHomeFeature(ch.cyberduck.core.shared.DelegatingHomeFeature) DisabledListProgressListener(ch.cyberduck.core.DisabledListProgressListener) InputStream(java.io.InputStream) PathAttributes(ch.cyberduck.core.PathAttributes) OutputStream(java.io.OutputStream) Local(ch.cyberduck.core.Local) DefaultPathHomeFeature(ch.cyberduck.core.shared.DefaultPathHomeFeature) IOException(java.io.IOException) ListService(ch.cyberduck.core.ListService) Read(ch.cyberduck.core.features.Read) DefaultLocalTouchFeature(ch.cyberduck.core.local.DefaultLocalTouchFeature) TransferStatus(ch.cyberduck.core.transfer.TransferStatus) DisabledConnectionCallback(ch.cyberduck.core.DisabledConnectionCallback) BackgroundException(ch.cyberduck.core.exception.BackgroundException) ConcurrentException(org.apache.commons.lang3.concurrent.ConcurrentException)

Example 2 with LazyInitializer

use of org.apache.commons.lang3.concurrent.LazyInitializer in project pentaho-platform by pentaho.

the class PentahoWebContextFilter method init.

@Override
public void init(FilterConfig filterConfig) throws ServletException {
    this.configurationAdminProxy = new ConfigurationAdminNonOsgiProxy();
    this.lazyServicesPath = new LazyInitializer<String>() {

        @Override
        protected String initialize() throws ConcurrentException {
            return initializeServicesPath();
        }
    };
    this.setSsoEnabled(filterConfig.getInitParameter(PARAM_SSO_ENABLED));
    fileService = new FileService();
}
Also used : FileService(org.pentaho.platform.web.http.api.resources.services.FileService) ConfigurationAdminNonOsgiProxy(org.pentaho.platform.web.http.ConfigurationAdminNonOsgiProxy) ConcurrentException(org.apache.commons.lang3.concurrent.ConcurrentException)

Example 3 with LazyInitializer

use of org.apache.commons.lang3.concurrent.LazyInitializer in project inception by inception-project.

the class SelectionTask method execute.

@Override
public void execute() {
    try (CasStorageSession session = CasStorageSession.open()) {
        Project project = getProject();
        User user = getUser().orElseThrow();
        String userName = user.getUsername();
        // Read the CASes only when they are accessed the first time. This allows us to skip
        // reading the CASes in case that no layer / recommender is available or if no
        // recommender requires evaluation.
        LazyInitializer<List<CAS>> casses = new LazyInitializer<List<CAS>>() {

            @Override
            protected List<CAS> initialize() {
                return readCasses(project, userName);
            }
        };
        boolean seenRecommender = false;
        for (AnnotationLayer layer : annoService.listAnnotationLayer(getProject())) {
            if (!layer.isEnabled()) {
                continue;
            }
            List<Recommender> recommenders = recommendationService.listRecommenders(layer);
            if (recommenders == null || recommenders.isEmpty()) {
                log.trace("[{}][{}]: No recommenders, skipping selection.", userName, layer.getUiName());
                continue;
            }
            seenRecommender = true;
            List<EvaluatedRecommender> evaluatedRecommenders = new ArrayList<>();
            for (Recommender r : recommenders) {
                // Make sure we have the latest recommender config from the DB - the one from
                // the active recommenders list may be outdated
                Recommender recommender;
                try {
                    recommender = recommendationService.getRecommender(r.getId());
                } catch (NoResultException e) {
                    log.info("[{}][{}]: Recommender no longer available... skipping", user.getUsername(), r.getName());
                    continue;
                }
                if (!recommender.isEnabled()) {
                    log.debug("[{}][{}]: Disabled - skipping", userName, recommender.getName());
                    continue;
                }
                String recommenderName = recommender.getName();
                try {
                    long start = System.currentTimeMillis();
                    RecommendationEngineFactory<?> factory = recommendationService.getRecommenderFactory(recommender).orElse(null);
                    if (factory == null) {
                        log.error("[{}][{}]: No recommender factory available for [{}]", user.getUsername(), r.getName(), r.getTool());
                        appEventPublisher.publishEvent(new SelectionTaskEvent(this, recommender, user.getUsername(), String.format("No recommender factory available for %s", recommender.getTool())));
                        continue;
                    }
                    if (!factory.accepts(recommender.getLayer(), recommender.getFeature())) {
                        log.info("[{}][{}]: Recommender configured with invalid layer or feature " + "- skipping recommender", user.getUsername(), r.getName());
                        logMessages.add(info(this, "Recommender [%s] configured with invalid layer or feature - skipping recommender", recommenderName));
                        evaluatedRecommenders.add(EvaluatedRecommender.makeInactiveWithoutEvaluation(recommender, "Invalid layer or feature"));
                        continue;
                    }
                    RecommendationEngine recommendationEngine = factory.build(recommender);
                    if (recommender.isAlwaysSelected()) {
                        log.debug("[{}][{}]: Activating [{}] without evaluating - always selected", userName, recommenderName, recommenderName);
                        logMessages.add(info(this, "Recommender [%s] activated without evaluating - always selected", recommenderName));
                        evaluatedRecommenders.add(EvaluatedRecommender.makeActiveWithoutEvaluation(recommender));
                        continue;
                    } else if (!factory.isEvaluable()) {
                        log.debug("[{}][{}]: Activating [{}] without evaluating - not evaluable", userName, recommenderName, recommenderName);
                        logMessages.add(info(this, "Recommender [%s] activated without evaluating - not evaluable", recommenderName));
                        evaluatedRecommenders.add(EvaluatedRecommender.makeActiveWithoutEvaluation(recommender));
                        continue;
                    }
                    log.info("[{}][{}]: Evaluating...", userName, recommenderName);
                    DataSplitter splitter = new PercentageBasedSplitter(0.8, 10);
                    EvaluationResult result = recommendationEngine.evaluate(casses.get(), splitter);
                    if (result.isEvaluationSkipped()) {
                        String msg = String.format("Evaluation of recommender [%s] could not be performed: %s", recommenderName, result.getErrorMsg().orElse("unknown reason"));
                        log.info("[{}][{}]: {}", user.getUsername(), recommenderName, msg);
                        logMessages.add(LogMessage.warn(this, "%s", msg));
                        evaluatedRecommenders.add(EvaluatedRecommender.makeInactiveWithoutEvaluation(recommender, msg));
                        continue;
                    }
                    double score = result.computeF1Score();
                    double threshold = recommender.getThreshold();
                    boolean activated;
                    if (score >= threshold) {
                        activated = true;
                        evaluatedRecommenders.add(EvaluatedRecommender.makeActive(recommender, result, format("Score {0,number,#.####} >= threshold {1,number,#.####}", score, threshold)));
                        log.info("[{}][{}]: Activated ({} >= threshold {})", user.getUsername(), recommenderName, score, threshold);
                        logMessages.add(info(this, "Recommender [%s] activated (%f >= threshold %f)", recommenderName, score, threshold));
                    } else {
                        activated = false;
                        log.info("[{}][{}]: Not activated ({} < threshold {})", user.getUsername(), recommenderName, score, threshold);
                        logMessages.add(info(this, "Recommender [%s] not activated (%f < threshold %f)", recommenderName, score, threshold));
                        evaluatedRecommenders.add(EvaluatedRecommender.makeInactive(recommender, result, format("Score {0,number,#.####} < threshold {1,number,#.####}", score, threshold)));
                    }
                    appEventPublisher.publishEvent(new RecommenderEvaluationResultEvent(this, recommender, user.getUsername(), result, System.currentTimeMillis() - start, activated));
                    Optional<String> recError = result.getErrorMsg();
                    SelectionTaskEvent evalEvent = new SelectionTaskEvent(this, recommender, user.getUsername(), result);
                    if (recError.isPresent()) {
                        evalEvent.setErrorMsg(recError.get());
                    }
                    appEventPublisher.publishEvent(evalEvent);
                }// even if a particular recommender fails.
                 catch (Throwable e) {
                    log.error("[{}][{}]: Failed", user.getUsername(), recommenderName, e);
                    appEventPublisher.publishEvent(new SelectionTaskEvent(this, recommender, user.getUsername(), e.getMessage()));
                }
            }
            recommendationService.setEvaluatedRecommenders(user, layer, evaluatedRecommenders);
        }
        if (!seenRecommender) {
            log.trace("[{}]: No recommenders configured, skipping training.", userName);
            return;
        }
        if (!recommendationService.hasActiveRecommenders(user.getUsername(), project)) {
            log.debug("[{}]: No recommenders active, skipping training.", userName);
            return;
        }
        TrainingTask trainingTask = new TrainingTask(user, getProject(), "SelectionTask after activating recommenders", currentDocument);
        trainingTask.inheritLog(logMessages);
        schedulingService.enqueue(trainingTask);
    }
}
Also used : User(de.tudarmstadt.ukp.clarin.webanno.security.model.User) EvaluatedRecommender(de.tudarmstadt.ukp.inception.recommendation.api.model.EvaluatedRecommender) ArrayList(java.util.ArrayList) NoResultException(javax.persistence.NoResultException) AnnotationLayer(de.tudarmstadt.ukp.clarin.webanno.model.AnnotationLayer) RecommenderEvaluationResultEvent(de.tudarmstadt.ukp.inception.recommendation.event.RecommenderEvaluationResultEvent) EvaluatedRecommender(de.tudarmstadt.ukp.inception.recommendation.api.model.EvaluatedRecommender) Recommender(de.tudarmstadt.ukp.inception.recommendation.api.model.Recommender) ArrayList(java.util.ArrayList) List(java.util.List) CasStorageSession(de.tudarmstadt.ukp.clarin.webanno.api.dao.casstorage.CasStorageSession) RecommendationEngine(de.tudarmstadt.ukp.inception.recommendation.api.recommender.RecommendationEngine) DataSplitter(de.tudarmstadt.ukp.inception.recommendation.api.evaluation.DataSplitter) LazyInitializer(org.apache.commons.lang3.concurrent.LazyInitializer) EvaluationResult(de.tudarmstadt.ukp.inception.recommendation.api.evaluation.EvaluationResult) Project(de.tudarmstadt.ukp.clarin.webanno.model.Project) PercentageBasedSplitter(de.tudarmstadt.ukp.inception.recommendation.api.evaluation.PercentageBasedSplitter) CAS(org.apache.uima.cas.CAS) SelectionTaskEvent(de.tudarmstadt.ukp.inception.recommendation.event.SelectionTaskEvent)

Example 4 with LazyInitializer

use of org.apache.commons.lang3.concurrent.LazyInitializer in project inception by inception-project.

the class TrainingTask method execute.

@Override
public void execute() {
    try (CasStorageSession session = CasStorageSession.open()) {
        Project project = getProject();
        User user = getUser().orElseThrow();
        log.debug("[{}][{}]: Starting training for project {} triggered by [{}]...", getId(), user.getUsername(), project, getTrigger());
        logMessages.add(info(this, "Starting training triggered by [%s]...", getTrigger()));
        // Read the CASes only when they are accessed the first time. This allows us to skip
        // reading the CASes in case that no layer / recommender is available or if no
        // recommender requires evaluation.
        LazyInitializer<List<TrainingDocument>> casses = new LazyInitializer<List<TrainingDocument>>() {

            @Override
            protected List<TrainingDocument> initialize() {
                return readCasses(project, user);
            }
        };
        boolean seenSuccessfulTraining = false;
        boolean seenNonTrainingRecommender = false;
        for (AnnotationLayer layer : annoService.listAnnotationLayer(project)) {
            if (!layer.isEnabled()) {
                continue;
            }
            List<EvaluatedRecommender> recommenders = recommendationService.getActiveRecommenders(user, layer);
            if (recommenders.isEmpty()) {
                log.trace("[{}][{}][{}]: No active recommenders, skipping training.", getId(), user.getUsername(), layer.getUiName());
                logMessages.add(info(this, "No active recommenders for layer [%s], skipping training.", layer.getUiName()));
                continue;
            }
            for (EvaluatedRecommender r : recommenders) {
                // Make sure we have the latest recommender config from the DB - the one from
                // the active recommenders list may be outdated
                Recommender recommender;
                try {
                    recommender = recommendationService.getRecommender(r.getRecommender().getId());
                } catch (NoResultException e) {
                    log.debug("[{}][{}][{}]: Recommender no longer available... skipping", getId(), user.getUsername(), r.getRecommender().getName());
                    continue;
                }
                if (!recommender.isEnabled()) {
                    log.debug("[{}][{}][{}]: Disabled - skipping", user.getUsername(), getId(), r.getRecommender().getName());
                    continue;
                }
                long startTime = System.currentTimeMillis();
                try {
                    Optional<RecommendationEngineFactory<?>> maybeFactory = recommendationService.getRecommenderFactory(recommender);
                    if (maybeFactory.isEmpty()) {
                        log.warn("[{}][{}]: No factory found - skipping recommender", user.getUsername(), r.getRecommender().getName());
                        continue;
                    }
                    RecommendationEngineFactory<?> factory = maybeFactory.get();
                    if (!factory.accepts(recommender.getLayer(), recommender.getFeature())) {
                        log.debug("[{}][{}][{}]: Recommender configured with invalid layer or " + "feature - skipping recommender", getId(), user.getUsername(), r.getRecommender().getName());
                        logMessages.add(error(this, "Recommender [%s] configured with invalid layer or feature - skipping recommender.", r.getRecommender().getName()));
                        appEventPublisher.publishEvent(new RecommenderTaskEvent(this, user.getUsername(), "Recommender configured with invalid layer or feature - skipping training recommender.", recommender));
                        continue;
                    }
                    RecommendationEngine recommendationEngine = factory.build(recommender);
                    RecommenderContext ctx = recommendationEngine.newContext(recommendationService.getContext(user, recommender).orElse(RecommenderContext.EMPTY_CONTEXT));
                    ctx.setUser(user);
                    TrainingCapability capability = recommendationEngine.getTrainingCapability();
                    // prediction
                    if (capability == TRAINING_NOT_SUPPORTED) {
                        seenNonTrainingRecommender = true;
                        log.debug("[{}][{}][{}]: Engine does not support training", getId(), user.getUsername(), recommender.getName());
                        ctx.close();
                        recommendationService.putContext(user, recommender, ctx);
                        continue;
                    }
                    List<CAS> cassesForTraining = // 
                    casses.get().stream().filter(e -> !recommender.getStatesIgnoredForTraining().contains(e.state)).filter(e -> containsTargetTypeAndFeature(recommender, e.cas)).map(e -> e.cas).collect(toList());
                    // do not mark as ready
                    if (cassesForTraining.isEmpty() && capability == TRAINING_REQUIRED) {
                        log.debug("[{}][{}][{}]: There are no annotations available to train on", getId(), user.getUsername(), recommender.getName());
                        logMessages.add(warn(this, "There are no [%s] annotations available to train on.", layer.getUiName()));
                        // This can happen if there were already predictions based on existing
                        // annotations, but all annotations have been removed/deleted. To ensure
                        // that the prediction run removes the stale predictions, we need to
                        // call it a success here.
                        seenSuccessfulTraining = true;
                        continue;
                    }
                    log.debug("[{}][{}][{}]: Training model on [{}] out of [{}] documents ...", getId(), user.getUsername(), recommender.getName(), cassesForTraining.size(), casses.get().size());
                    logMessages.add(info(this, "Training model for [%s] on [%d] out of [%d] documents ...", layer.getUiName(), cassesForTraining.size(), casses.get().size()));
                    recommendationEngine.train(ctx, cassesForTraining);
                    logMessages.addAll(ctx.getMessages());
                    long duration = System.currentTimeMillis() - startTime;
                    if (!recommendationEngine.isReadyForPrediction(ctx)) {
                        int docNum = casses.get().size();
                        int trainDocNum = cassesForTraining.size();
                        log.debug("[{}][{}][{}]: Training on [{}] out of [{}] documents not successful ({} ms)", getId(), user.getUsername(), recommender.getName(), trainDocNum, docNum, duration);
                        logMessages.add(info(this, "Training not successful (%d ms).", duration));
                        appEventPublisher.publishEvent(new RecommenderTaskEvent(this, user.getUsername(), format("Training on %d out of %d documents not successful (%d ms)", trainDocNum, docNum, duration), recommender));
                        continue;
                    }
                    log.debug("[{}][{}][{}]: Training successful on [{}] out of [{}] documents ({} ms)", getId(), user.getUsername(), recommender.getName(), cassesForTraining.size(), casses.get().size(), duration);
                    logMessages.add(info(this, "Training successful on [%d] out of [%d] documents (%d ms)", cassesForTraining.size(), casses.get().size(), duration));
                    seenSuccessfulTraining = true;
                    ctx.close();
                    recommendationService.putContext(user, recommender, ctx);
                }// even if a particular recommender fails.
                 catch (Throwable e) {
                    long duration = System.currentTimeMillis() - startTime;
                    log.error("[{}][{}][{}]: Training failed ({} ms)", getId(), user.getUsername(), recommender.getName(), (System.currentTimeMillis() - startTime), e);
                    logMessages.add(error(this, "Training failed (%d ms): %s", duration, getRootCauseMessage(e)));
                    appEventPublisher.publishEvent(new RecommenderTaskEvent(this, user.getUsername(), String.format("Training failed (%d ms) with %s", duration, e.getMessage()), recommender));
                }
            }
        }
        if (!seenSuccessfulTraining && !seenNonTrainingRecommender) {
            log.debug("[{}][{}]: No recommenders trained successfully and no non-training " + "recommenders, skipping prediction.", getId(), user.getUsername());
            return;
        }
        PredictionTask predictionTask = new PredictionTask(user, String.format("TrainingTask %s complete", getId()), currentDocument);
        predictionTask.inheritLog(logMessages);
        schedulingService.enqueue(predictionTask);
    }
}
Also used : LogMessage.error(de.tudarmstadt.ukp.clarin.webanno.support.logging.LogMessage.error) TrainingCapability(de.tudarmstadt.ukp.inception.recommendation.api.recommender.TrainingCapability) LogMessage(de.tudarmstadt.ukp.clarin.webanno.support.logging.LogMessage) RecommendationService(de.tudarmstadt.ukp.inception.recommendation.api.RecommendationService) LoggerFactory(org.slf4j.LoggerFactory) NoResultException(javax.persistence.NoResultException) CAS(org.apache.uima.cas.CAS) Autowired(org.springframework.beans.factory.annotation.Autowired) RecommendationEngine(de.tudarmstadt.ukp.inception.recommendation.api.recommender.RecommendationEngine) Task(de.tudarmstadt.ukp.inception.scheduling.Task) ArrayList(java.util.ArrayList) Type(org.apache.uima.cas.Type) AnnotationSchemaService(de.tudarmstadt.ukp.clarin.webanno.api.AnnotationSchemaService) User(de.tudarmstadt.ukp.clarin.webanno.security.model.User) EvaluatedRecommender(de.tudarmstadt.ukp.inception.recommendation.api.model.EvaluatedRecommender) Map(java.util.Map) SchedulingService(de.tudarmstadt.ukp.inception.scheduling.SchedulingService) ApplicationEventPublisher(org.springframework.context.ApplicationEventPublisher) RecommenderContext(de.tudarmstadt.ukp.inception.recommendation.api.recommender.RecommenderContext) Project(de.tudarmstadt.ukp.clarin.webanno.model.Project) SHARED_READ_ONLY_ACCESS(de.tudarmstadt.ukp.clarin.webanno.api.casstorage.CasAccessMode.SHARED_READ_ONLY_ACCESS) LogMessage.warn(de.tudarmstadt.ukp.clarin.webanno.support.logging.LogMessage.warn) CasStorageSession(de.tudarmstadt.ukp.clarin.webanno.api.dao.casstorage.CasStorageSession) DocumentService(de.tudarmstadt.ukp.clarin.webanno.api.DocumentService) Logger(org.slf4j.Logger) TRAINING_REQUIRED(de.tudarmstadt.ukp.inception.recommendation.api.recommender.TrainingCapability.TRAINING_REQUIRED) ExceptionUtils.getRootCauseMessage(org.apache.commons.lang3.exception.ExceptionUtils.getRootCauseMessage) IOException(java.io.IOException) AnnotationDocument(de.tudarmstadt.ukp.clarin.webanno.model.AnnotationDocument) Recommender(de.tudarmstadt.ukp.inception.recommendation.api.model.Recommender) RecommendationEngineFactory(de.tudarmstadt.ukp.inception.recommendation.api.recommender.RecommendationEngineFactory) AnnotationDocumentState(de.tudarmstadt.ukp.clarin.webanno.model.AnnotationDocumentState) RecommenderTaskEvent(de.tudarmstadt.ukp.inception.recommendation.event.RecommenderTaskEvent) String.format(java.lang.String.format) LazyInitializer(org.apache.commons.lang3.concurrent.LazyInitializer) AUTO_CAS_UPGRADE(de.tudarmstadt.ukp.clarin.webanno.api.CasUpgradeMode.AUTO_CAS_UPGRADE) LogMessage.info(de.tudarmstadt.ukp.clarin.webanno.support.logging.LogMessage.info) CasUtil(org.apache.uima.fit.util.CasUtil) Collectors.toList(java.util.stream.Collectors.toList) List(java.util.List) TRAINING_NOT_SUPPORTED(de.tudarmstadt.ukp.inception.recommendation.api.recommender.TrainingCapability.TRAINING_NOT_SUPPORTED) AnnotationLayer(de.tudarmstadt.ukp.clarin.webanno.model.AnnotationLayer) SourceDocument(de.tudarmstadt.ukp.clarin.webanno.model.SourceDocument) Optional(java.util.Optional) User(de.tudarmstadt.ukp.clarin.webanno.security.model.User) EvaluatedRecommender(de.tudarmstadt.ukp.inception.recommendation.api.model.EvaluatedRecommender) NoResultException(javax.persistence.NoResultException) AnnotationLayer(de.tudarmstadt.ukp.clarin.webanno.model.AnnotationLayer) EvaluatedRecommender(de.tudarmstadt.ukp.inception.recommendation.api.model.EvaluatedRecommender) Recommender(de.tudarmstadt.ukp.inception.recommendation.api.model.Recommender) ArrayList(java.util.ArrayList) Collectors.toList(java.util.stream.Collectors.toList) List(java.util.List) RecommenderTaskEvent(de.tudarmstadt.ukp.inception.recommendation.event.RecommenderTaskEvent) CasStorageSession(de.tudarmstadt.ukp.clarin.webanno.api.dao.casstorage.CasStorageSession) RecommendationEngine(de.tudarmstadt.ukp.inception.recommendation.api.recommender.RecommendationEngine) LazyInitializer(org.apache.commons.lang3.concurrent.LazyInitializer) RecommenderContext(de.tudarmstadt.ukp.inception.recommendation.api.recommender.RecommenderContext) Project(de.tudarmstadt.ukp.clarin.webanno.model.Project) RecommendationEngineFactory(de.tudarmstadt.ukp.inception.recommendation.api.recommender.RecommendationEngineFactory) CAS(org.apache.uima.cas.CAS) TrainingCapability(de.tudarmstadt.ukp.inception.recommendation.api.recommender.TrainingCapability)

Aggregations

LazyInitializer (org.apache.commons.lang3.concurrent.LazyInitializer)3 CasStorageSession (de.tudarmstadt.ukp.clarin.webanno.api.dao.casstorage.CasStorageSession)2 AnnotationLayer (de.tudarmstadt.ukp.clarin.webanno.model.AnnotationLayer)2 Project (de.tudarmstadt.ukp.clarin.webanno.model.Project)2 User (de.tudarmstadt.ukp.clarin.webanno.security.model.User)2 EvaluatedRecommender (de.tudarmstadt.ukp.inception.recommendation.api.model.EvaluatedRecommender)2 Recommender (de.tudarmstadt.ukp.inception.recommendation.api.model.Recommender)2 RecommendationEngine (de.tudarmstadt.ukp.inception.recommendation.api.recommender.RecommendationEngine)2 IOException (java.io.IOException)2 ArrayList (java.util.ArrayList)2 List (java.util.List)2 NoResultException (javax.persistence.NoResultException)2 ConcurrentException (org.apache.commons.lang3.concurrent.ConcurrentException)2 CAS (org.apache.uima.cas.CAS)2 AttributedList (ch.cyberduck.core.AttributedList)1 DisabledConnectionCallback (ch.cyberduck.core.DisabledConnectionCallback)1 DisabledListProgressListener (ch.cyberduck.core.DisabledListProgressListener)1 Filter (ch.cyberduck.core.Filter)1 ListService (ch.cyberduck.core.ListService)1 Local (ch.cyberduck.core.Local)1