[7.x] [ML] fixing testTwoJobsWithSameRandomizeSeedUseSameTrainingSet tests (#62976) (#62999)

* [ML] fixing testTwoJobsWithSameRandomizeSeedUseSameTrainingSet tests (#62976)

This fixes the two test failures.

The shard failure seems to be due to the .ml-stats index being in the middle of being created.
This commit is contained in:
Benjamin Trent 2020-09-29 08:12:20 -04:00 committed by GitHub
parent 154a0c00b7
commit 2b9032a07d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 9 deletions

View File

@ -643,6 +643,8 @@ public class ClassificationIT extends MlNativeDataFrameAnalyticsIntegTestCase {
DataFrameAnalyticsConfig firstJob = buildAnalytics(firstJobId, sourceIndex, firstJobDestIndex, null, DataFrameAnalyticsConfig firstJob = buildAnalytics(firstJobId, sourceIndex, firstJobDestIndex, null,
new Classification(dependentVariable, boostedTreeParams, null, null, 1, 50.0, null, null)); new Classification(dependentVariable, boostedTreeParams, null, null, 1, 50.0, null, null));
putAnalytics(firstJob); putAnalytics(firstJob);
startAnalytics(firstJobId);
waitUntilAnalyticsIsStopped(firstJobId);
String secondJobId = "classification_two_jobs_with_same_randomize_seed_2"; String secondJobId = "classification_two_jobs_with_same_randomize_seed_2";
String secondJobDestIndex = secondJobId + "_dest"; String secondJobDestIndex = secondJobId + "_dest";
@ -652,11 +654,7 @@ public class ClassificationIT extends MlNativeDataFrameAnalyticsIntegTestCase {
new Classification(dependentVariable, boostedTreeParams, null, null, 1, 50.0, randomizeSeed, null)); new Classification(dependentVariable, boostedTreeParams, null, null, 1, 50.0, randomizeSeed, null));
putAnalytics(secondJob); putAnalytics(secondJob);
// Let's run both jobs in parallel and wait until they are finished
startAnalytics(firstJobId);
startAnalytics(secondJobId); startAnalytics(secondJobId);
waitUntilAnalyticsIsStopped(firstJobId);
waitUntilAnalyticsIsStopped(secondJobId); waitUntilAnalyticsIsStopped(secondJobId);
// Now we compare they both used the same training rows // Now we compare they both used the same training rows

View File

@ -324,7 +324,6 @@ public class RegressionIT extends MlNativeDataFrameAnalyticsIntegTestCase {
assertMlResultsFieldMappings(destIndex, predictedClassField, "double"); assertMlResultsFieldMappings(destIndex, predictedClassField, "double");
} }
@AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/55807")
public void testTwoJobsWithSameRandomizeSeedUseSameTrainingSet() throws Exception { public void testTwoJobsWithSameRandomizeSeedUseSameTrainingSet() throws Exception {
String sourceIndex = "regression_two_jobs_with_same_randomize_seed_source"; String sourceIndex = "regression_two_jobs_with_same_randomize_seed_source";
indexData(sourceIndex, 100, 0); indexData(sourceIndex, 100, 0);
@ -343,6 +342,8 @@ public class RegressionIT extends MlNativeDataFrameAnalyticsIntegTestCase {
DataFrameAnalyticsConfig firstJob = buildAnalytics(firstJobId, sourceIndex, firstJobDestIndex, null, DataFrameAnalyticsConfig firstJob = buildAnalytics(firstJobId, sourceIndex, firstJobDestIndex, null,
new Regression(DEPENDENT_VARIABLE_FIELD, boostedTreeParams, null, 50.0, null, null, null, null)); new Regression(DEPENDENT_VARIABLE_FIELD, boostedTreeParams, null, 50.0, null, null, null, null));
putAnalytics(firstJob); putAnalytics(firstJob);
startAnalytics(firstJobId);
waitUntilAnalyticsIsStopped(firstJobId);
String secondJobId = "regression_two_jobs_with_same_randomize_seed_2"; String secondJobId = "regression_two_jobs_with_same_randomize_seed_2";
String secondJobDestIndex = secondJobId + "_dest"; String secondJobDestIndex = secondJobId + "_dest";
@ -352,11 +353,7 @@ public class RegressionIT extends MlNativeDataFrameAnalyticsIntegTestCase {
new Regression(DEPENDENT_VARIABLE_FIELD, boostedTreeParams, null, 50.0, randomizeSeed, null, null, null)); new Regression(DEPENDENT_VARIABLE_FIELD, boostedTreeParams, null, 50.0, randomizeSeed, null, null, null));
putAnalytics(secondJob); putAnalytics(secondJob);
// Let's run both jobs in parallel and wait until they are finished
startAnalytics(firstJobId);
startAnalytics(secondJobId); startAnalytics(secondJobId);
waitUntilAnalyticsIsStopped(firstJobId);
waitUntilAnalyticsIsStopped(secondJobId); waitUntilAnalyticsIsStopped(secondJobId);
// Now we compare they both used the same training rows // Now we compare they both used the same training rows