"git@developer.sourcefind.cn:OpenDAS/pytorch3d.git" did not exist on "3b8a33e9c5cc5eea9b48e467682827787af9ac60"
Unverified Commit 484bbcc8 authored by Jinjing Zhou's avatar Jinjing Zhou Committed by GitHub
Browse files

[Test] Fix partition ci fail (#1614)

parent 48cc8fa8
...@@ -134,8 +134,8 @@ def load_partition(conf_file, part_id): ...@@ -134,8 +134,8 @@ def load_partition(conf_file, part_id):
assert 'num_edges' in part_metadata, "cannot get the number of edges of the global graph." assert 'num_edges' in part_metadata, "cannot get the number of edges of the global graph."
assert 'node_map' in part_metadata, "cannot get the node map." assert 'node_map' in part_metadata, "cannot get the node map."
assert 'edge_map' in part_metadata, "cannot get the edge map." assert 'edge_map' in part_metadata, "cannot get the edge map."
node_map = np.load(part_metadata['node_map']) node_map = np.load(part_metadata['node_map'], allow_pickle=True)
edge_map = np.load(part_metadata['edge_map']) edge_map = np.load(part_metadata['edge_map'], allow_pickle=True)
meta = (part_metadata['num_nodes'], part_metadata['num_edges'], node_map, edge_map, num_parts) meta = (part_metadata['num_nodes'], part_metadata['num_edges'], node_map, edge_map, num_parts)
assert NID in graph.ndata, "the partition graph should contain node mapping to global node Id" assert NID in graph.ndata, "the partition graph should contain node mapping to global node Id"
assert EID in graph.edata, "the partition graph should contain edge mapping to global edge Id" assert EID in graph.edata, "the partition graph should contain edge mapping to global edge Id"
...@@ -231,8 +231,8 @@ def partition_graph(g, graph_name, num_parts, out_path, num_hops=1, part_method= ...@@ -231,8 +231,8 @@ def partition_graph(g, graph_name, num_parts, out_path, num_hops=1, part_method=
out_path = os.path.abspath(out_path) out_path = os.path.abspath(out_path)
node_part_file = os.path.join(out_path, "node_map") node_part_file = os.path.join(out_path, "node_map")
edge_part_file = os.path.join(out_path, "edge_map") edge_part_file = os.path.join(out_path, "edge_map")
np.save(node_part_file, F.asnumpy(node_parts), allow_pickle=False) np.save(node_part_file, F.asnumpy(node_parts), allow_pickle=True)
np.save(edge_part_file, edge_parts, allow_pickle=False) np.save(edge_part_file, edge_parts, allow_pickle=True)
part_metadata = {'graph_name': graph_name, part_metadata = {'graph_name': graph_name,
'num_nodes': g.number_of_nodes(), 'num_nodes': g.number_of_nodes(),
'num_edges': g.number_of_edges(), 'num_edges': g.number_of_edges(),
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment