-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpytorch_mnist.yaml
61 lines (60 loc) · 1.43 KB
/
pytorch_mnist.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
59
60
61
apiVersion: "kubeflow.org/v1alpha1"
kind: StudyJob
metadata:
namespace: kubeflow
labels:
controller-tools.k8s.io: "1.0"
name: pytorchmnist
spec:
studyName: pytorchmnist
owner: crd
optimizationtype: maximize
objectivevaluename: Validation-accuracy
optimizationgoal: 0.99
requestcount: 4
metricsnames:
- accuracy
parameterconfigs:
- name: --lr
parametertype: double
feasible:
min: "0.01"
max: "0.03"
- name: --num-layers
parametertype: int
feasible:
min: "2"
max: "5"
- name: --optimizer
parametertype: categorical
feasible:
list:
- sgd
- adam
- ftrl
workerSpec:
goTemplate:
rawTemplate: |-
apiVersion: batch/v1
kind: Job
metadata:
name: {{.WorkerID}}
namespace: kubeflow
spec:
template:
spec:
containers:
- name: pytorch
image: gcr.io/kubeflow-ci/pytorch-dist-mnist-test:v1.0
command:
- "python"
- "pytorch_mnist/train_mnist.py"
{{- with .HyperParameters}}
{{- range .}}
- "{{.Name}}={{.Value}}"
{{- end}}
{{- end}}
restartPolicy: Never
suggestionSpec:
suggestionAlgorithm: "random"
requestNumber: 3