Skip to content

Commit 420b5f9

Browse files
authored
Merge pull request #10 from postgresml/montana/r
removed upstream dmlc/xgboost/pull/6505
2 parents f85be44 + 5756d0e commit 420b5f9

File tree

1 file changed

+1
-28
lines changed

1 file changed

+1
-28
lines changed

src/booster.rs

+1-28
Original file line numberDiff line numberDiff line change
@@ -149,34 +149,7 @@ impl Booster {
149149
};
150150

151151
let mut bst = Booster::new_with_cached_dmats(&params.booster_params, &cached_dmats)?;
152-
//let num_parallel_tree = 1;
153-
154-
// load distributed code checkpoint from rabit
155-
let version = unsafe { xgboost_sys::RabitVersionNumber() };
156-
debug!("Loaded Rabit checkpoint: version={}", version);
157-
assert!(unsafe { xgboost_sys::RabitGetWorldSize() != 1 || version == 0 });
158-
159-
let _rank = unsafe { xgboost_sys::RabitGetRank() };
160-
let start_iteration = version / 2;
161-
//let mut nboost = start_iteration;
162-
163-
for i in start_iteration..params.boost_rounds as i32 {
164-
// distributed code: need to resume to this point
165-
// skip first update if a recovery step
166-
if version % 2 == 0 {
167-
if let Some(objective_fn) = params.custom_objective_fn {
168-
debug!("Boosting in round: {}", i);
169-
bst.update_custom(params.dtrain, objective_fn)?;
170-
} else {
171-
debug!("Updating in round: {}", i);
172-
bst.update(params.dtrain, i)?;
173-
}
174-
}
175-
176-
assert!(unsafe { xgboost_sys::RabitGetWorldSize() == 1 || version == xgboost_sys::RabitVersionNumber() });
177-
178-
//nboost += 1;
179-
152+
for i in 0..params.boost_rounds as i32 {
180153
if let Some(eval_sets) = params.evaluation_sets {
181154
let mut dmat_eval_results = bst.eval_set(eval_sets, i)?;
182155

0 commit comments

Comments
 (0)