[backport] Fix inplace predict with fallback when base margin is used. (#9536) (#9548)

- Copy meta info from proxy DMatrix.
- Use `std::call_once` to emit less warnings.
This commit is contained in:
Jiaming Yuan
2023-09-05 23:38:06 +08:00
committed by GitHub
parent b67c2ed96d
commit 3fde9361d7
6 changed files with 62 additions and 63 deletions

View File

@@ -55,6 +55,7 @@ std::shared_ptr<DMatrix> CreateDMatrixFromProxy(Context const *ctx,
}
CHECK(p_fmat) << "Failed to fallback.";
p_fmat->Info() = proxy->Info().Copy();
return p_fmat;
}
} // namespace xgboost::data