summaryrefslogtreecommitdiffstats
path: root/model-integration/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'model-integration/src/test')
-rw-r--r--model-integration/src/test/java/ai/vespa/rankingexpression/importer/vespa/VespaImportTestCase.java9
-rw-r--r--model-integration/src/test/models/vespa/example.model12
-rw-r--r--model-integration/src/test/models/vespa/legacy_syntax.model26
3 files changed, 7 insertions, 40 deletions
diff --git a/model-integration/src/test/java/ai/vespa/rankingexpression/importer/vespa/VespaImportTestCase.java b/model-integration/src/test/java/ai/vespa/rankingexpression/importer/vespa/VespaImportTestCase.java
index 25c51a75b0b..fc92883a90f 100644
--- a/model-integration/src/test/java/ai/vespa/rankingexpression/importer/vespa/VespaImportTestCase.java
+++ b/model-integration/src/test/java/ai/vespa/rankingexpression/importer/vespa/VespaImportTestCase.java
@@ -25,16 +25,7 @@ public class VespaImportTestCase {
@Test
public void testExample() {
ImportedModel model = importModel("example");
- assertModel(model);
- }
-
- @Test
- public void testLegacySyntax() {
- ImportedModel model = importModel("legacy_syntax");
- assertModel(model);
- }
- private void assertModel(ImportedModel model) {
assertEquals(2, model.inputs().size());
assertEquals("tensor(name{},x[3])", model.inputs().get("input1").toString());
assertEquals("tensor(x[3])", model.inputs().get("input2").toString());
diff --git a/model-integration/src/test/models/vespa/example.model b/model-integration/src/test/models/vespa/example.model
index 25d27033cfd..269ed83b695 100644
--- a/model-integration/src/test/models/vespa/example.model
+++ b/model-integration/src/test/models/vespa/example.model
@@ -1,15 +1,17 @@
model example {
# All inputs that are not scalar (aka 0-dimensional tensor) must be declared
- inputs {
- input1: tensor(name{}, x[3])
- input2: tensor(x[3])
- }
+ input1: tensor(name{}, x[3])
+ input2: tensor(x[3])
constants {
constant1: tensor(x[3]):{{x:0}:0.5, {x:1}:1.5, {x:2}:2.5}
constant2: 3.0
- constant1asLarge tensor(x[3]): file:constant1asLarge.json
+ }
+
+ constant constant1asLarge {
+ type: tensor(x[3])
+ file: constant1asLarge.json
}
function foo1() {
diff --git a/model-integration/src/test/models/vespa/legacy_syntax.model b/model-integration/src/test/models/vespa/legacy_syntax.model
deleted file mode 100644
index 2a5031a5ff9..00000000000
--- a/model-integration/src/test/models/vespa/legacy_syntax.model
+++ /dev/null
@@ -1,26 +0,0 @@
-model legacy_syntax {
-
- # Syntax not supported in rank profiles which probably should be removed on Vespa 9
- input1: tensor(name{}, x[3])
- input2: tensor(x[3])
-
- constants {
- constant1: tensor(x[3]):{{x:0}:0.5, {x:1}:1.5, {x:2}:2.5}
- constant2: 3.0
- }
-
- # Syntax to be removed on Vespa 9
- constant constant1asLarge {
- type: tensor(x[3])
- file: constant1asLarge.json
- }
-
- function foo1() {
- expression: file:test.expression
- }
-
- function foo2() {
- expression: reduce(sum(input1 * input2, name) * constant(constant1asLarge), max, x) * constant2
- }
-
-} \ No newline at end of file