Skip to content

Commit d2a8ae7

Browse files
committed
Fix stripping platform
1 parent ebd1f4e commit d2a8ae7

File tree

1 file changed

+1
-5
lines changed
  • x-pack/plugin/inference/qa/inference-service-tests/src/javaRestTest/java/org/elasticsearch/xpack/inference

1 file changed

+1
-5
lines changed

x-pack/plugin/inference/qa/inference-service-tests/src/javaRestTest/java/org/elasticsearch/xpack/inference/MlModelServer.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
import org.elasticsearch.xcontent.XContentParser;
2020
import org.elasticsearch.xcontent.XContentParserConfiguration;
2121
import org.elasticsearch.xcontent.XContentType;
22-
import org.elasticsearch.xpack.core.XPackSettings;
2322
import org.elasticsearch.xpack.core.ml.inference.trainedmodel.ModelPackageConfig;
2423
import org.junit.rules.TestRule;
2524
import org.junit.runner.Description;
@@ -90,10 +89,7 @@ private InputStream getInputStream(HttpExchange exchange) throws IOException {
9089

9190
// If a model specifically optimized for some platform is requested,
9291
// serve the default non-optimized model instead, which is compatible.
93-
String defaultModelId = modelId;
94-
for (String platform : XPackSettings.ML_NATIVE_CODE_PLATFORMS) {
95-
defaultModelId = defaultModelId.replace("_" + platform, "");
96-
}
92+
String defaultModelId = modelId.replace("_linux-x86_64", "");
9793

9894
ClassLoader classloader = Thread.currentThread().getContextClassLoader();
9995
InputStream is = classloader.getResourceAsStream(defaultModelId + "." + extension);

0 commit comments

Comments
 (0)