diff options
author | Jon Bratseth <bratseth@verizonmedia.com> | 2019-06-02 13:25:45 +0200 |
---|---|---|
committer | Jon Bratseth <bratseth@verizonmedia.com> | 2019-06-02 13:25:45 +0200 |
commit | c25c8a52e2328bcff2f5a35496e7568ee5a7c752 (patch) | |
tree | cd624363ad22b7a2b6a76e41bd27c0cd7f5169d7 /config-model/src/test/integration | |
parent | e9e5a422c0aa6364c3c5f7b9da53e9fcf9a5f0f8 (diff) |
Vespa global model import
Diffstat (limited to 'config-model/src/test/integration')
3 files changed, 38 insertions, 0 deletions
diff --git a/config-model/src/test/integration/vespa/models/constant1asLarge.json b/config-model/src/test/integration/vespa/models/constant1asLarge.json new file mode 100644 index 00000000000..d2944d255af --- /dev/null +++ b/config-model/src/test/integration/vespa/models/constant1asLarge.json @@ -0,0 +1,7 @@ +{ + "cells": [ + { "address": { "x": "0" }, "value": 0.5 }, + { "address": { "x": "1" }, "value": 1.5 }, + { "address": { "x": "2" }, "value": 2.5 } + ] +}
\ No newline at end of file diff --git a/config-model/src/test/integration/vespa/models/example.model b/config-model/src/test/integration/vespa/models/example.model new file mode 100644 index 00000000000..9579be4e44c --- /dev/null +++ b/config-model/src/test/integration/vespa/models/example.model @@ -0,0 +1,25 @@ +model example { + + # All inputs that are not scalar (aka 0-dimensional tensor) must be declared + 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 + } + + constant constant1asLarge { + type: tensor(x[3]) + file: constant1asLarge.json + } + + function foo1() { + expression: max(sum(input1 * input2, name) * constant1, x) * constant2 + } + + function foo2() { + expression: max(sum(input1 * input2, name) * constant1asLarge, x) * constant2 + } + +}
\ No newline at end of file diff --git a/config-model/src/test/integration/vespa/services.xml b/config-model/src/test/integration/vespa/services.xml new file mode 100644 index 00000000000..aa1c0223bdf --- /dev/null +++ b/config-model/src/test/integration/vespa/services.xml @@ -0,0 +1,6 @@ +<!-- Copyright 2018 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. --> +<services> + <container version="1.0"> + + </container> +</services> |