Class 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 Detail

      • OnnxModelTransformer

        public OnnxModelTransformer()
    • Method Detail

      • transform

        public com.yahoo.searchlib.rankingexpression.rule.ExpressionNode transform​(com.yahoo.searchlib.rankingexpression.rule.ExpressionNode node,
                                                                                   RankProfileTransformContext context)
        Specified by:
        transform in class com.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)
      • stripQuotes

        public static String stripQuotes​(String s)
      • asValidIdentifier

        public static String asValidIdentifier​(String str)
      • asString

        public static String asString​(com.yahoo.searchlib.rankingexpression.rule.ExpressionNode node)