XGBoost (R Interface) throwing "label set cannot be empty" error
In python I needed to set the label param in  dtrain = xgb.DMatrix(X_train,label=y_train,feature_names=cfg_col_X)

PS I was going to comment but missing rep points.