monitor for distributed envorinment. (#4829)

* Collect statistics from other ranks in monitor.

* Workaround old GCC bug.
This commit is contained in:
Jiaming Yuan
2019-09-05 13:18:09 +08:00
committed by GitHub
parent c0fbeff0ab
commit 52d44e07fe
5 changed files with 151 additions and 21 deletions

View File

@@ -142,11 +142,13 @@ DMLC_REGISTER_PARAMETER(GenericParameter);
class LearnerImpl : public Learner {
public:
explicit LearnerImpl(std::vector<std::shared_ptr<DMatrix> > cache)
: configured_{false}, cache_(std::move(cache)) {}
: configured_{false}, cache_(std::move(cache)) {
monitor_.Init("Learner");
}
// Configuration before data is known.
void Configure() override {
if (configured_) { return; }
monitor_.Init("Learner");
monitor_.Start("Configure");
auto old_tparam = tparam_;
Args args = {cfg_.cbegin(), cfg_.cend()};