-
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] Persist/restore state for DFA classification #50040
[ML] Persist/restore state for DFA classification #50040
Conversation
Pinging @elastic/ml-core (:ml) |
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
} | ||
|
||
@Override | ||
public String getStateDocId(String jobId) { | ||
throw new UnsupportedOperationException(); | ||
// The state doc id prefix is same as for regression | ||
return jobId + "_regression_state#1"; |
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.
Shouldn't it be "_classification_state" instead?
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.
I wasn't sure whether the underlying state was similar so I ignored this. However, after talking to @tveasey about it we decided it'd be clearer to distinguish between them. So, I'll be raising a PR to address this in the c++ side. Thanks for raising it!
@@ -444,4 +448,12 @@ private static void indexData(String sourceIndex, int numTrainingRows, int numNo | |||
assertThat(confusionMatrixResult.getOtherActualClassCount(), equalTo(0L)); | |||
} | |||
} | |||
|
|||
private static void assertModelStatePersisted(String jobId) { |
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.
Is it the same method as in RegressionIT
? If so, it could be moved to MlNativeDataFrameAnalyticsIntegTestCase
, just like assertInferenceModelPersisted
.
This commit enables restoring state for data frame analytics classification jobs.
2c21868
to
c66bc6b
Compare
@droberts195, @przemekwitek I have adjusted the PR to handle different suffix per analysis for the state doc ids. Could you please take another look? |
run elasticsearch-ci/2 |
run elasticsearch-ci/packaging-sample-matrix |
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
It would be good to delete orphaned data frame analytics state documents in the nightly maintenance in a followup PR.
This commit adds state persist/restore for data frame analytics classification jobs. Backport of elastic#50040
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
This commit adds state persist/restore for data frame analytics classification jobs.
This commit adds state persist/restore for data frame analytics classification jobs.