diff options
author | Jon Bratseth <bratseth@gmail.com> | 2022-05-18 11:55:45 +0200 |
---|---|---|
committer | Jon Bratseth <bratseth@gmail.com> | 2022-05-18 11:55:45 +0200 |
commit | 9aa29161dfe87e498caf292ce9201b78cb199a79 (patch) | |
tree | 649d3fad62792f9c58fa0f485905068813cf85c6 /model-integration/src/test/models | |
parent | 619d924440939076e399f2504fa6850976d2a303 (diff) |
Unify input syntax across models and rank profiles
Diffstat (limited to 'model-integration/src/test/models')
-rw-r--r-- | model-integration/src/test/models/vespa/example.model | 6 | ||||
-rw-r--r-- | model-integration/src/test/models/vespa/legacy_syntax.model | 26 |
2 files changed, 30 insertions, 2 deletions
diff --git a/model-integration/src/test/models/vespa/example.model b/model-integration/src/test/models/vespa/example.model index fd8565f2b92..25d27033cfd 100644 --- a/model-integration/src/test/models/vespa/example.model +++ b/model-integration/src/test/models/vespa/example.model @@ -1,8 +1,10 @@ model example { # All inputs that are not scalar (aka 0-dimensional tensor) must be declared - input1: tensor(name{}, x[3]) - input2: tensor(x[3]) + inputs { + 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} diff --git a/model-integration/src/test/models/vespa/legacy_syntax.model b/model-integration/src/test/models/vespa/legacy_syntax.model new file mode 100644 index 00000000000..2a5031a5ff9 --- /dev/null +++ b/model-integration/src/test/models/vespa/legacy_syntax.model @@ -0,0 +1,26 @@ +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 |