Skip to content

[ML] Job creator service#38083

Merged
jgowdyelastic merged 25 commits intoelastic:feature-new-ml-job-wizardsfrom
jgowdyelastic:job-creator-service2
Jun 6, 2019
Merged

[ML] Job creator service#38083
jgowdyelastic merged 25 commits intoelastic:feature-new-ml-job-wizardsfrom
jgowdyelastic:job-creator-service2

Conversation

@jgowdyelastic
Copy link
Member

Summary

A small collection of classes for creating and running jobs which will be used by all new job creation pages.
Example usage:

const jobCreator = new MultiMetricJobCreator(
  indexPattern,
  savedSearch,
  query
);
jobCreator.addDetector(mean, field); // agg and field objects not shown here
jobCreator.setSplitField(splitField); // splitField object not shown here
jobCreator.bucketSpan = '15m';
jobCreator.setDuration(1540684800000, 1541943060000);
jobCreator.jobId = 'my_new_job';
jobCreator.subscribeToProgress((p: number) => {
  console.log('progress ', p); // log out the progress as the job is run
});
await jobCreator.createAndStartJob();

The job progress is broadcast using an observable, chart elements will subscribe so they can update themselves as the job is running.
Single, multi and population job creators each extend the base JobCreator class and implement the detector creation methods in their own way.

TODO in follow up PR:

  • Improve job creation and starting error handling
  • Add tests

@jgowdyelastic jgowdyelastic added review :ml v8.0.0 release_note:skip Skip the PR/issue when compiling release notes v7.3.0 labels Jun 5, 2019
@jgowdyelastic jgowdyelastic requested a review from a team as a code owner June 5, 2019 09:37
@jgowdyelastic jgowdyelastic self-assigned this Jun 5, 2019
@elasticmachine
Copy link
Contributor

Pinging @elastic/ml-ui

Copy link
Contributor

@peteharverson peteharverson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jgowdyelastic
Copy link
Member Author

retest

@elasticmachine
Copy link
Contributor

💔 Build Failed

Copy link
Contributor

@alvarezmelissa87 alvarezmelissa87 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM ⚡️

@elasticmachine
Copy link
Contributor

💔 Build Failed

@jgowdyelastic jgowdyelastic force-pushed the job-creator-service2 branch from 0d1e1a6 to d06994d Compare June 5, 2019 14:21
@elasticmachine
Copy link
Contributor

💔 Build Failed

@jgowdyelastic
Copy link
Member Author

retest

@elasticmachine
Copy link
Contributor

💔 Build Failed

@jgowdyelastic
Copy link
Member Author

retest

@elasticmachine
Copy link
Contributor

💔 Build Failed

@jgowdyelastic
Copy link
Member Author

retest

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@elasticmachine
Copy link
Contributor

💔 Build Failed

@jgowdyelastic
Copy link
Member Author

retest

@jgowdyelastic jgowdyelastic force-pushed the job-creator-service2 branch from 880997e to 49fbc41 Compare June 6, 2019 10:32
@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@jgowdyelastic jgowdyelastic merged commit 4f79ae6 into elastic:feature-new-ml-job-wizards Jun 6, 2019
@jgowdyelastic jgowdyelastic deleted the job-creator-service2 branch June 6, 2019 11:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:ml release_note:skip Skip the PR/issue when compiling release notes review v7.3.0 v8.0.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants