github.com/kubeflow/training-operator@v1.7.0/examples/xgboost/xgboostjob.yaml (about) 1 apiVersion: kubeflow.org/v1 2 kind: XGBoostJob 3 metadata: 4 name: xgboost-dist-iris-test-train 5 spec: 6 xgbReplicaSpecs: 7 Master: 8 replicas: 1 9 restartPolicy: Never 10 template: 11 spec: 12 containers: 13 - name: xgboost 14 image: docker.io/merlintang/xgboost-dist-iris:1.1 15 ports: 16 - containerPort: 9991 17 name: xgboostjob-port 18 imagePullPolicy: Always 19 args: 20 - --job_type=Train 21 - --xgboost_parameter=objective:multi:softprob,num_class:3 22 - --n_estimators=10 23 - --learning_rate=0.1 24 - --model_path=/tmp/xgboost-model 25 - --model_storage_type=local 26 Worker: 27 replicas: 2 28 restartPolicy: ExitCode 29 template: 30 spec: 31 containers: 32 - name: xgboost 33 image: docker.io/merlintang/xgboost-dist-iris:1.1 34 ports: 35 - containerPort: 9991 36 name: xgboostjob-port 37 imagePullPolicy: Always 38 args: 39 - --job_type=Train 40 - --xgboost_parameter="objective:multi:softprob,num_class:3" 41 - --n_estimators=10 42 - --learning_rate=0.1