Package ai.vespa.models.evaluation
Class RankProfilesConfigImporter
java.lang.Object
ai.vespa.models.evaluation.RankProfilesConfigImporter
Converts RankProfilesConfig instances to RankingExpressions for evaluation.
This class can be used by a single thread only.
- Author:
- bratseth
-
Constructor Summary
ConstructorsConstructorDescriptionRankProfilesConfigImporter(com.yahoo.filedistribution.fileacquirer.FileAcquirer fileAcquirer, ai.vespa.modelintegration.evaluator.OnnxRuntime onnx) -
Method Summary
Modifier and TypeMethodDescriptionimportFrom(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 StringreadExpressionFromFile(File file) protected com.yahoo.searchlib.rankingexpression.RankingExpressionreadExpressionFromFile(String name, com.yahoo.config.FileReference fileReference) protected com.yahoo.tensor.TensorreadTensorFromFile(String name, com.yahoo.tensor.TensorType type, com.yahoo.config.FileReference fileReference)
-
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
- 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)
-