aboutsummaryrefslogtreecommitdiffstats
path: root/model-integration/src/main/java/ai/vespa/rankingexpression/importer
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2022-11-09 20:15:42 +0100
committerGitHub <noreply@github.com>2022-11-09 20:15:42 +0100
commitec1413c6baca2e30bdd732ca8e20a108c9e66852 (patch)
treeb9e57f781bde4d962835b4ffdc56a58e5d7585cd /model-integration/src/main/java/ai/vespa/rankingexpression/importer
parent606bc6b517e09bba9f36a4ef6506a588d1254bd4 (diff)
Revert "Revert "Revert "Balder/model importing code in config model [run-systemtest]"""
Diffstat (limited to 'model-integration/src/main/java/ai/vespa/rankingexpression/importer')
-rw-r--r--model-integration/src/main/java/ai/vespa/rankingexpression/importer/ImportedModel.java19
-rw-r--r--model-integration/src/main/java/ai/vespa/rankingexpression/importer/configmodelview/ImportedMlModel.java6
2 files changed, 1 insertions, 24 deletions
diff --git a/model-integration/src/main/java/ai/vespa/rankingexpression/importer/ImportedModel.java b/model-integration/src/main/java/ai/vespa/rankingexpression/importer/ImportedModel.java
index 35c409a637c..4e7710aa449 100644
--- a/model-integration/src/main/java/ai/vespa/rankingexpression/importer/ImportedModel.java
+++ b/model-integration/src/main/java/ai/vespa/rankingexpression/importer/ImportedModel.java
@@ -81,19 +81,10 @@ public class ImportedModel implements ImportedMlModel {
}
/**
- * Returns an immutable map of the small constants of this.
- * These should have sizes up to a few kb at most, and correspond to constant values given in the source model.
- */
- @Override
- public Map<String, Tensor> smallConstantTensors() { return Map.copyOf(smallConstants); }
- /**
* Returns an immutable map of the small constants of this, represented as strings on the standard tensor form.
* These should have sizes up to a few kb at most, and correspond to constant values given in the source model.
- * @deprecated Use smallConstantTensors instead
*/
@Override
- @SuppressWarnings("removal")
- @Deprecated(forRemoval = true)
public Map<String, String> smallConstants() { return asStrings(smallConstants); }
boolean hasSmallConstant(String name) { return smallConstants.containsKey(name); }
@@ -101,17 +92,9 @@ public class ImportedModel implements ImportedMlModel {
/**
* Returns an immutable map of the large constants of this.
* These can have sizes in gigabytes and must be distributed to nodes separately from configuration.
+ * For TensorFlow this corresponds to Variable files stored separately.
*/
@Override
- public Map<String, Tensor> largeConstantTensors() { return Map.copyOf(largeConstants); }
- /**
- * Returns an immutable map of the large constants of this, represented as strings on the standard tensor form.
- * These can have sizes in gigabytes and must be distributed to nodes separately from configuration.
- * @deprecated Use largeConstantTensors instead
- */
- @Override
- @SuppressWarnings("removal")
- @Deprecated(forRemoval = true)
public Map<String, String> largeConstants() { return asStrings(largeConstants); }
boolean hasLargeConstant(String name) { return largeConstants.containsKey(name); }
diff --git a/model-integration/src/main/java/ai/vespa/rankingexpression/importer/configmodelview/ImportedMlModel.java b/model-integration/src/main/java/ai/vespa/rankingexpression/importer/configmodelview/ImportedMlModel.java
index 8c8fc5c4b11..a2626818f87 100644
--- a/model-integration/src/main/java/ai/vespa/rankingexpression/importer/configmodelview/ImportedMlModel.java
+++ b/model-integration/src/main/java/ai/vespa/rankingexpression/importer/configmodelview/ImportedMlModel.java
@@ -1,8 +1,6 @@
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package ai.vespa.rankingexpression.importer.configmodelview;
-import com.yahoo.tensor.Tensor;
-
import java.util.List;
import java.util.Map;
import java.util.Optional;
@@ -23,12 +21,8 @@ public interface ImportedMlModel {
ModelType modelType();
Optional<String> inputTypeSpec(String input);
- @Deprecated(forRemoval = true)
Map<String, String> smallConstants();
- @Deprecated(forRemoval = true)
Map<String, String> largeConstants();
- Map<String, Tensor> smallConstantTensors();
- Map<String, Tensor> largeConstantTensors();
Map<String, String> functions();
List<ImportedMlFunction> outputExpressions();