This repository has been archived by the owner on Oct 23, 2024. It is now read-only.
forked from kubeflow/katib
-
Notifications
You must be signed in to change notification settings - Fork 0
/
xgboostjob-lightgbm.yaml
118 lines (118 loc) · 4.02 KB
/
xgboostjob-lightgbm.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
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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
apiVersion: kubeflow.org/v1beta1
kind: Experiment
metadata:
namespace: kubeflow
name: xgboostjob-lightgbm
spec:
objective:
type: maximize
goal: 0.99
objectiveMetricName: valid_1 auc
additionalMetricNames:
- valid_1 binary_logloss
- training auc
- training binary_logloss
metricsCollectorSpec:
source:
filter:
metricsFormat:
- "(\\w+\\s\\w+)\\s:\\s((-?\\d+)(\\.\\d+)?)"
algorithm:
algorithmName: random
parallelTrialCount: 2
maxTrialCount: 6
maxFailedTrialCount: 3
parameters:
- name: lr
parameterType: double
feasibleSpace:
min: "0.01"
max: "0.1"
- name: num-leaves
parameterType: int
feasibleSpace:
min: "50"
max: "60"
step: "1"
trialTemplate:
primaryContainerName: xgboost
trialParameters:
- name: learningRate
description: Learning rate for the training model
reference: lr
- name: numberLeaves
description: Number of leaves for one tree
reference: num-leaves
trialSpec:
apiVersion: kubeflow.org/v1
kind: XGBoostJob
spec:
xgbReplicaSpecs:
Master:
replicas: 1
restartPolicy: Never
template:
spec:
containers:
- name: xgboost
image: docker.io/kubeflowkatib/xgboost-lightgbm:1.0
ports:
- containerPort: 9991
name: xgboostjob-port
imagePullPolicy: Always
args:
- --job_type=Train
- --metric=binary_logloss,auc
- --learning_rate=${trialParameters.learningRate}
- --num_leaves=${trialParameters.numberLeaves}
- --num_trees=100
- --boosting_type=gbdt
- --objective=binary
- --metric_freq=1
- --is_training_metric=true
- --max_bin=255
- --data=data/binary.train
- --valid_data=data/binary.test
- --tree_learner=feature
- --feature_fraction=0.8
- --bagging_freq=5
- --bagging_fraction=0.8
- --min_data_in_leaf=50
- --min_sum_hessian_in_leaf=50
- --is_enable_sparse=true
- --use_two_round_loading=false
- --is_save_binary_file=false
Worker:
replicas: 2
restartPolicy: ExitCode
template:
spec:
containers:
- name: xgboost
image: docker.io/kubeflowkatib/xgboost-lightgbm:1.0
ports:
- containerPort: 9991
name: xgboostjob-port
imagePullPolicy: Always
args:
- --job_type=Train
- --metric=binary_logloss,auc
- --learning_rate=${trialParameters.learningRate}
- --num_leaves=${trialParameters.numberLeaves}
- --num_trees=100
- --boosting_type=gbdt
- --objective=binary
- --metric_freq=1
- --is_training_metric=true
- --max_bin=255
- --data=data/binary.train
- --valid_data=data/binary.test
- --tree_learner=feature
- --feature_fraction=0.8
- --bagging_freq=5
- --bagging_fraction=0.8
- --min_data_in_leaf=50
- --min_sum_hessian_in_leaf=50
- --is_enable_sparse=true
- --use_two_round_loading=false
- --is_save_binary_file=false