Unverified Commit fc366945 authored by Xin Yao's avatar Xin Yao Committed by GitHub
Browse files

[Bug] Avoid importing packaging directly (#6260)


Signed-off-by: default avatarXin Yao <xiny@nvidia.com>
parent 4a42027d
......@@ -22,7 +22,8 @@ from collections.abc import Iterable, Mapping
import numpy as np
import scipy.sparse as sparse
import scipy.sparse.linalg
from packaging.version import Version
from ..utils import version
try:
import torch as th
......@@ -3592,7 +3593,7 @@ def random_walk_pe(g, k, eweight_name=None):
)
A = A.multiply(W)
# 1-step transition probability
if Version(scipy.__version__) < Version("1.11.0"):
if version.parse(scipy.__version__) < version.parse("1.11.0"):
RW = np.array(A / (A.sum(1) + 1e-30))
else:
# Sparse matrix divided by a dense array returns a sparse matrix in
......
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