SDCCA / DGL-PTM

The deep graph library implementation of the poverty trap model
GNU Lesser General Public License v2.1
0 stars 0 forks source link

ModuleNotFoundError: No module named 'torch.utils._import_utils' #114

Open jellyfishovo opened 2 months ago

jellyfishovo commented 2 months ago

I find a similar issue happens on torch==2.3.0, and it has been solved, but in torch==2.1.0, I try the command “import torch torch.utils.data.datapipes.utils.common.DILL_AVAILABLE = torch.utils._import_utils.dill_available() import torchdata” to fix this, it doesn't work. my platform : torch==2.1.0, PyGCL==0.1.2, dgl==2.3.0+cu118, cuda==12.0 error details: Traceback (most recent call last): File "/home/sjd/Projects/New/ICASSP/train.py", line 10, in from model import MaskedNLLLoss, LSTMModel, GRUModel, Model, MaskedMSELoss, FocalLoss File "/home/sjd/Projects/New/ICASSP/model.py", line 10, in from HCL_model import HCLGNN File "/home/sjd/Projects/New/ICASSP/HCL_model.py", line 11, in from GCL.models import DualBranchContrast File "/home/sjd/miniconda3/envs/icassp/lib/python3.9/site-packages/GCL/init.py", line 2, in import GCL.augmentors File "/home/sjd/miniconda3/envs/icassp/lib/python3.9/site-packages/GCL/augmentors/init.py", line 3, in from .rw_sampling import RWSampling File "/home/sjd/miniconda3/envs/icassp/lib/python3.9/site-packages/GCL/augmentors/rw_sampling.py", line 2, in from GCL.augmentors.functional import random_walk_subgraph File "/home/sjd/miniconda3/envs/icassp/lib/python3.9/site-packages/GCL/augmentors/functional.py", line 6, in from GCL.utils import normalize File "/home/sjd/miniconda3/envs/icassp/lib/python3.9/site-packages/GCL/utils.py", line 4, in import dgl File "/home/sjd/miniconda3/envs/icassp/lib/python3.9/site-packages/dgl/init.py", line 16, in from . import ( File "/home/sjd/miniconda3/envs/icassp/lib/python3.9/site-packages/dgl/dataloading/init.py", line 13, in from .dataloader import File "/home/sjd/miniconda3/envs/icassp/lib/python3.9/site-packages/dgl/dataloading/dataloader.py", line 27, in from ..distributed import DistGraph File "/home/sjd/miniconda3/envs/icassp/lib/python3.9/site-packages/dgl/distributed/init.py", line 5, in from .dist_graph import DistGraph, DistGraphServer, edge_split, node_split File "/home/sjd/miniconda3/envs/icassp/lib/python3.9/site-packages/dgl/distributed/dist_graph.py", line 12, in from .. import backend as F, graphbolt as gb, heterograph_index File "/home/sjd/miniconda3/envs/icassp/lib/python3.9/site-packages/dgl/graphbolt/init.py", line 39, in from .base import File "/home/sjd/miniconda3/envs/icassp/lib/python3.9/site-packages/dgl/graphbolt/base.py", line 21, in from torchdata.datapipes.iter import IterDataPipe File "/home/sjd/miniconda3/envs/icassp/lib/python3.9/site-packages/torchdata/datapipes/init.py", line 11, in from . import iter, map, utils File "/home/sjd/miniconda3/envs/icassp/lib/python3.9/site-packages/torchdata/datapipes/iter/init.py", line 79, in from torchdata.datapipes.iter.util.cacheholder import ( File "/home/sjd/miniconda3/envs/icassp/lib/python3.9/site-packages/torchdata/datapipes/iter/util/cacheholder.py", line 24, in from torch.utils._import_utils import dill_available ModuleNotFoundError: No module named 'torch.utils._import_utils'

Process finished with exit code 1

SarahAlidoost commented 2 months ago

@jellyfishovo The error message shows that you are using the dgl package rather than the dgl_ptm package developed in this repository. Since your issue is not related to dgl_ptm package, this is not the correct repository to report it. To help you, here are some links https://github.com/dmlc/dgl/issues/7380 and https://github.com/dmlc/dgl/issues/7387 to relevant issues in dgl repository. You might find helpful insights there on how to fix the error.