summaryrefslogtreecommitdiffstats
path: root/config-model
diff options
context:
space:
mode:
authorArne Juul <arnej@verizonmedia.com>2021-04-23 08:20:43 +0000
committerArne Juul <arnej@verizonmedia.com>2021-04-23 08:21:53 +0000
commit0f20f60145524b13b11453fa0c92f33be0732707 (patch)
tree298b9810e6ea38f8cbc36c151cc201452a675d1b /config-model
parent76cb5d5cd62b7e5dbe2b515770c405b863d2ab91 (diff)
rename inputParameter -> inputFeature
Diffstat (limited to 'config-model')
-rw-r--r--config-model/src/main/java/com/yahoo/searchdefinition/RankProfile.java18
-rw-r--r--config-model/src/main/java/com/yahoo/vespa/model/ml/ConvertedModel.java4
2 files changed, 11 insertions, 11 deletions
diff --git a/config-model/src/main/java/com/yahoo/searchdefinition/RankProfile.java b/config-model/src/main/java/com/yahoo/searchdefinition/RankProfile.java
index 11f5438af4d..b460752d7bd 100644
--- a/config-model/src/main/java/com/yahoo/searchdefinition/RankProfile.java
+++ b/config-model/src/main/java/com/yahoo/searchdefinition/RankProfile.java
@@ -103,7 +103,7 @@ public class RankProfile implements Cloneable {
private Map<String, RankingExpressionFunction> functions = new LinkedHashMap<>();
- private Map<Reference, TensorType> inputParameters = new LinkedHashMap<>();
+ private Map<Reference, TensorType> inputFeatures = new LinkedHashMap<>();
private Set<String> filterFields = new HashSet<>();
@@ -585,16 +585,16 @@ public class RankProfile implements Cloneable {
* that a input is provided with the declared type (for the purpose of
* type resolving).
**/
- public void addInputParameter(String name, TensorType declaredType) {
+ public void addInputFeature(String name, TensorType declaredType) {
Reference ref = Reference.fromIdentifier(name);
- if (inputParameters.containsKey(ref)) {
- TensorType hadType = inputParameters.get(ref);
+ if (inputFeatures.containsKey(ref)) {
+ TensorType hadType = inputFeatures.get(ref);
if (! declaredType.equals(hadType)) {
- throw new IllegalArgumentException("Tried to replace input parameter "+name+" with different type: "+
+ throw new IllegalArgumentException("Tried to replace input feature "+name+" with different type: "+
hadType+" -> "+declaredType);
}
}
- inputParameters.put(ref, declaredType);
+ inputFeatures.put(ref, declaredType);
}
public RankingExpressionFunction findFunction(String name) {
@@ -696,7 +696,7 @@ public class RankProfile implements Cloneable {
clone.summaryFeatures = summaryFeatures != null ? new LinkedHashSet<>(this.summaryFeatures) : null;
clone.rankFeatures = rankFeatures != null ? new LinkedHashSet<>(this.rankFeatures) : null;
clone.rankProperties = new LinkedHashMap<>(this.rankProperties);
- clone.inputParameters = new LinkedHashMap<>(this.inputParameters);
+ clone.inputFeatures = new LinkedHashMap<>(this.inputFeatures);
clone.functions = new LinkedHashMap<>(this.functions);
clone.filterFields = new HashSet<>(this.filterFields);
clone.constants = new HashMap<>(this.constants);
@@ -814,8 +814,8 @@ public class RankProfile implements Cloneable {
private Map<Reference, TensorType> collectFeatureTypes() {
Map<Reference, TensorType> featureTypes = new HashMap<>();
- // Add input parameters
- inputParameters.forEach((k, v) -> featureTypes.put(k, v));
+ // Add input features
+ inputFeatures.forEach((k, v) -> featureTypes.put(k, v));
// Add attributes
allFields().forEach(field -> addAttributeFeatureTypes(field, featureTypes));
allImportedFields().forEach(field -> addAttributeFeatureTypes(field, featureTypes));
diff --git a/config-model/src/main/java/com/yahoo/vespa/model/ml/ConvertedModel.java b/config-model/src/main/java/com/yahoo/vespa/model/ml/ConvertedModel.java
index 01da57fc9bb..9086ca9f40e 100644
--- a/config-model/src/main/java/com/yahoo/vespa/model/ml/ConvertedModel.java
+++ b/config-model/src/main/java/com/yahoo/vespa/model/ml/ConvertedModel.java
@@ -211,7 +211,7 @@ public class ConvertedModel {
for (ImportedMlFunction outputFunction : model.outputExpressions()) {
ExpressionFunction expression = asExpressionFunction(outputFunction);
for (Map.Entry<String, TensorType> input : expression.argumentTypes().entrySet()) {
- profile.addInputParameter(input.getKey(), input.getValue());
+ profile.addInputFeature(input.getKey(), input.getValue());
}
addExpression(expression, expression.getName(),
constantsReplacedByFunctions,
@@ -284,7 +284,7 @@ public class ConvertedModel {
String name = output.getFirst();
ExpressionFunction expression = output.getSecond();
for (Map.Entry<String, TensorType> input : expression.argumentTypes().entrySet()) {
- profile.addInputParameter(input.getKey(), input.getValue());
+ profile.addInputFeature(input.getKey(), input.getValue());
}
TensorType type = expression.getBody().type(profile.typeContext());
if (type != null) {