[DIST] fix distirbuted setting
This commit is contained in:
parent
5218438716
commit
46be6181b5
@ -318,6 +318,7 @@ int CLIRunTask(int argc, char *argv[]) {
|
|||||||
printf("Usage: <config>\n");
|
printf("Usage: <config>\n");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
rabit::Init(argc, argv);
|
||||||
|
|
||||||
std::vector<std::pair<std::string, std::string> > cfg;
|
std::vector<std::pair<std::string, std::string> > cfg;
|
||||||
cfg.push_back(std::make_pair("seed", "0"));
|
cfg.push_back(std::make_pair("seed", "0"));
|
||||||
@ -336,7 +337,6 @@ int CLIRunTask(int argc, char *argv[]) {
|
|||||||
CLIParam param;
|
CLIParam param;
|
||||||
param.Configure(cfg);
|
param.Configure(cfg);
|
||||||
|
|
||||||
rabit::Init(argc, argv);
|
|
||||||
switch (param.task) {
|
switch (param.task) {
|
||||||
case kTrain: CLITrain(param); break;
|
case kTrain: CLITrain(param); break;
|
||||||
case kDump2Text: CLIDump2Text(param); break;
|
case kDump2Text: CLIDump2Text(param); break;
|
||||||
|
|||||||
@ -141,7 +141,9 @@ DMatrix* DMatrix::Load(const std::string& uri,
|
|||||||
<< "Only one `#` is allowed in file path for cache file specification.";
|
<< "Only one `#` is allowed in file path for cache file specification.";
|
||||||
if (load_row_split) {
|
if (load_row_split) {
|
||||||
std::ostringstream os;
|
std::ostringstream os;
|
||||||
os << cache_file << ".r" << rabit::GetRank();
|
os << "r" << rabit::GetRank()
|
||||||
|
<< "-" << rabit::GetWorldSize()
|
||||||
|
<< "." << cache_file;
|
||||||
cache_file = os.str();
|
cache_file = os.str();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -154,9 +156,11 @@ DMatrix* DMatrix::Load(const std::string& uri,
|
|||||||
} else {
|
} else {
|
||||||
// test option to load in part
|
// test option to load in part
|
||||||
npart = dmlc::GetEnv("XGBOOST_TEST_NPART", 1);
|
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
|
// legacy handling of binary data loading
|
||||||
if (file_format == "auto" && !load_row_split) {
|
if (file_format == "auto" && !load_row_split) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user