forked from Azure/azureml-examples
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pipeline.yml
80 lines (73 loc) · 2.34 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
$schema: https://azuremlschemas.azureedge.net/latest/pipelineJob.schema.json
type: pipeline
description: Pipeline using AutoML Image Object Detection task
display_name: pipeline-with-image-object-detection
experiment_name: pipeline-with-automl
settings:
default_compute: azureml:gpu-cluster
inputs:
image_object_detection_training_data:
type: mltable
# Update the path, if prepare_data.py is using data_path other than "./data"
path: data/training-mltable-folder
image_object_detection_validation_data:
type: mltable
# Update the path, if prepare_data.py is using data_path other than "./data"
path: data/validation-mltable-folder
jobs:
image_object_detection_node:
type: automl
task: image_object_detection
log_verbosity: info
primary_metric: mean_average_precision
limits:
timeout_minutes: 180
max_trials: 10
max_concurrent_trials: 2
target_column_name: label
training_data: ${{parent.inputs.image_object_detection_training_data}}
validation_data: ${{parent.inputs.image_object_detection_validation_data}}
training_parameters:
early_stopping: True
evaluation_frequency: 1
sweep:
sampling_algorithm: random
early_termination:
type: bandit
evaluation_interval: 2
slack_factor: 0.2
delay_evaluation: 6
search_space:
- model_name:
type: choice
values: [yolov5]
learning_rate:
type: uniform
min_value: 0.0001
max_value: 0.001
model_size:
type: choice
values: ['small', 'medium']
- model_name:
type: choice
values: [fasterrcnn_resnet50_fpn]
learning_rate:
type: uniform
min_value: 0.0001
max_value: 0.001
optimizer:
type: choice
values: ['sgd', 'adam', 'adamw']
min_size:
type: choice
values: [600, 800]
# currently need to specify outputs "mlflow_model" explicitly to reference it in following nodes
outputs:
best_model:
type: mlflow_model
register_model_node:
type: command
component: file:./components/component_register_model.yaml
inputs:
model_input_path: ${{parent.jobs.image_object_detection_node.outputs.best_model}}
model_base_name: fridge_items_object_detection_model