[7.x][ML] Skip test inference if DFA task has been stopped (#60116) (#60127)

If the job is stopped before starting inference on test data, we
should skip inference entirely.

Backport of #60116
This commit is contained in:
Dimitris Athanasiou 2020-07-23 18:34:09 +03:00 committed by GitHub
parent ca25f6ae6f
commit 6b9a362ec2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -323,8 +323,8 @@ public class AnalyticsProcessManager {
private void runInference(ParentTaskAssigningClient parentTaskClient, DataFrameAnalyticsTask task, ProcessContext processContext,
ExtractedFields extractedFields) {
if (processContext.failureReason.get() != null) {
// If there has been an error thus far let's not run inference at all
if (task.isStopping() || processContext.failureReason.get() != null) {
// If the task is stopping or there has been an error thus far let's not run inference at all
return;
}