Skip to content

Commit

Permalink
[ML] Data Frame Analytics: Support early stopping data frame analytic…
Browse files Browse the repository at this point in the history
…s job parameter (#90695) (#90840)

* add support for early_stopping_enabled in cloning

* remove obsolete comment
  • Loading branch information
alvarezmelissa87 authored Feb 9, 2021
1 parent 277fe42 commit 8ddbaba
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,10 @@ const getAnalyticsJobMeta = (config: CloneDataFrameAnalyticsConfig): AnalyticsJo
optional: true,
defaultValue: 'maximize_minimum_recall',
},
early_stopping_enabled: {
optional: true,
ignore: true,
},
},
}
: {}),
Expand Down Expand Up @@ -207,6 +211,10 @@ const getAnalyticsJobMeta = (config: CloneDataFrameAnalyticsConfig): AnalyticsJo
loss_function_parameter: {
optional: true,
},
early_stopping_enabled: {
optional: true,
ignore: true,
},
},
}
: {}),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ export interface State {
destinationIndexNameEmpty: boolean;
destinationIndexNameValid: boolean;
destinationIndexPatternTitleExists: boolean;
earlyStoppingEnabled: undefined | boolean;
eta: undefined | number;
featureBagFraction: undefined | number;
featureInfluenceThreshold: undefined | number;
Expand Down Expand Up @@ -125,6 +126,7 @@ export const getInitialState = (): State => ({
destinationIndexNameEmpty: true,
destinationIndexNameValid: false,
destinationIndexPatternTitleExists: false,
earlyStoppingEnabled: undefined,
eta: undefined,
featureBagFraction: undefined,
featureInfluenceThreshold: undefined,
Expand Down Expand Up @@ -239,7 +241,10 @@ export const getJobConfigFromFormState = (
formState.gamma && { gamma: formState.gamma },
formState.lambda && { lambda: formState.lambda },
formState.maxTrees && { max_trees: formState.maxTrees },
formState.randomizeSeed && { randomize_seed: formState.randomizeSeed }
formState.randomizeSeed && { randomize_seed: formState.randomizeSeed },
formState.earlyStoppingEnabled !== undefined && {
early_stopping_enabled: formState.earlyStoppingEnabled,
}
);

jobConfig.analysis = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ export default function ({ getService }: FtrProviderContext) {
const esArchiver = getService('esArchiver');
const ml = getService('ml');

// Failing ES promotion, see https://github.com/elastic/kibana/issues/89980
describe.skip('jobs cloning supported by UI form', function () {
describe('jobs cloning supported by UI form', function () {
const testDataList: Array<{
suiteTitle: string;
archive: string;
Expand Down

0 comments on commit 8ddbaba

Please sign in to comment.