Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[8.0] [ML] Functional tests - stabilize and re-enable feature importance tests (#117503) #117625

Merged
merged 1 commit into from
Nov 5, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ export default function ({ getService }: FtrProviderContext) {
const esArchiver = getService('esArchiver');
const ml = getService('ml');

// FLAKY: https://github.com/elastic/kibana/issues/116078
describe.skip('total feature importance panel and decision path popover', function () {
describe('total feature importance panel and decision path popover', function () {
const testDataList: Array<{
suiteTitle: string;
archive: string;
Expand Down Expand Up @@ -64,6 +63,7 @@ export default function ({ getService }: FtrProviderContext) {
training_percent: 35,
prediction_field_name: 'CentralAir_prediction',
num_top_classes: -1,
max_trees: 10,
},
},
model_memory_limit: '60mb',
Expand Down Expand Up @@ -109,6 +109,7 @@ export default function ({ getService }: FtrProviderContext) {
training_percent: 35,
prediction_field_name: 'heatingqc',
num_top_classes: -1,
max_trees: 10,
},
},
model_memory_limit: '60mb',
Expand Down Expand Up @@ -140,6 +141,7 @@ export default function ({ getService }: FtrProviderContext) {
dependent_variable: 'stab',
num_top_feature_importance_values: 5,
training_percent: 35,
max_trees: 10,
},
},
analyzed_fields: {
Expand Down
29 changes: 29 additions & 0 deletions x-pack/test/functional/services/ml/data_frame_analytics_results.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ export function MachineLearningDataFrameAnalyticsResultsProvider(

async assertTotalFeatureImportanceEvaluatePanelExists() {
await testSubjects.existOrFail('mlDFExpandableSection-FeatureImportanceSummary');
await this.scrollFeatureImportanceIntoView();
await testSubjects.existOrFail('mlTotalFeatureImportanceChart', { timeout: 30 * 1000 });
},

Expand Down Expand Up @@ -213,5 +214,33 @@ export function MachineLearningDataFrameAnalyticsResultsProvider(
expect(buttonVisible).to.equal(true, 'Expected data grid cell button to be visible');
});
},

async scrollContentSectionIntoView(sectionId: string) {
await testSubjects.scrollIntoView(`mlDFExpandableSection-${sectionId}`);
},

async scrollAnalysisIntoView() {
await this.scrollContentSectionIntoView('analysis');
},

async scrollRegressionEvaluationIntoView() {
await this.scrollContentSectionIntoView('RegressionEvaluation');
},

async scrollClassificationEvaluationIntoView() {
await this.scrollContentSectionIntoView('ClassificationEvaluation');
},

async scrollFeatureImportanceIntoView() {
await this.scrollContentSectionIntoView('FeatureImportanceSummary');
},

async scrollScatterplotMatrixIntoView() {
await this.scrollContentSectionIntoView('splom');
},

async scrollResultsIntoView() {
await this.scrollContentSectionIntoView('results');
},
};
}