Search in sources :

Example 1 with PagedModelContainer

use of com.sri.ai.praise.model.common.io.PagedModelContainer in project aic-praise by aic-sri-international.

the class AbstractEvaluateCLI method run.

public void run(String[] args) throws Exception {
    try (EvaluationArgs evaluationArgs = getArgs(args)) {
        PagedModelContainer modelsContainer = makeModelsContainer(evaluationArgs);
        Evaluation.Configuration configuration = new Evaluation.Configuration(Evaluation.Type.PR, evaluationArgs.workingDirectory, evaluationArgs.numberRunsToAverageOver);
        List<SolverEvaluatorConfiguration> solverConfigurations = new ArrayList<>();
        for (String solverImplementationClassName : evaluationArgs.solverImplementationClassNames) {
            solverConfigurations.add(new SolverEvaluatorConfiguration(solverImplementationClassName, evaluationArgs.totalCPURuntimeLimitSecondsPerSolveAttempt, evaluationArgs.totalMemoryLimitInMegabytesPerSolveAttempt, !evaluationArgs.translateAlways, Collections.emptyMap()));
        }
        PrintStream notificationOut = evaluationArgs.notificationOut;
        PrintStream resultOut = evaluationArgs.resultOut;
        evaluate(configuration, modelsContainer, solverConfigurations, notificationOut, resultOut);
    }
}
Also used : Evaluation(com.sri.ai.praise.evaluate.run.Evaluation) PrintStream(java.io.PrintStream) SolverEvaluatorConfiguration(com.sri.ai.praise.evaluate.solver.SolverEvaluatorConfiguration) SolverEvaluatorConfiguration(com.sri.ai.praise.evaluate.solver.SolverEvaluatorConfiguration) ArrayList(java.util.ArrayList) PagedModelContainer(com.sri.ai.praise.model.common.io.PagedModelContainer)

Aggregations

Evaluation (com.sri.ai.praise.evaluate.run.Evaluation)1 SolverEvaluatorConfiguration (com.sri.ai.praise.evaluate.solver.SolverEvaluatorConfiguration)1 PagedModelContainer (com.sri.ai.praise.model.common.io.PagedModelContainer)1 PrintStream (java.io.PrintStream)1 ArrayList (java.util.ArrayList)1