'datapipes', 'dataloader2' modules are imported by dgl

Python 3.9.19 (main, May 6 2024, 19:43:03)
[GCC 11.2.0] :: Anaconda, Inc. on linux
Type “help”, “copyright”, “credits” or “license” for more information.

import dgl
/home/dak/software/miniconda3/envs/NRPFeature/lib/python3.9/site-packages/torchdata/datapipes/init.py:18: UserWarning:
################################################################################
WARNING!
The ‘datapipes’, ‘dataloader2’ modules are deprecated and will be removed in a
future torchdata release! Please see Future of torchdata and dataloading · Issue #1196 · pytorch/data · GitHub
to learn more and leave feedback.
################################################################################

deprecation_warning()

[1]+ Stopped python

Hello community of DGL, has anyone encountered the same error as me? I encountered this error for the first time when I’m installing dgl on a new conda environment. it never happened before:
my package version
torch 2.3.1+cu118
torchaudio 2.3.1+cu118
torchdata 0.8.0
torchvision 0.18.1+cu118
dgl 2.3.0+cu118

Is it an error or just a warning? I believe it should continue to work. Next DGL release will drop dependency on torchdata python package. @frozenbugs

Thanks for reaching out,

it is not an error by what it tells, but by the code of init.py from torchdata/datapipes:

from torch.utils.data import DataChunk, functional_datapipe

from torchdata import _extension # noqa: F401

from . import iter, map, utils

all = [“DataChunk”, “functional_datapipe”, “iter”, “map”, “utils”]

from torchdata import deprecation_warning

deprecation_warning()

from torchdata the torchdata is a compiled .so file, I will try to markout the deprecation_warning() and see if it works fine.

mark out the deprecation_warning() in datapipes and dataloader2 make the script work, I compared the torch I installed on 24/7/25, the init file in both datapipes and dataloader2 are not the same from the one I installed today, they added deprecation_warning() to it and it leads to exit.

mark them out will solve the problem.

Yes, our next release will get rid of dependency on datapipes in torchdata.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.