github.com/kubeflow/training-operator@v1.7.0/examples/xgboost/xgboost-dist/xgboostjob_v1alpha1_iris_train_local.yaml (about)

     1  apiVersion: kubeflow.org/v1
     2  kind: XGBoostJob
     3  metadata:
     4    name: xgboost-dist-iris-test-train-local
     5  spec:
     6    xgbReplicaSpecs:
     7      Master:
     8        replicas: 1
     9        restartPolicy: Never
    10        template:
    11          apiVersion: v1
    12          kind: Pod
    13          spec:
    14            volumes:
    15            - name: task-pv-storage
    16              persistentVolumeClaim:
    17                claimName: xgboostlocal
    18            containers:
    19            - name: xgboost
    20              image: docker.io/merlintang/xgboost-dist-iris:1.1
    21              volumeMounts:
    22                - name: task-pv-storage
    23                  mountPath: /tmp/xgboost_model
    24              ports:
    25              - containerPort: 9991
    26                name: xgboostjob-port
    27              imagePullPolicy: Always
    28              args:
    29                - --job_type=Train
    30                - --xgboost_parameter=objective:multi:softprob,num_class:3
    31                - --n_estimators=10
    32                - --learning_rate=0.1
    33                - --model_path=/tmp/xgboost_model/2
    34                - --model_storage_type=local
    35      Worker:
    36        replicas: 2
    37        restartPolicy: ExitCode
    38        template:
    39          apiVersion: v1
    40          kind: Pod
    41          spec:
    42            volumes:
    43            - name: task-pv-storage
    44              persistentVolumeClaim:
    45                claimName: xgboostlocal
    46            containers:
    47            - name: xgboost
    48              image: docker.io/merlintang/xgboost-dist-iris:1.1
    49              volumeMounts:
    50                - name: task-pv-storage
    51                  mountPath: /tmp/xgboost_model
    52              ports:
    53              - containerPort: 9991
    54                name: xgboostjob-port
    55              imagePullPolicy: Always
    56              args:
    57                - --job_type=Train
    58                - --xgboost_parameter="objective:multi:softprob,num_class:3"
    59                - --n_estimators=10
    60                - --learning_rate=0.1
    61                - --model_path=/tmp/xgboost_model/2
    62                - --model_storage_type=local