Skip to content

Commit

Permalink
fix confict
Browse files Browse the repository at this point in the history
Signed-off-by: mgqa34 <mgq3374541@163.com>
  • Loading branch information
mgqa34 committed Aug 18, 2023
1 parent 485d4c3 commit cdabd02
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit cdabd02

Please sign in to comment.