Check failed: preds.Size() == 0 (195 vs. 0)

Hi,

i am using xgboost java api to train a model. but this error occurs.

error: “Check failed: preds.Size() == 0 (195 vs. 0)”

i think the error is related to DMatrix construction with float[] data;
booster = XGBoost.train(x_train_dMat, params, 100, watches, null, null);

i uploded the code to github, you can take a look here: https://github.com/harihkim/xgb_java . dataset : https://github.com/harihkim/xgb_java/blob/master/data/drug200.csv

Here is the full error:

Exception in thread "main" java.lang.RuntimeException: ml.dmlc.xgboost4j.java.XGBoostError: [11:58:36] /workspace/src/metric/multiclass_metric.cu:171: Check failed: preds.Size() == 0 (195 vs. 0) : 
Stack trace:
  [bt] (0) /tmp/libxgboost4j4848923040843957460.so(+0x33c38d) [0x7f9f0793c38d]
  [bt] (1) /tmp/libxgboost4j4848923040843957460.so(xgboost::metric::EvalMClassBase<xgboost::metric::EvalMultiLogLoss>::Eval(xgboost::HostDeviceVector<float> const&, xgboost::MetaInfo const&)+0xfc) [0x7f9f0793fb7c]
  [bt] (2) /tmp/libxgboost4j4848923040843957460.so(xgboost::LearnerImpl::EvalOneIter(int, std::vector<std::shared_ptr<xgboost::DMatrix>, std::allocator<std::shared_ptr<xgboost::DMatrix> > > const&, std::vector<std::string, std::allocator<std::string> > const&)+0x45c) [0x7f9f078e3a6c]
  [bt] (3) /tmp/libxgboost4j4848923040843957460.so(XGBoosterEvalOneIter+0x2f5) [0x7f9f07731ed5]
  [bt] (4) /tmp/libxgboost4j4848923040843957460.so(Java_ml_dmlc_xgboost4j_java_XGBoostJNI_XGBoosterEvalOneIter+0x2cd) [0x7f9f0772336d]
  [bt] (5) [0x7f9f8c179a10]


	at FinalDataprocessing.main(FinalDataprocessing.java:244)
Caused by: ml.dmlc.xgboost4j.java.XGBoostError: [11:58:36] /workspace/src/metric/multiclass_metric.cu:171: Check failed: preds.Size() == 0 (195 vs. 0) : 
Stack trace:
  [bt] (0) /tmp/libxgboost4j4848923040843957460.so(+0x33c38d) [0x7f9f0793c38d]
  [bt] (1) /tmp/libxgboost4j4848923040843957460.so(xgboost::metric::EvalMClassBase<xgboost::metric::EvalMultiLogLoss>::Eval(xgboost::HostDeviceVector<float> const&, xgboost::MetaInfo const&)+0xfc) [0x7f9f0793fb7c]
  [bt] (2) /tmp/libxgboost4j4848923040843957460.so(xgboost::LearnerImpl::EvalOneIter(int, std::vector<std::shared_ptr<xgboost::DMatrix>, std::allocator<std::shared_ptr<xgboost::DMatrix> > > const&, std::vector<std::string, std::allocator<std::string> > const&)+0x45c) [0x7f9f078e3a6c]
  [bt] (3) /tmp/libxgboost4j4848923040843957460.so(XGBoosterEvalOneIter+0x2f5) [0x7f9f07731ed5]
  [bt] (4) /tmp/libxgboost4j4848923040843957460.so(Java_ml_dmlc_xgboost4j_java_XGBoostJNI_XGBoosterEvalOneIter+0x2cd) [0x7f9f0772336d]
  [bt] (5) [0x7f9f8c179a10]


	at ml.dmlc.xgboost4j.java.XGBoostJNI.checkCall(XGBoostJNI.java:48)
	at ml.dmlc.xgboost4j.java.Booster.evalSet(Booster.java:218)
	at ml.dmlc.xgboost4j.java.Booster.evalSet(Booster.java:235)
	at ml.dmlc.xgboost4j.java.XGBoost.trainAndSaveCheckpoint(XGBoost.java:230)
	at ml.dmlc.xgboost4j.java.XGBoost.train(XGBoost.java:304)
	at ml.dmlc.xgboost4j.java.XGBoost.train(XGBoost.java:127)
	at ml.dmlc.xgboost4j.java.XGBoost.train(XGBoost.java:98)
	at FinalDataprocessing.main(FinalDataprocessing.java:241)