Fix dask prediction. (#4941)

* Fix dask prediction.

* Add better error messages for wrong partition.
This commit is contained in:
Jiaming Yuan
2019-10-14 23:19:34 -04:00
committed by GitHub
parent b61d534472
commit 2ebdec8aa6
5 changed files with 51 additions and 24 deletions

View File

@@ -185,7 +185,7 @@ void SimpleCSRSource::CopyFrom(std::string const& cuda_interfaces_str,
cuda_interfaces_str.size()});
std::vector<Json> const& columns = get<Array>(interfaces);
size_t n_columns = columns.size();
CHECK_GT(n_columns, 0) << "Number of columns must not be greater than 0.";
CHECK_GT(n_columns, 0) << "Number of columns must not eqaul to 0.";
auto const& typestr = get<String const>(columns[0]["typestr"]);
CHECK_EQ(typestr.size(), 3) << ColumnarErrors::TypestrFormat();