Skip to content

Commit

Permalink
[ML] Apply a default model memory limit of 50mb.
Browse files Browse the repository at this point in the history
  • Loading branch information
walterra committed Aug 27, 2019
1 parent 405b47b commit 1888b6e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
6 changes: 6 additions & 0 deletions x-pack/legacy/plugins/ml/common/types/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,9 @@ export interface Dictionary<TValue> {
export function dictionaryToArray<TValue>(dict: Dictionary<TValue>): TValue[] {
return Object.keys(dict).map(key => dict[key]);
}

// A recursive partial type to allow passing nested partial attributes.
// Used for example for the optional `jobConfig.dest.results_field` property.
export type DeepPartial<T> = {
[P in keyof T]?: DeepPartial<T[P]>;
};
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,12 @@
* you may not use this file except in compliance with the Elastic License.
*/

import { DeepPartial } from '../../../../../../common/types/common';
import { checkPermission } from '../../../../../privilege/check_privilege';

import { DataFrameAnalyticsId, DataFrameAnalyticsOutlierConfig } from '../../../../common';

// A recursive partial type to allow passing nested partial attributes.
// Used for example for the optional `jobConfig.dest.results_field` property.
type DeepPartial<T> = {
[P in keyof T]?: DeepPartial<T[P]>;
};
const ANALYTICS_DETAULT_MODEL_MEMORY_LIMIT = '50mb';

export type EsIndexName = string;
export type IndexPatternTitle = string;
Expand Down Expand Up @@ -105,5 +102,6 @@ export const getJobConfigFromFormState = (
analysis: {
outlier_detection: {},
},
model_memory_limit: ANALYTICS_DETAULT_MODEL_MEMORY_LIMIT,
};
};

0 comments on commit 1888b6e

Please sign in to comment.