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

[Performance] Fused sampling with compaction #5924

Merged
merged 10 commits into from
Jul 20, 2023
Prev Previous commit
Next Next commit
Fix neighbor.py lint issues
  • Loading branch information
agrabow committed Jul 19, 2023
commit 2afa96dec4b1250139d15d454c7010fa0aea742b
4 changes: 2 additions & 2 deletions python/dgl/sampling/neighbor.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

from .. import backend as F, ndarray as nd, utils
from .._ffi.function import _init_api
from ..base import DGLError, EID, NID
from ..base import DGLError, EID
from ..heterograph import DGLBlock, DGLGraph
from .utils import EidExcluder

Expand Down Expand Up @@ -478,7 +478,7 @@ def _sample_neighbors(
if F.device_type(g.device) != "cpu":
raise DGLError("Only cpu is supported in fused sampling")

if mapping == None:
if mapping is None:
mapping = {}
mapping_name = "__mapping" + str(os.getpid())
if mapping_name not in mapping.keys():
Expand Down