Class OnnxModelTransformer
java.lang.Object
com.yahoo.searchlib.rankingexpression.transform.ExpressionTransformer<RankProfileTransformContext>
com.yahoo.schema.expressiontransforms.OnnxModelTransformer
public class OnnxModelTransformer
extends com.yahoo.searchlib.rankingexpression.transform.ExpressionTransformer<RankProfileTransformContext>
Transforms ONNX model features of the forms:
onnx(config_name)
onnx(config_name).output
onnx("path/to/model")
onnx("path/to/model").output
onnx("path/to/model", "path/to/output")
onnx("path/to/model", "unused", "path/to/output") // signature is unused
To the format expected by the backend:
onnx(config_name).output
- Author:
- lesters
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
asString
(com.yahoo.searchlib.rankingexpression.rule.ExpressionNode node) static String
asValidIdentifier
(String str) static String
getModelConfigName
(com.yahoo.searchlib.rankingexpression.Reference reference) static String
getModelOutput
(com.yahoo.searchlib.rankingexpression.Reference reference, String defaultOutput) static String
com.yahoo.searchlib.rankingexpression.rule.ExpressionNode
transform
(com.yahoo.searchlib.rankingexpression.rule.ExpressionNode node, RankProfileTransformContext context) static com.yahoo.searchlib.rankingexpression.rule.ExpressionNode
transformFeature
(com.yahoo.searchlib.rankingexpression.rule.ReferenceNode feature, RankProfile profile) Methods inherited from class com.yahoo.searchlib.rankingexpression.transform.ExpressionTransformer
transform, transformChildren
-
Constructor Details
-
OnnxModelTransformer
public OnnxModelTransformer()
-
-
Method Details
-
transform
public com.yahoo.searchlib.rankingexpression.rule.ExpressionNode transform(com.yahoo.searchlib.rankingexpression.rule.ExpressionNode node, RankProfileTransformContext context) - Specified by:
transform
in classcom.yahoo.searchlib.rankingexpression.transform.ExpressionTransformer<RankProfileTransformContext>
-
transformFeature
public static com.yahoo.searchlib.rankingexpression.rule.ExpressionNode transformFeature(com.yahoo.searchlib.rankingexpression.rule.ReferenceNode feature, RankProfile profile) -
getModelConfigName
-
getModelOutput
-
stripQuotes
-
asValidIdentifier
-
asString
-