DistDGL Node Classification ntype Assertion Error on Heterogeneous Graph

I want to get some suggestions on how to run node classification on heterogeneous graphs like mag240m. I created my own script (https://github.com/K-Wu/IGB-Datasets/blob/main/benchmark/do_graphsage_node_classification.py) based on the code at (https://github.com/dmlc/dgl/blob/master/examples/distributed/graphsage/node_classification.py). However, when the input graph is heterogeneous graph, e.g., mag240m provided by DGL, I got the following error.

Any ideas or suggestions on how to resolve this? Thank you a lot in advance.

  File "/u/kunwu2/projects/IGB-datasets/benchmark/do_graphsage_node_classification.py", line 543, in <module>
    main(args)  
  File "/u/kunwu2/projects/IGB-datasets/benchmark/do_graphsage_node_classification.py", line 423, in main
    if "trainer_id" in g.ndata:
  File "/projects/bbzc/kunwu2/anaconda3/envs/gids_osdi24/lib/python3.9/site-packages/dgl/distributed/dist_graph.py", line 732, in ndata
    assert (
AssertionError: ndata only works for a graph with one node type.

Please refer to https://github.com/dmlc/dgl/tree/364cb7186e94630eb7dc30cd2f494feee1218f8a/examples/pytorch/rgcn/experimental which distributed train on heterograph such as ogbn-mag, ogbn-mag240m.

That saved my day. Thank you for your pointer, Rhett! I will respond to this thread should I need any further help.

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