aboutsummaryrefslogtreecommitdiffstats
path: root/config-model/src/test
diff options
context:
space:
mode:
authorLester Solbakken <lesters@users.noreply.github.com>2018-09-05 12:35:15 +0200
committerGitHub <noreply@github.com>2018-09-05 12:35:15 +0200
commit8ea0b68d38beb85431fecf3cfe368310369b68f3 (patch)
treef2cad8b277da08a4ba7c3b48cec1382e0d8150fd /config-model/src/test
parent79731040a1f8dee0e347347b7407aafb300e0ff1 (diff)
parented325d5b3ba692f485234cbddb72ecea5ab9f2f1 (diff)
Merge pull request #6805 from vespa-engine/bratseth/handle-large-constants-take-3
Bratseth/handle large constants take 3
Diffstat (limited to 'config-model/src/test')
-rw-r--r--config-model/src/test/java/com/yahoo/config/model/ModelEvaluationTest.java9
1 files changed, 8 insertions, 1 deletions
diff --git a/config-model/src/test/java/com/yahoo/config/model/ModelEvaluationTest.java b/config-model/src/test/java/com/yahoo/config/model/ModelEvaluationTest.java
index a6022f32528..91d7fd436f3 100644
--- a/config-model/src/test/java/com/yahoo/config/model/ModelEvaluationTest.java
+++ b/config-model/src/test/java/com/yahoo/config/model/ModelEvaluationTest.java
@@ -7,6 +7,7 @@ import com.yahoo.config.application.api.ApplicationPackage;
import com.yahoo.io.IOUtils;
import com.yahoo.path.Path;
import com.yahoo.vespa.config.search.RankProfilesConfig;
+import com.yahoo.vespa.config.search.core.RankingConstantsConfig;
import com.yahoo.vespa.model.VespaModel;
import com.yahoo.vespa.model.container.ContainerCluster;
import org.junit.After;
@@ -57,16 +58,22 @@ public class ModelEvaluationTest {
private void assertHasMlModels(VespaModel model) {
ContainerCluster cluster = model.getContainerClusters().get("container");
+
RankProfilesConfig.Builder b = new RankProfilesConfig.Builder();
cluster.getConfig(b);
RankProfilesConfig config = new RankProfilesConfig(b);
+
+ RankingConstantsConfig.Builder cb = new RankingConstantsConfig.Builder();
+ cluster.getConfig(cb);
+ RankingConstantsConfig constantsConfig = new RankingConstantsConfig(cb);
+
assertEquals(4, config.rankprofile().size());
Set<String> modelNames = config.rankprofile().stream().map(v -> v.name()).collect(Collectors.toSet());
assertTrue(modelNames.contains("xgboost_2_2"));
assertTrue(modelNames.contains("mnist_softmax"));
assertTrue(modelNames.contains("mnist_softmax_saved"));
- ModelsEvaluator evaluator = new ModelsEvaluator(config);
+ ModelsEvaluator evaluator = new ModelsEvaluator(config, constantsConfig);
assertEquals(4, evaluator.models().size());
Model xgboost = evaluator.models().get("xgboost_2_2");