Skip to content

Commit 76a002b

Browse files
Correct linux suffix this time
1 parent 40c5646 commit 76a002b

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

x-pack/plugin/inference/src/main/java/org/elasticsearch/xpack/inference/action/TransportInferenceUsageAction.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ private static Map<String, List<InferenceFieldMetadata>> filterFields(
233233
private record DefaultModelStatsKey(String service, TaskType taskType, String modelId) {
234234

235235
// Some of the default models have optimized variants for linux that will have the following suffix.
236-
private static final String MODEL_ID_LINUX_SUFFIX = "-x86_64";
236+
private static final String MODEL_ID_LINUX_SUFFIX = "_linux-x86_64";
237237

238238
@Override
239239
public String toString() {

x-pack/plugin/inference/src/test/java/org/elasticsearch/xpack/inference/action/TransportInferenceUsageActionTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -222,8 +222,8 @@ public void testGivenServices_SemanticTextFieldsDefaultModels() throws Exception
222222

223223
public void testGivenDefaultModelWithLinuxSuffix() throws Exception {
224224
givenInferenceEndpoints(
225-
new ModelConfigurations(".endpoint-001", TaskType.TEXT_EMBEDDING, "eis", mockServiceSettings(".model-id-001-x86_64")),
226-
new ModelConfigurations("endpoint-002", TaskType.TEXT_EMBEDDING, "eis", mockServiceSettings(".model-id-001-x86_64"))
225+
new ModelConfigurations(".endpoint-001", TaskType.TEXT_EMBEDDING, "eis", mockServiceSettings(".model-id-001_linux-x86_64")),
226+
new ModelConfigurations("endpoint-002", TaskType.TEXT_EMBEDDING, "eis", mockServiceSettings(".model-id-001_linux-x86_64"))
227227
);
228228

229229
givenDefaultEndpoints(".endpoint-001");

0 commit comments

Comments
 (0)