Revision 1f74dc103a537405a3b2a2eb1d9bb472f3a830f5 authored by Johnu George on 31 March 2019, 06:45:24 UTC, committed by Johnu George on 31 March 2019, 06:45:24 UTC
1 parent abedddc
xgboost-bayesian-example.yaml
apiVersion: "kubeflow.org/v1alpha1"
kind: StudyJob
metadata:
namespace: kubeflow
labels:
controller-tools.k8s.io: "1.0"
name: xgboost-example
spec:
studyName: xgboost-example
owner: crd
optimizationtype: minimize
objectivevaluename: mean_absolute_error
optimizationgoal: 10000
requestcount: 10
parameterconfigs:
- name: --learning-rate
parametertype: double
feasible:
min: "0.05"
max: "0.15"
- name: --n-estimators
parametertype: int
feasible:
min: "10000"
max: "30000"
workerSpec:
goTemplate:
rawTemplate: |-
apiVersion: batch/v1
kind: Job
metadata:
name: {{.WorkerID}}
namespace: kubeflow
spec:
template:
# The training worker uses the Ames housing example found at
# https://github.com/kubeflow/examples/tree/master/xgboost_ames_housing.
# Please first follow the steps and create the required prerequisites.
spec:
containers:
- name: {{.WorkerID}}
image: gcr.io/kubeflow-examples/ames-housing:latest
volumeMounts:
- mountPath: "/mnt/xgboost"
name: datadir
command:
- "python"
- "housing.py"
- "--train-input=/ames_dataset/train.csv"
- "--model-file=/ames_dataset/housing_{{.WorkerID}}.dat"
{{- with .HyperParameters}}
{{- range .}}
- "{{.Name}}={{.Value}}"
{{- end}}
{{- end}}
volumes:
- name: datadir
persistentVolumeClaim:
claimName: claim
restartPolicy: Never
suggestionSpec:
suggestionAlgorithm: "bayesianoptimization"
suggestionParameters:
-
name: "burn_in"
value: "5"
requestNumber: 10
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...