Commit c0e0bda
authored
[ML] Fix Non-Deterministic Training Set Selection in RegressionIT testTwoJobsWithSameRandomizeSeedUseSameTrainingSet (#138063)
The test testTwoJobsWithSameRandomizeSeedUseSameTrainingSet fails intermittently because documents may be processed in different orders during reindexing. Since we use an online reservoir sampling algorithm, this order actually matters. To ensure deterministic reindexing of the document sequence, both the number of shards and the number of segments must be 1.
This PR fixes the test by creating the source index with only 1 segment. This ensures deterministic document order during reindexing, resulting in consistent ID assignments and training set selection when using the same seed.
Fixes #1178051 parent c560ee0 commit c0e0bda
File tree
2 files changed
+3
-3
lines changed- x-pack/plugin/ml/qa/native-multi-node-tests/src/javaRestTest/java/org/elasticsearch/xpack/ml/integration
2 files changed
+3
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | 61 | | |
65 | 62 | | |
66 | 63 | | |
| |||
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
361 | 361 | | |
362 | 362 | | |
363 | 363 | | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
364 | 367 | | |
365 | 368 | | |
366 | 369 | | |
| |||
0 commit comments