forked from Azure/azureml-examples
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pipeline.yml
91 lines (83 loc) · 2.58 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
$schema: https://azuremlschemas.azureedge.net/latest/pipelineJob.schema.json
type: pipeline
display_name: image_classification_with_densenet
description: Train densenet for image classification
# <jobs>
settings:
default_datastore: azureml:workspaceblobstore
default_compute: azureml:cpu-cluster
continue_on_step_failure: false
jobs:
convert_training_image:
type: command
component: ./convert_to_image_directory/entry.spec.yaml
inputs:
input_path:
type: uri_folder
path: ./data/train
convert_evaluation_image:
type: command
component: ./convert_to_image_directory/entry.spec.yaml
inputs:
input_path:
type: uri_folder
path: ./data/val
init_transformation:
type: command
component: ./init_image_transformation/entry.spec.yaml
inputs:
resize: "False"
size: 256
center_crop: 224
pad: "False"
padding: 0
color_jitter: "False"
grayscale: "False"
random_resized_crop: "False"
random_resized_crop_size: 256
random_crop: "False"
random_crop_size: 224
random_horizontal_flip: "True"
random_vertical_flip: "True"
random_rotation: "False"
random_rotation_degrees: 0
random_affine: "False"
random_affine_degrees: 0
random_grayscale: "False"
random_perspective: "False"
transform_on_training_image:
type: command
component: ./apply_image_transformation/entry.spec.yaml
inputs:
mode: "For training"
input_image_transform_path: ${{parent.jobs.init_transformation.outputs.output_path}}
input_image_dir_path: ${{parent.jobs.convert_training_image.outputs.output_path}}
transform_on_evaluation_image:
type: command
component: ./apply_image_transformation/entry.spec.yaml
inputs:
mode: "For inference"
input_image_transform_path: ${{parent.jobs.init_transformation.outputs.output_path}}
input_image_dir_path: ${{parent.jobs.convert_evaluation_image.outputs.output_path}}
train:
type: command
component: ./image_cnn_train/entry.spec.yaml
compute: azureml:gpu-cluster
inputs:
train_data: ${{parent.jobs.transform_on_training_image.outputs.output_path}}
valid_data: ${{parent.jobs.transform_on_evaluation_image.outputs.output_path}}
data_backend: "pytorch"
epochs: 4
seed: 123
batch_size: 16
save_checkpoint_epochs: 2
outputs:
workspace:
type: uri_folder
mode: upload
distribution:
type: mpi
process_count_per_instance: 1
resources:
instance_count: 2
# </jobs>