forked from Azure/azureml-examples
-
Notifications
You must be signed in to change notification settings - Fork 0
/
cli-responsibleaidashboard-housing-classification.yml
116 lines (105 loc) · 4.33 KB
/
cli-responsibleaidashboard-housing-classification.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
$schema: https://azuremlschemas.azureedge.net/latest/pipelineJob.schema.json
experiment_name: housing_dataset_analyze
type: pipeline
inputs:
target_column_name: 'Sold_HigherThan_Median'
my_training_data:
type: mltable
path: ./data-housing-classification/train
my_test_data:
type: mltable
path: ./data-housing-classification/test
outputs:
housing_model:
type: mlflow_model
mode: rw_mount
compute: azureml:cpu-cluster
jobs:
train_model:
type: command
component: file:./train_housing.yml
inputs:
training_data: ${{parent.inputs.my_training_data}}
target_column_name: ${{parent.inputs.target_column_name}}
categorical_features: '[]'
continuous_features: '["LotFrontage", "LotArea", "OverallQual", "OverallCond", "YearBuilt",
"YearRemodAdd", "BsmtUnfSF", "TotalBsmtSF", "Ce0tralAir", "1stFlrSF",
"2ndFlrSF", "LowQualFinSF", "GrLivArea", "BsmtFullBath", "BsmtHalfBath",
"FullBath", "HalfBath", "BedroomAbvGr", "KitchenAbvGr", "TotRmsAbvGrd",
"Fireplaces", "GarageYrBlt", "GarageCars", "GarageArea", "PavedDrive",
"WoodDeckSF", "OpenPorchSF", "EnclosedPorch", "3SsnPorch",
"ScreenPorch", "PoolArea", "YrSold"]'
model_name: 'housing_model'
outputs:
model_output: ${{parent.outputs.housing_model}}
create_rai_job:
type: command
component: azureml://registries/azureml/components/microsoft_azureml_rai_tabular_insight_constructor/versions/0.5.0
limits:
timeout: 120
inputs:
title: Housing Analysis
task_type: classification
model_info_path: ${{parent.jobs.train_model.outputs.model_output_json}}
train_dataset: ${{parent.inputs.my_training_data}}
test_dataset: ${{parent.inputs.my_test_data}}
target_column_name: ${{parent.inputs.target_column_name}}
categorical_column_names: '[]'
classes: '["Less than median", "More than median"]'
explain_01:
type: command
component: azureml://registries/azureml/components/microsoft_azureml_rai_tabular_explanation/versions/0.5.0
limits:
timeout: 120
inputs:
comment: Some random string
rai_insights_dashboard: ${{parent.jobs.create_rai_job.outputs.rai_insights_dashboard}}
causal_01:
type: command
component: azureml://registries/azureml/components/microsoft_azureml_rai_tabular_causal/versions/0.5.0
limits:
timeout: 120
inputs:
rai_insights_dashboard: ${{parent.jobs.create_rai_job.outputs.rai_insights_dashboard}}
treatment_features: '["OverallCond", "OverallQual", "Fireplaces", "GarageCars", "ScreenPorch"]'
heterogeneity_features: '[]'
nuisance_model: linear
skip_cat_limit_checks: True
counterfactual_01:
type: command
component: azureml://registries/azureml/components/microsoft_azureml_rai_tabular_counterfactual/versions/0.5.0
limits:
timeout: 600
inputs:
rai_insights_dashboard: ${{parent.jobs.create_rai_job.outputs.rai_insights_dashboard}}
total_CFs: 10
desired_class: "opposite"
feature_importance: True
error_analysis_01:
limits:
timeout: 120
type: command
component: azureml://registries/azureml/components/microsoft_azureml_rai_tabular_erroranalysis/versions/0.5.0
inputs:
rai_insights_dashboard: ${{parent.jobs.create_rai_job.outputs.rai_insights_dashboard}}
max_depth: 3
gather_01:
type: command
component: azureml://registries/azureml/components/microsoft_azureml_rai_tabular_insight_gather/versions/0.5.0
limits:
timeout: 120
inputs:
constructor: ${{parent.jobs.create_rai_job.outputs.rai_insights_dashboard}}
insight_1: ${{parent.jobs.causal_01.outputs.causal}}
insight_2: ${{parent.jobs.counterfactual_01.outputs.counterfactual}}
insight_3: ${{parent.jobs.error_analysis_01.outputs.error_analysis}}
insight_4: ${{parent.jobs.explain_01.outputs.explanation}}
scorecard_01:
type: command
component: azureml://registries/azureml/components/microsoft_azureml_rai_tabular_score_card/versions/0.5.0
inputs:
dashboard: ${{parent.jobs.gather_01.outputs.dashboard}}
pdf_generation_config:
type: uri_file
path: ./housing_analyze_scorecard_config/pdf_gen.json
mode: download