diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2022-05-19 12:18:21 +0200 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2022-05-19 13:05:24 +0200 |
commit | a6528c76c9d59fbfe2b3038db8b84960dceff68d (patch) | |
tree | 5354af64b6c8cf91f70fd6977502190a761e86e3 /config-model/src/main/java/com/yahoo/schema/derived/RankProfileList.java | |
parent | 0c1edc0e0acdaa09c7227141ac50bdb6eba078ca (diff) |
RankProfiles are very expensive memory wise so we need to keep their lifetime very short.
Only remember exactly what you need.
In this case we only need the constants and the onnxModels.
Diffstat (limited to 'config-model/src/main/java/com/yahoo/schema/derived/RankProfileList.java')
-rw-r--r-- | config-model/src/main/java/com/yahoo/schema/derived/RankProfileList.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/config-model/src/main/java/com/yahoo/schema/derived/RankProfileList.java b/config-model/src/main/java/com/yahoo/schema/derived/RankProfileList.java index 98815410876..c549f9af7ce 100644 --- a/config-model/src/main/java/com/yahoo/schema/derived/RankProfileList.java +++ b/config-model/src/main/java/com/yahoo/schema/derived/RankProfileList.java @@ -136,7 +136,7 @@ public class RankProfileList extends Derived implements RankProfilesConfig.Produ allFileConstants, schema != null ? schema.toString() : "[global]"); for (var profile : rankProfiles) - addFileConstants(profile.compiled().constants().values(), allFileConstants, profile.toString()); + addFileConstants(profile.constants(), allFileConstants, profile.toString()); return new FileDistributedConstants(deployState.getFileRegistry(), allFileConstants.values()); } @@ -163,7 +163,7 @@ public class RankProfileList extends Derived implements RankProfilesConfig.Produ allModels, schema != null ? schema.toString() : "[global]"); for (var profile : rankProfiles) - addOnnxModels(profile.compiled().onnxModels().values(), allModels, profile.toString()); + addOnnxModels(profile.onnxModels(), allModels, profile.toString()); return new FileDistributedOnnxModels(deployState.getFileRegistry(), allModels.values()); } |