[ML] MML calculator enhancements for multi-metric job wizard (#54573)
* [ML] fix fieldNames provided to calculateModelMemoryLimit * [ML] calculateModelMemoryLimit when the influencers are changed
This commit is contained in:
parent
7c4a531ae7
commit
9a871d2a7a
|
@ -92,12 +92,11 @@ export class MultiMetricJobCreator extends JobCreator {
|
|||
// not split field, use the default
|
||||
this.modelMemoryLimit = DEFAULT_MODEL_MEMORY_LIMIT;
|
||||
} else {
|
||||
const fieldNames = this._detectors.map(d => d.field_name).filter(fn => fn !== undefined);
|
||||
const { modelMemoryLimit } = await ml.calculateModelMemoryLimit({
|
||||
indexPattern: this._indexPatternTitle,
|
||||
splitFieldName: this._splitField.name,
|
||||
query: this._datafeed_config.query,
|
||||
fieldNames,
|
||||
fieldNames: this.fields.map(f => f.id),
|
||||
influencerNames: this._influencers,
|
||||
timeFieldName: this._job_config.data_description.time_field,
|
||||
earliestMs: this._start,
|
||||
|
|
|
@ -25,6 +25,9 @@ export const Influencers: FC = () => {
|
|||
useEffect(() => {
|
||||
jobCreator.removeAllInfluencers();
|
||||
influencers.forEach(i => jobCreator.addInfluencer(i));
|
||||
if (jobCreator instanceof MultiMetricJobCreator) {
|
||||
jobCreator.calculateModelMemoryLimit();
|
||||
}
|
||||
jobCreatorUpdate();
|
||||
}, [influencers.join()]);
|
||||
|
||||
|
|
Loading…
Reference in a new issue