Dmatrix refactor stage 1 (#3301)
* Use sparse page as singular CSR matrix representation * Simplify dmatrix methods * Reduce statefullness of batch iterators * BREAKING CHANGE: Remove prob_buffer_row parameter. Users are instead recommended to sample their dataset as a preprocessing step before using XGBoost.
This commit is contained in:
@@ -3,7 +3,13 @@
|
||||
#include <random>
|
||||
|
||||
std::string TempFileName() {
|
||||
return std::tmpnam(nullptr);
|
||||
std::string tmp = std::tmpnam(nullptr);
|
||||
std::replace(tmp.begin(), tmp.end(), '\\',
|
||||
'/'); // Remove windows backslashes
|
||||
// Remove drive prefix for windows
|
||||
if (tmp.find("C:") != std::string::npos)
|
||||
tmp.erase(tmp.find("C:"), 2);
|
||||
return tmp;
|
||||
}
|
||||
|
||||
bool FileExists(const std::string name) {
|
||||
|
||||
Reference in New Issue
Block a user