forked from kubeflow/katib
-
Notifications
You must be signed in to change notification settings - Fork 0
/
simple-pbt.yaml
53 lines (53 loc) · 1.36 KB
/
simple-pbt.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
---
apiVersion: kubeflow.org/v1beta1
kind: Experiment
metadata:
namespace: kubeflow
name: simple-pbt
spec:
maxTrialCount: 2
parallelTrialCount: 2
maxFailedTrialCount: 3
resumePolicy: FromVolume
objective:
type: maximize
goal: 0.99
objectiveMetricName: Validation-accuracy
algorithm:
algorithmName: pbt
algorithmSettings:
- name: suggestion_trial_dir
value: /var/log/katib/checkpoints/
- name: n_population
value: '40'
- name: truncation_threshold
value: '0.2'
parameters:
- name: lr
parameterType: double
feasibleSpace:
min: '0.0001'
max: '0.02'
step: '0.0001'
trialTemplate:
primaryContainerName: training-container
trialParameters:
- name: learningRate
description: Learning rate for training the model
reference: lr
trialSpec:
apiVersion: batch/v1
kind: Job
spec:
template:
spec:
containers:
- name: training-container
image: docker.io/kubeflowkatib/simple-pbt:latest
command:
- "python3"
- "/opt/pbt/pbt_test.py"
- "--epochs=20"
- "--lr=${trialParameters.learningRate}"
- "--checkpoint=/var/log/katib/checkpoints/"
restartPolicy: Never