Skip to content

Commit

Permalink
refine
Browse files Browse the repository at this point in the history
  • Loading branch information
Rhett-Ying committed Oct 5, 2024
1 parent 07f6433 commit dd79008
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion python/dgl/distributed/dist_dataloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
from .. import backend as F, transforms, utils
from ..base import EID, NID
from ..convert import heterograph
from ..dataloading.dataloader import _remove_kwargs_dist
from .dist_context import get_sampler_pool

__all__ = [
Expand Down Expand Up @@ -770,6 +769,15 @@ def collate(self, items):
return self._collate_with_negative_sampling(items)


def _remove_kwargs_dist(kwargs):
if "num_workers" in kwargs:
del kwargs["num_workers"]
if "pin_memory" in kwargs:
del kwargs["pin_memory"]
print("Distributed DataLoaders do not support pin_memory.")
return kwargs


class DistNodeDataLoader(DistDataLoader):
"""Sampled graph data loader over nodes for distributed graph storage.
Expand Down

1 comment on commit dd79008

@classicsong
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Please sign in to comment.