diff --git a/pgl/bigraph.py b/pgl/bigraph.py index 46eb15a4..d1073a80 100644 --- a/pgl/bigraph.py +++ b/pgl/bigraph.py @@ -1387,7 +1387,8 @@ def _join_graph_index(graph_list, mode="src_node"): % mode) if is_tensor: - counts = paddle.concat(counts) + counts = [c.item() for c in counts] + counts = paddle.to_tensor(counts, dtype="int64") return op.get_index_from_counts(counts) @staticmethod diff --git a/pgl/graph.py b/pgl/graph.py index fe35fccd..20f175d1 100644 --- a/pgl/graph.py +++ b/pgl/graph.py @@ -1109,7 +1109,8 @@ def _join_graph_index(graph_list, mode="node"): mode) if is_tensor: - counts = paddle.concat(counts) + counts = [c.item() for c in counts] + counts = paddle.to_tensor(counts, dtype="int64") return op.get_index_from_counts(counts) @staticmethod diff --git a/requirements.txt b/requirements.txt index 0a218a3e..f8e645e4 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1,2 @@ -numpy >= 1.16.4 -cython >= 0.25.2 +numpy==1.26.0 +cython==3.0.2 diff --git a/tests/test_static_graph.py b/tests/test_static_graph.py index f53865e6..032ae675 100644 --- a/tests/test_static_graph.py +++ b/tests/test_static_graph.py @@ -83,7 +83,7 @@ def test_static_graph(self): model2.set_state_dict(state_dict) feed_dict = { - "num_nodes": num_nodes, + "num_nodes": np.array([num_nodes]).astype("int32"), "edges": np.array( edges, dtype="int32"), "feature": nfeat.astype("float32"),