-
Notifications
You must be signed in to change notification settings - Fork 25k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ML] Relax assertion to expect at least on trained model #67710
[ML] Relax assertion to expect at least on trained model #67710
Conversation
... for data frame analytics native tests. This fixes assertion failures seen in elastic#67581. This commit also enables debug logging for `RegressionIT` and unmutes `test_stop_and_restart` in order to collect more information about why some times progress gets stuck after `loading_data`.
Pinging @elastic/ml-core (:ml) |
@elasticmachine update branch |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should make sure that only one. model is persisted. I think your new state machine changes might facilitate that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
assertThat("Hits were: " + Strings.toString(searchResponse.getHits()), searchResponse.getHits().getHits(), arrayWithSize(1)); | ||
// If the job is stopped during writing_results phase and it is then restarted, there is a chance two trained models | ||
// were persisted as there is no way currently for the process to be certain the model was persisted. | ||
assertThat("Hits were: " + Strings.toString(searchResponse.getHits()), searchResponse.getHits().getHits().length, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[optional] Another way to express this would be:
...getHits(), is(arrayWithSize(greaterThanOrEqualTo(1))));
We can ensure that when the job is run without problems. But when we stop/resume, it's not possible to guarantee that unless we do additional work. For example, we add a model checksum and when we read a model from the process we check if we already have a model with that checksum to avoid storing the same model twice. But that is quite an edge case. However, your comment @benwtrent made me realize I shouldn't relax the assertion for all tests, just the stop/restart tests. I'll update the PR. |
#67758) ... for data frame analytics native tests. This fixes assertion failures seen in #67581. This commit also enables debug logging for `RegressionIT` and unmutes `test_stop_and_restart` in order to collect more information about why some times progress gets stuck after `loading_data`. Backport of #67710
... for data frame analytics native tests. This fixes assertion
failures seen in #67581.
This commit also enables debug logging for
RegressionIT
andunmutes
test_stop_and_restart
in order to collect more informationabout why some times progress gets stuck after
loading_data
.