diff options
Diffstat (limited to 'config-model/src/main/java/com/yahoo/searchdefinition/expressiontransforms/TensorFlowFeatureConverter.java')
-rw-r--r-- | config-model/src/main/java/com/yahoo/searchdefinition/expressiontransforms/TensorFlowFeatureConverter.java | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/config-model/src/main/java/com/yahoo/searchdefinition/expressiontransforms/TensorFlowFeatureConverter.java b/config-model/src/main/java/com/yahoo/searchdefinition/expressiontransforms/TensorFlowFeatureConverter.java index 629aef7f56c..c16d12f76d1 100644 --- a/config-model/src/main/java/com/yahoo/searchdefinition/expressiontransforms/TensorFlowFeatureConverter.java +++ b/config-model/src/main/java/com/yahoo/searchdefinition/expressiontransforms/TensorFlowFeatureConverter.java @@ -4,6 +4,7 @@ package com.yahoo.searchdefinition.expressiontransforms; import com.google.common.base.Joiner; import com.yahoo.config.application.api.ApplicationFile; import com.yahoo.config.application.api.ApplicationPackage; +import com.yahoo.config.model.application.provider.FilesApplicationPackage; import com.yahoo.io.IOUtils; import com.yahoo.path.Path; import com.yahoo.searchdefinition.RankProfile; @@ -254,13 +255,9 @@ public class TensorFlowFeatureConverter extends ExpressionTransformer<RankProfil // "tbf" ending for "typed binary format" - recognized by the nodes receiving the file: Path constantPath = constantsPath.append(name + ".tbf"); Path constantPathCorrected = constantPath; - if (application.getFileReference(Path.fromString("")).getAbsolutePath().endsWith(".preprocessed")) { - log.info("Correcting TensorFlow constant path by prepending .preprocessed - alternative 1"); - constantPathCorrected = Path.fromString(".preprocessed").append(constantPath); - } - else if (application.getFileReference(Path.fromString("")).getAbsolutePath().endsWith(".preprocessed")) { - log.info("Correcting TensorFlow constant path by prepending .preprocessed - alternative 2"); - constantPathCorrected = Path.fromString(".preprocessed").append(constantPath); + if (application.getFileReference(Path.fromString("")).getAbsolutePath().endsWith(FilesApplicationPackage.preprocessed) + && ! constantPath.elements().contains(FilesApplicationPackage.preprocessed)) { + constantPathCorrected = Path.fromString(FilesApplicationPackage.preprocessed).append(constantPath); } // Remember the constant in a file we replicate in ZooKeeper |