diff --git a/python/fate/ml/ensemble/learner/decision_tree/tree_core/hist.py b/python/fate/ml/ensemble/learner/decision_tree/tree_core/hist.py index 2a3426cc92..fbf0395afd 100644 --- a/python/fate/ml/ensemble/learner/decision_tree/tree_core/hist.py +++ b/python/fate/ml/ensemble/learner/decision_tree/tree_core/hist.py @@ -142,12 +142,12 @@ def compute_hist(self, ctx: Context, nodes: List[Node], bin_train_data: DataFram ) indexer = bin_train_data.get_indexer('sample_id') gh = gh.loc(indexer, preserve_order=True) - gh["cnt"] = 1 sample_pos = sample_pos.loc(indexer, preserve_order=True) + targets = {'g': gh['g'].as_tensor(), 'h': gh['h'].as_tensor(), 'cnt': bin_train_data.apply_row(lambda x: 1).as_tensor()} map_sample_pos = sample_pos.create_frame() map_sample_pos['node_idx'] = sample_pos.apply_row(lambda x: node_map[x['node_idx']]) - stat_obj = bin_train_data.distributed_hist_stat(hist, map_sample_pos, gh) + stat_obj = bin_train_data.distributed_hist_stat(hist, map_sample_pos, targets) return hist, stat_obj