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 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 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 profile)
    • 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)