Closed Darkdragon84 closed 2 months ago
The line below is the only line using torch. It needs to be changed to use F.
alternative. Should be a simple fix. If you fix it, I can review and approve it.
https://github.com/dmlc/dgl/blob/5b320e2145e9f9e300d29c6e8df3b02e1975f92c/python/dgl/sampling/neighbor.py#L611
Tensorflow and mxnet support are deprecated and I think the CI does not run their tests anymore. Unless this decision is reversed, I would not rely on DGL working with backends other than pytorch. @frozenbugs
Yes, we just don't have staff to remove all the TF nad MXNet code.
oh? that is unfortunate, I didn't see this mentioned anywhere prominently. Perhaps it would be good to emphasize on the landing page that support for other backends is deprecated. Thanks for the clarification though :-)
I could submit a fix PR, but if TF support is deprecated anyway I suppose this is useless work?
oh? that is unfortunate, I didn't see this mentioned anywhere prominently. Perhaps it would be good to emphasize on the landing page that support for other backends is deprecated. Thanks for the clarification though :-)
Sorry, we announced it in our slack channel. Yes, feel free to leave it as it.
🐛 Bug
I am trying to build dgl from source completely without pytorch for tensorflow backend. I am able to successfully build and install dgl, but a simple
import dgl
then fails due to missingtorch
.To Reproduce
Steps to reproduce the behavior:
File ~/python/dgl/python/dgl/init.py:16 13 from .logging import enable_verbose_logging # usort: skip 14 from .backend import backend_name, load_backend # usort: skip ---> 16 from . import ( 17 container, 18 cuda, 19 dataloading, 20 function, 21 ops, 22 random, 23 sampling, 24 storages, 25 ) 26 from ._ffi.base import version, DGLError 27 from ._ffi.function import ( 28 extract_ext_funcs, 29 get_global_func, 30 list_global_func_names, 31 register_func, 32 )
File ~/python/dgl/python/dgl/dataloading/init.py:4 2 from .. import backend as F 3 from . import negative_sampler ----> 4 from .base import 5 from .cluster_gcn import 6 from .graphsaint import *
File ~/python/dgl/python/dgl/dataloading/base.py:9 7 from ..convert import heterograph 8 from ..frame import LazyFeature ----> 9 from ..transforms import compact_graphs 10 from ..utils import context_of, recursive_apply 13 def _set_lazy_features(x, xdata, feature_names):
File ~/python/dgl/python/dgl/transforms/init.py:2 1 """Transform for structures and features""" ----> 2 from .functional import 3 from .module import 4 from .to_block import *
File ~/python/dgl/python/dgl/transforms/functional.py:55 46 from ..heterograph_index import ( 47 create_heterograph_from_relations, 48 create_metagraph_index, 49 ) 50 from ..partition import ( 51 metis_partition, 52 metis_partition_assignment, 53 partition_graph_with_halo, 54 ) ---> 55 from ..sampling.neighbor import sample_neighbors 57 all = [ 58 "line_graph", 59 "khop_adj", (...) 96 "svd_pe", 97 ] 100 def pairwise_squared_distance(x):
File ~/python/dgl/python/dgl/sampling/init.py:10 8 from .randomwalks import 9 from .pinsage import ---> 10 from .neighbor import 11 from .labor import 12 from .node2vec_randomwalk import *
File ~/python/dgl/python/dgl/sampling/neighbor.py:5 1 """Neighbor sampling APIs""" 3 import os ----> 5 import torch 7 from .. import backend as F, ndarray as nd, utils 8 from .._ffi.function import _init_api
ModuleNotFoundError: No module named 'torch'