<commit_before>### Distributed XGBoost Job train and prediction

This folder containers related files for distributed XGBoost training and prediction. In this demo,  
[Iris Data Set](https://archive.ics.uci.edu/ml/datasets/iris) is a well known multi-class classification dataset. 
Thus, in this demo, distributed XGBoost job is able to do multi-class classification problem. Meanwhile,
User can extend provided data reader to read data from distributed data storage like HDFS, HBase or Hive etc. 


**Build image**

The default image name and tag is `kubeflow/xgboost-dist-iris-test:1.1` respectiveily.

```shell
docker build -f Dockerfile -t kubeflow/xgboost-dist-iris-test:1.0 ./
```

Then you can push the docker image into repository
```shell
docker push kubeflow/xgboost-dist-iris-test:1.0 ./
```

**Configure the job runtime via Yaml file**

There are two yaml files to setup distributed XGBoost computation runtime. 
For training job, you could configure xgboostjob_v1alpha1_iris_predict.yaml. 
Note, we use [OSS](https://www.alibabacloud.com/product/oss) to store the trained model, 
thus, you need to specify the OSS parameter in the yaml file. Therefore, remember to fill the OSS parameter in the yaml file. 
The oss parameter includes the account and key information. 
Similarly, xgboostjob_v1alpha1_iris_predict.yaml is used to configure XGBoost job batch prediction. 

**Start the distributed XGBoost train**
```
kubectl create -f xgboostjob_v1alpha1_iris_train.yaml 
```

**Look at the train job status**
```
 kubectl get -o yaml XGBoostJob/xgboost-dist-iris-test-train
 ```
 Here is a sample output when the job is finished. The output log like this
```
Name:         xgboost-dist-iris-test
Namespace:    default
Labels:       <none>
Annotations:  <none>
API Version:  xgboostjob.kubeflow.org/v1alpha1
Kind:         XGBoostJob
Metadata:<commit_msg>Specifying the exact account information required for pss_params<commit_after>### Distributed XGBoost Job train and prediction

This folder containers related files for distributed XGBoost training and prediction. In this demo,  
[Iris Data Set](https://archive.ics.uci.edu/ml/datasets/iris) is a well known multi-class classification dataset. 
Thus, in this demo, distributed XGBoost job is able to do multi-class classification problem. Meanwhile,
User can extend provided data reader to read data from distributed data storage like HDFS, HBase or Hive etc. 


**Build image**

The default image name and tag is `kubeflow/xgboost-dist-iris-test:1.1` respectiveily.

```shell
docker build -f Dockerfile -t kubeflow/xgboost-dist-iris-test:1.0 ./
```

Then you can push the docker image into repository
```shell
docker push kubeflow/xgboost-dist-iris-test:1.0 ./
```

**Configure the job runtime via Yaml file**

There are two yaml files to setup distributed XGBoost computation runtime. 
For training job, you could configure xgboostjob_v1alpha1_iris_predict.yaml. 
Note, we use [OSS](https://www.alibabacloud.com/product/oss) to store the trained model, 
thus, you need to specify the OSS parameter in the yaml file. Therefore, remember to fill the OSS parameter in the yaml file. 
The oss parameter includes the account information such as access_id, access_key, access_bucket and endpoint. 
For Eg:
--oss_param=endpoint:http://oss-ap-south-1.aliyuncs.com,access_id:XXXXXXXXXXX,access_key:XXXXXXXXXXXXXXXXXXX,access_bucket:XXXXXX
Similarly, xgboostjob_v1alpha1_iris_predict.yaml is used to configure XGBoost job batch prediction. 

**Start the distributed XGBoost train**
```
kubectl create -f xgboostjob_v1alpha1_iris_train.yaml 
```

**Look at the train job status**
```
 kubectl get -o yaml XGBoostJob/xgboost-dist-iris-test-train
 ```
 Here is a sample output when the job is finished. The output log like this
```
Name:         xgboost-dist-iris-test
Namespace:    default
Labels:       <none>
Annotations:  <none>
API Version:  xgboostjob.kubeflow.org/v1alpha1
Kind:         XGBoostJob
Metadata:
{'fraction_non_alphanumeric': 0.0814217292664482, 'fraction_numerical': 0.007310310057978321, 'mean_word_length': 4.549650349650349, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 4, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 2, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3088874', 'n_tokens_mistral': 1273, 'n_tokens_neox': 1219, 'n_words': 456}