Skip to content

Commit

Permalink
Added support for boolean in proc_params
Browse files Browse the repository at this point in the history
  • Loading branch information
nvidianz committed Jun 4, 2024
1 parent 7f3472e commit 47deca8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion dmlc-core
4 changes: 3 additions & 1 deletion src/collective/communicator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,10 @@ std::map<std::string, std::string> json_to_map(xgboost::Json const& config, std:
} else if (value->Type() == xgboost::Value::ValueKind::kNumber) {
auto num = reinterpret_cast<xgboost::Number *>(value)->GetNumber();
text = std::to_string(num);
} else if (value->Type() == xgboost::Value::ValueKind::kBoolean) {
text = reinterpret_cast<xgboost::Boolean *>(value)->GetBoolean() ? "true" : "false";
} else {
text = "Unsupported type ";
text = "Unsupported type";
}
params[entry.first] = text;
}
Expand Down

0 comments on commit 47deca8

Please sign in to comment.