Enforce correct data shape. (#5191)

* Fix syncing DMatrix columns.
* notes for tree method.
* Enable feature validation for all interfaces except for jvm.
* Better tests for boosting from predictions.
* Disable validation on JVM.
This commit is contained in:
Jiaming Yuan
2020-01-13 15:48:17 +08:00
committed by GitHub
parent 8cbcc53ccb
commit 7b65698187
14 changed files with 108 additions and 60 deletions

View File

@@ -71,6 +71,12 @@ class TrainingObserver {
auto const& h_vec = vec.HostVector();
this->Observe(h_vec, name);
}
template <typename T>
void Observe(HostDeviceVector<T>* vec, std::string name) const {
if (XGBOOST_EXPECT(!observe_, true)) { return; }
this->Observe(*vec, name);
}
/*\brief Observe objects with `XGBoostParamer' type. */
template <typename Parameter,
typename std::enable_if<