Class RankProfilesConfigImporter

java.lang.Object
ai.vespa.models.evaluation.RankProfilesConfigImporter

public class RankProfilesConfigImporter extends Object
Converts RankProfilesConfig instances to RankingExpressions for evaluation. This class can be used by a single thread only.
Author:
bratseth
  • Constructor Summary

    Constructors
    Constructor
    Description
    RankProfilesConfigImporter(com.yahoo.filedistribution.fileacquirer.FileAcquirer fileAcquirer, ai.vespa.modelintegration.evaluator.OnnxRuntime onnx)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    importFrom(com.yahoo.vespa.config.search.RankProfilesConfig config, com.yahoo.vespa.config.search.core.RankingConstantsConfig constantsConfig, com.yahoo.vespa.config.search.core.RankingExpressionsConfig expressionsConfig, com.yahoo.vespa.config.search.core.OnnxModelsConfig onnxModelsConfig)
    Returns a map of the models contained in this config, indexed on name.
    protected final String
     
    protected com.yahoo.searchlib.rankingexpression.RankingExpression
    readExpressionFromFile(String name, com.yahoo.config.FileReference fileReference)
     
    protected com.yahoo.tensor.Tensor
    readTensorFromFile(String name, com.yahoo.tensor.TensorType type, com.yahoo.config.FileReference fileReference)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • RankProfilesConfigImporter

      public RankProfilesConfigImporter(com.yahoo.filedistribution.fileacquirer.FileAcquirer fileAcquirer, ai.vespa.modelintegration.evaluator.OnnxRuntime onnx)
  • Method Details

    • importFrom

      public Map<String,Model> importFrom(com.yahoo.vespa.config.search.RankProfilesConfig config, com.yahoo.vespa.config.search.core.RankingConstantsConfig constantsConfig, com.yahoo.vespa.config.search.core.RankingExpressionsConfig expressionsConfig, com.yahoo.vespa.config.search.core.OnnxModelsConfig onnxModelsConfig)
      Returns a map of the models contained in this config, indexed on name. The map is modifiable and owned by the caller.
    • readExpressionFromFile

      protected final String readExpressionFromFile(File file) throws IOException
      Throws:
      IOException
    • readExpressionFromFile

      protected com.yahoo.searchlib.rankingexpression.RankingExpression readExpressionFromFile(String name, com.yahoo.config.FileReference fileReference) throws com.yahoo.searchlib.rankingexpression.parser.ParseException
      Throws:
      com.yahoo.searchlib.rankingexpression.parser.ParseException
    • readTensorFromFile

      protected com.yahoo.tensor.Tensor readTensorFromFile(String name, com.yahoo.tensor.TensorType type, com.yahoo.config.FileReference fileReference)