forked from Azure/azureml-examples
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathpipeline.yml
92 lines (80 loc) · 3.18 KB
/
pipeline.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
$schema: https://azuremlschemas.azureedge.net/latest/pipelineJob.schema.json
display_name: rai_pipeline_adult_analyse
experiment_name: rai_pipeline_adult_analyse
description: Sample rai pipeline
type: pipeline
inputs:
target_column_name: income
my_test_data:
type: uri_file
path: azureml:adult_test_pq:1
mode: download
settings:
default_datastore: azureml:workspaceblobstore
default_compute: azureml:cpu-cluster
continue_on_step_failure: false
jobs:
train_model_job:
type: command
component: ./components/component_train_logreg.yaml
inputs:
training_data:
type: uri_file
path: azureml:adult_train_pq:1
mode: download
target_column_name: ${{parent.inputs.target_column_name}}
register_model_job:
type: command
component: ./components/component_register_model.yaml
inputs:
model_input_path: ${{parent.jobs.train_model_job.outputs.model_output}}
model_base_name: component_registered_lr_01
create_rai_job:
type: command
component: ./components/component_rai_insights.yaml
inputs:
title: With just the OSS
task_type: classification
model_info_path: ${{parent.jobs.register_model_job.outputs.model_info_output_path}}
train_dataset:
type: uri_file
path: azureml:adult_train_pq:1
mode: download
test_dataset: ${{parent.inputs.my_test_data}}
target_column_name: ${{parent.inputs.target_column_name}}
categorical_column_names: '["Race", "Sex", "Workclass", "Marital Status", "Country", "Occupation"]'
explain_01:
type: command
component: ./components/component_explain.yaml #azureml:rai_insights_explanation:1
inputs:
comment: Some random string
rai_insights_dashboard: ${{parent.jobs.create_rai_job.outputs.rai_insights_dashboard}}
causal_01:
type: command
component: ./components/component_causal.yaml
inputs:
rai_insights_dashboard: ${{parent.jobs.create_rai_job.outputs.rai_insights_dashboard}}
treatment_features: '["Age", "Sex"]'
heterogeneity_features: '["Marital Status"]'
counterfactual_01:
type: command
component: ./components/component_counterfactual.yaml # azureml:rai_insights_counterfactual:1
inputs:
rai_insights_dashboard: ${{parent.jobs.create_rai_job.outputs.rai_insights_dashboard}}
total_CFs: 10
desired_class: opposite
error_analysis_01:
type: command
component: ./components/component_error_analysis.yaml # azureml:rai_insights_erroranalysis:1
inputs:
rai_insights_dashboard: ${{parent.jobs.create_rai_job.outputs.rai_insights_dashboard}}
filter_features: '["Race", "Sex", "Workclass", "Marital Status", "Country", "Occupation"]'
gather_01:
type: command
component: ./components/component_gather_rai_insights.yaml # azureml:rai_insights_gather:1
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}}