[DIST] fix distirbuted setting

This commit is contained in:
Ubuntu
2016-01-27 21:21:00 +00:00
committed by tqchen
parent 5218438716
commit 46be6181b5
2 changed files with 9 additions and 5 deletions

View File

@@ -141,7 +141,9 @@ DMatrix* DMatrix::Load(const std::string& uri,
<< "Only one `#` is allowed in file path for cache file specification.";
if (load_row_split) {
std::ostringstream os;
os << cache_file << ".r" << rabit::GetRank();
os << "r" << rabit::GetRank()
<< "-" << rabit::GetWorldSize()
<< "." << cache_file;
cache_file = os.str();
}
} else {
@@ -154,9 +156,11 @@ DMatrix* DMatrix::Load(const std::string& uri,
} else {
// test option to load in part
npart = dmlc::GetEnv("XGBOOST_TEST_NPART", 1);
if (npart != 1) {
LOG(CONSOLE) << "Partial load option on npart=" << npart;
}
}
if (npart != 1) {
LOG(CONSOLE) << "Load part of data " << partid
<< " of " << npart << " parts";
}
// legacy handling of binary data loading
if (file_format == "auto" && !load_row_split) {