Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[gpuCI] Auto-merge branch-0.15 to branch-0.16 [skip ci] #1076

Merged
merged 5 commits into from
Aug 13, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
- PR #1034 Expose resolution (gamma) parameter in Louvain
- PR #1037 Centralize test main function and replace usage of deprecated `cnmem_memory_resource`
- PR #1041 Use S3 bucket directly for benchmark plugin
- PR #1062 Compute max_vertex_id in mnmg local data computation
- PR #1068 Remove unused thirdparty code

## Bug Fixes
Expand Down
10 changes: 8 additions & 2 deletions python/cugraph/dask/common/input_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ def __init__(self, gpu_futures=None, workers=None,
self.multiple = multiple
self.worker_info = None
self.total_rows = None
self.max_vertex_id = None
self.ranks = None
self.parts_to_sizes = None
self.local_data = None
Expand Down Expand Up @@ -148,6 +149,7 @@ def calculate_local_data(self, comms, by):

_local_data_dict = self.client.compute(local_data, sync=True)
local_data_dict = {'edges': [], 'offsets': [], 'verts': []}
max_vid = 0
for rank in range(len(_local_data_dict)):
data = _local_data_dict[rank]
local_data_dict['edges'].append(data[0])
Expand All @@ -158,6 +160,8 @@ def calculate_local_data(self, comms, by):
local_offset = prev_data[1] + 1
local_data_dict['offsets'].append(local_offset)
local_data_dict['verts'].append(data[1] - local_offset + 1)
if data[2] > max_vid:
max_vid = data[2]

import numpy as np
local_data_dict['edges'] = np.array(local_data_dict['edges'],
Expand All @@ -167,6 +171,7 @@ def calculate_local_data(self, comms, by):
local_data_dict['verts'] = np.array(local_data_dict['verts'],
dtype=np.int32)
self.local_data = local_data_dict
self.max_vertex_id = max_vid


""" Internal methods, API subject to change """
Expand Down Expand Up @@ -196,8 +201,9 @@ def get_obj(x): return x[0] if multiple else x
def _get_local_data(df, by):
df = df[0]
num_local_edges = len(df)
local_max = df[by].iloc[-1]
return num_local_edges, local_max
local_by_max = df[by].iloc[-1]
local_max = df[['src', 'dst']].max().max()
return num_local_edges, local_by_max, local_max


def get_local_data(input_graph, by, load_balance=True):
Expand Down