MCPcopy Create free account
hub / github.com/dmlc/xgboost / MakeDistributedTestConfig

Function MakeDistributedTestConfig

tests/cpp/collective/test_worker.h:142–152  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

140}
141
142inline auto MakeDistributedTestConfig(std::string host, std::int32_t port,
143 std::chrono::seconds timeout, std::int32_t r) {
144 Json config{Object{}};
145 config["dmlc_communicator"] = std::string{"rabit"};
146 config["dmlc_tracker_uri"] = host;
147 config["dmlc_tracker_port"] = port;
148 config["dmlc_timeout"] = static_cast<std::int64_t>(timeout.count());
149 config["dmlc_task_id"] = std::to_string(r);
150 config["dmlc_retry"] = 2;
151 return config;
152}
153
154template <typename WorkerFn>
155void TestDistributedGlobal(std::int32_t n_workers, WorkerFn worker_fn, bool need_finalize = true,

Callers 2

TEST_FFunction · 0.85
TestDistributedGlobalFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected