blob: 0f0fa694e6f96d62d4ef09f84a70091cd65a0812 (
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
|
# Copyright Verizon Media. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
search test {
document test {
field document_field type tensor(d0[2]) {
indexing: attribute
}
}
constant my_constant {
file: files/constant.json
type: tensor(d0[2])
}
onnx-model my_model {
file: files/ranking_model.onnx
input first_input: attribute(document_field)
input "second/input:0": constant(my_constant)
input "third_input": my_function
output "path/to/output:0": out
}
onnx-model another_model {
file: files/ranking_model.onnx
input first_input: attribute(document_field)
input "second/input:0": constant(my_constant)
input "third_input": another_function
output "path/to/output:2": out
}
rank-profile test_model_config {
function my_function() {
expression: tensor(d0[2])(1)
}
first-phase {
expression: onnxModel(my_model).out
}
}
rank-profile test_generated_model_config inherits test_model_config {
function first_input() {
expression: attribute(document_field)
}
function second_input() {
expression: constant(my_constant)
}
function third_input() {
expression: my_function()
}
first-phase {
expression: onnxModel("files/ranking_model.onnx", "path/to/output:1")
}
}
rank-profile test_summary_features {
function another_function() {
expression: tensor(d0[2])(2)
}
first-phase {
expression: 1
}
summary-features {
onnxModel(another_model).out
onnxModel("files/ranking_model.onnx", "path/to/output:2")
}
}
}
|