Hello! I am having an issue with the script convert_partition.py and hoping someone can help. As the full script didn’t work for me right off the bat, I put the convert_partition code into a Jupyter notebook and broke down its individual functionalities into cells. I managed to write nodes.dgl and edges.dgl into their appropriate /part directories. However, when I get to the line
ntype, per_type_ids = id_map(orig_homo_ids)
the notebook fails silently (i.e., stops running the notebook and crashes the kernel). I tried replicating the most basic block of code I could involving IdMap, which appears as follows:
from dgl.distributed.id_map import IdMap
if __name__ == '__main__':
nid_ranges = {'ntype1': [0, 4], 'ntype2': [5, 6]}
nid_ranges = {key: np.array(nid_ranges[key]).reshape(1, 2) for key in nid_ranges}
id_map = IdMap(nid_ranges)
original_homo_ids = np.array([123, 124, 125, 126, 132, 128, 129])
id_map(original_homo_ids)```
However, when I run this, I get the following stacktrace:
```dgl._ffi.base.DGLError: [15:41:51] /tmp/dgl_src/src/graph/graph_op.cc:740: Check failed: it != range_end_data + num_ranges: A bug has been occurred. Please file a bug report at https://github.com/dmlc/dgl/issues. Message:
Stack trace:
[bt] (0) 1 libdgl.dylib 0x0000000126487fff dmlc::LogMessageFatal::~LogMessageFatal() + 111
[bt] (1) 2 libdgl.dylib 0x0000000126dc5d59 dgl::runtime::NDArray dgl::MapIds<long long>(dgl::runtime::NDArray, dgl::runtime::NDArray, dgl::runtime::NDArray, dgl::runtime::NDArray, int, int) + 505
[bt] (2) 3 libdgl.dylib 0x0000000126dc51a5 std::__1::__function::__func<dgl::$_14, std::__1::allocator<dgl::$_14>, void (dgl::runtime::DGLArgs, dgl::runtime::DGLRetValue*)>::operator()(dgl::runtime::DGLArgs&&, dgl::runtime::DGLRetValue*&&) + 2229
[bt] (3) 4 libdgl.dylib 0x0000000126d70f28 DGLFuncCall + 72
[bt] (4) 5 core.cpython-38-darwin.so 0x00000001275e556e __pyx_f_3dgl_4_ffi_4_cy3_4core_FuncCall(void*, _object*, DGLValue*, int*) + 958
[bt] (5) 6 core.cpython-38-darwin.so 0x00000001275e9754 __pyx_pw_3dgl_4_ffi_4_cy3_4core_12FunctionBase_5__call__(_object*, _object*, _object*) + 52
[bt] (6) 7 Python3 0x0000000100105dd6 _PyObject_MakeTpCall + 374
[bt] (7) 8 Python3 0x00000001001e613c call_function + 652
[bt] (8) 9 Python3 0x00000001001e278a _PyEval_EvalFrameDefault + 29962```
Please note that the nid_ranges and original_homo_ids were generated from my notebook code, from the following schema and part files:
Schema:
```{
"nid": {
"ntype1": [0, 4],
"ntype2": [5, 6]
},
"eid": {
"etype1": [0, 1],
"etype2": [2, 3]
}
}```
p000-dgl_test_graph_nodes:
```0 0 0 1 123 1
1 0 0 1 124 1
2 0 0 1 125 2
3 0 0 1 126 2
4 1 0 1 127 2```
p000-dgl_test_graph_edges:
```0 1 123 124 1 0 .1
1 0 124 123 2 0 .2
3 5 126 128 3 0 .3
6 3 129 126 4 1 .4```
Please let me know if I am doing something wrong here, or if there is genuinely a bug in the code as the stacktrace suggests. Thank you in advance!!