-
Notifications
You must be signed in to change notification settings - Fork 1.6k
/
ax_train_component.yaml
58 lines (55 loc) · 2.23 KB
/
ax_train_component.yaml
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
#!/usr/bin/env/python3
# Copyright (c) Facebook, Inc. and its affiliates.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
name: Training
description: |
Pytorch training
inputs:
- {name: input_data, description: 'Input dataset path'}
- {name: script_args, description: 'Arguments to the cifar script'}
- {name: ptl_arguments, description: 'Arguments to pytorch lightning Trainer'}
- {name: trial_id, type: Integer, description: 'Trial Id'}
- {name: model_parameters, type: JsonObject, description: 'Model parameters for trainer'}
- {name: results, type: String, description: 'Path to write training results'}
outputs:
- {name: tensorboard_root, description: 'Tensorboard output path'}
- {name: checkpoint_dir, description: 'Model checkpoint output'}
- {name: MLPipeline UI Metadata, description: 'MLPipeline UI Metadata output'}
- {name: MLPipeline Metrics, description: 'MLPipeline Metrics output'}
implementation:
container:
# For GPU use
# image: public.ecr.aws/pytorch-samples/kfp_samples:latest-gpu
image: "docker image name" # Ex: public.ecr.aws/pytorch-samples/kfp_samples:latest
command: ["command to execute"] # Ex: ['python3', 'cifar10/cifar10_pytorch.py']
args:
- --dataset_path
- {inputPath: input_data}
- --tensorboard_root
- {outputPath: tensorboard_root}
- --checkpoint_dir
- {outputPath: checkpoint_dir}
- --mlpipeline_ui_metadata
- {outputPath: MLPipeline UI Metadata}
- --mlpipeline_metrics
- { outputPath: MLPipeline Metrics}
- --script_args
- { inputValue: script_args }
- --ptl_args
- { inputValue: ptl_arguments }
- --trial_id
- { inputValue: trial_id }
- --model_params
- { inputValue: model_parameters }
- --results
- { inputValue: results }