blob: d5016e1fd1f92d56c2f4e2d28800eadddf4e1b1a (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package ai.vespa.models.evaluation;
import org.junit.Test;
import static org.junit.Assert.assertEquals;
/**
* @author bratseth
*/
public class SmallConstantImportingTest {
@Test
public void testImportingSmallConstant() {
ModelTester tester = new ModelTester("src/test/resources/config/smallconstant/");
assertEquals(1, tester.models().size());
Model model = tester.models().get("my_profile");
tester.assertFunction("firstphase", "reduce(constant(my_tensor), sum)", model);
assertEquals(3.0, model.evaluatorOf().evaluate().asDouble(), 0.00000000001);
}
}
|