Skip to content

[ML] Job validation won't report an error when categorization job is using mlcategory#21075

Merged
walterra merged 1 commit intoelastic:masterfrom
walterra:ml-job-validation-categorization
Jul 23, 2018
Merged

[ML] Job validation won't report an error when categorization job is using mlcategory#21075
walterra merged 1 commit intoelastic:masterfrom
walterra:ml-job-validation-categorization

Conversation

@walterra
Copy link
Contributor

Fixes #20867.

For categorization jobs, job validation would report that mlcategory isn't an aggregatable field.

This fix checks the job configuration and only reports the error if the job config isn't using categorization_field_name and the detector field isn't set to mlcategory.

@walterra walterra added bug Fixes for quality problems that affect the customer experience v7.0.0 v6.4.0 :ml Feature:Anomaly Detection ML anomaly detection labels Jul 23, 2018
@walterra walterra self-assigned this Jul 23, 2018
@elasticmachine
Copy link
Contributor

Pinging @elastic/ml-ui

Copy link
Member

@jgowdyelastic jgowdyelastic left a comment

Choose a reason for hiding this comment

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

LGTM

// then don't report the field as not being able to be aggregated.
if (!(
typeof job.analysis_config.categorization_field_name !== 'undefined' &&
uniqueFieldName === 'mlcategory'
Copy link
Member

Choose a reason for hiding this comment

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

the mlcategory string is repeated a lot throughout our code base. It would probably be better as a constant.
Out of scope for this PR, just mentioning it.

@elasticmachine
Copy link
Contributor

💔 Build Failed

@walterra
Copy link
Contributor Author

retest

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

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@walterra walterra merged commit e503b87 into elastic:master Jul 23, 2018
@walterra walterra deleted the ml-job-validation-categorization branch July 23, 2018 12:37
walterra added a commit to walterra/kibana that referenced this pull request Jul 23, 2018
…b is properly setup. (elastic#21075)

For categorization jobs, job validation would report that mlcategory isn't an aggregatable field. This fix checks the job configuration and only reports the error if the job config isn't using categorization_field_name and the detector field isn't set to mlcategory.
walterra added a commit that referenced this pull request Jul 23, 2018
…b is properly setup. (#21075) (#21082)

For categorization jobs, job validation would report that mlcategory isn't an aggregatable field. This fix checks the job configuration and only reports the error if the job config isn't using categorization_field_name and the detector field isn't set to mlcategory.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Fixes for quality problems that affect the customer experience Feature:Anomaly Detection ML anomaly detection :ml v6.4.0 v7.0.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[ML] "Validate job" doesn't work for jobs using categorization

4 participants