Skip to content

Commit

Permalink
[ML] Re-enable upgrade tests with workaround for invalid pipeline con…
Browse files Browse the repository at this point in the history
…fig (#95778) (#95783)

In #95766 the ML trained model deployment upgrade tests fail 
due to an invalid ingest processor configuration. ML stopped
parsing the full ingest pipeline in version 8.3.1 so the tests can
be re-enable when upgrading from 8.3.1 or later.
  • Loading branch information
davidkyle authored May 3, 2023
1 parent daa1463 commit da257fe
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ public void removeLogging() throws IOException {
client().performRequest(request);
}

@AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/95360")
public void testTrainedModelDeployment() throws Exception {
assumeTrue("NLP model deployments added in 8.0", UPGRADE_FROM_VERSION.onOrAfter(Version.V_8_0_0));

Expand All @@ -113,10 +112,21 @@ public void testTrainedModelDeployment() throws Exception {
request.addParameter("wait_for_status", "yellow");
request.addParameter("timeout", "70s");
}));
waitForDeploymentStarted(modelId);
// attempt inference on new and old nodes multiple times
for (int i = 0; i < 10; i++) {
assertInfer(modelId);

// Workaround for an upgrade test failure where an ingest
// pipeline config cannot be parsed by older nodes:
// https://github.com/elastic/elasticsearch/issues/95766
//
// In version 8.3.1 ml stopped parsing the full ingest
// pipeline configuration so will avoid this problem.
// TODO remove this check once https://github.com/elastic/elasticsearch/issues/95766
// is resolved
if (UPGRADE_FROM_VERSION.onOrAfter(Version.V_8_3_1)) {
waitForDeploymentStarted(modelId);
// attempt inference on new and old nodes multiple times
for (int i = 0; i < 10; i++) {
assertInfer(modelId);
}
}
}
case UPGRADED -> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ protected Collection<String> templatesToWaitFor() {
.collect(Collectors.toSet());
}

@AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/95360")
public void testTrainedModelInference() throws Exception {
assumeTrue("We should only test if old cluster is after trained models we GA", UPGRADE_FROM_VERSION.after(Version.V_7_13_0));
switch (CLUSTER_TYPE) {
Expand All @@ -75,8 +74,19 @@ public void testTrainedModelInference() throws Exception {
request.addParameter("timeout", "70s");
}));
List<String> modelIds = getTrainedModels();
// Test that stats are serializable and can be gathered
getTrainedModelStats();

// Workaround for an upgrade test failure where an ingest
// pipeline config cannot be parsed by older nodes:
// https://github.com/elastic/elasticsearch/issues/95766
//
// In version 8.3.1 ml stopped parsing the full ingest
// pipeline configuration so will avoid this problem.
// TODO remove this check once https://github.com/elastic/elasticsearch/issues/95766
// is resolved
if (UPGRADE_FROM_VERSION.onOrAfter(Version.V_8_3_1)) {
// Test that stats are serializable and can be gathered
getTrainedModelStats();
}
// Verify that the pipelines still work and inference is possible
testInfer(modelIds);
}
Expand Down

0 comments on commit da257fe

Please sign in to comment.