Class OnnxModelTransformer
- java.lang.Object
-
- com.yahoo.searchlib.rankingexpression.transform.ExpressionTransformer<RankProfileTransformContext>
-
- com.yahoo.searchdefinition.expressiontransforms.OnnxModelTransformer
-
public class OnnxModelTransformer extends com.yahoo.searchlib.rankingexpression.transform.ExpressionTransformer<RankProfileTransformContext>
Transforms ONNX model features of the forms: onnxModel(config_name) onnxModel(config_name).output onnxModel("path/to/model") onnxModel("path/to/model").output onnxModel("path/to/model", "path/to/output") onnxModel("path/to/model", "unused", "path/to/output") // signature is unused onnx(...) // same as with onnxModel, onnx is an alias of onnxModel To the format expected by the backend: onnxModel(config_name).output- Author:
- lesters
-
-
Constructor Summary
Constructors Constructor Description OnnxModelTransformer()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static 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
stripQuotes(String s)
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 rankProfile)
-
-
-
Method Detail
-
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 rankProfile)
-
getModelConfigName
public static String getModelConfigName(com.yahoo.searchlib.rankingexpression.Reference reference)
-
getModelOutput
public static String getModelOutput(com.yahoo.searchlib.rankingexpression.Reference reference, String defaultOutput)
-
asString
public static String asString(com.yahoo.searchlib.rankingexpression.rule.ExpressionNode node)
-
-