"git@developer.sourcefind.cn:OpenDAS/dgl.git" did not exist on "995c1913aa29b9f21dd6bd48cd65445c153d9c45"
Unverified Commit 3ff7ad9d authored by Rhett Ying's avatar Rhett Ying Committed by GitHub
Browse files

[GraphBolt] update notebooks about numpy edges (#6936)

parent b6087efd
...@@ -122,8 +122,10 @@ The ``graph`` field is used to specify the graph structure. It has two fields: ...@@ -122,8 +122,10 @@ The ``graph`` field is used to specify the graph structure. It has two fields:
homogeneous graphs. For heterogeneous graphs, it is the edge type. homogeneous graphs. For heterogeneous graphs, it is the edge type.
- ``format``: ``string`` - ``format``: ``string``
The ``format`` field is used to specify the format of the edge data. It can The ``format`` field is used to specify the format of the edge data. It
only be ``csv`` for now. can be ``csv`` or ``numpy``. If it is ``csv``, no ``index`` and ``header``
fields are needed. If it is ``numpy``, the array requires to be in shape
of ``(2, num_edges)``. ``numpy`` format is recommended for large graphs.
- ``path``: ``string`` - ``path``: ``string``
The ``path`` field is used to specify the path of the edge data. It is The ``path`` field is used to specify the path of the edge data. It is
......
...@@ -103,10 +103,11 @@ ...@@ -103,10 +103,11 @@
"cell_type": "markdown", "cell_type": "markdown",
"source": [ "source": [
"### Generate graph structure data\n", "### Generate graph structure data\n",
"For heterogeneous graph, we need to save different edge edges(namely node pairs) into separate **CSV** files.\n", "For heterogeneous graph, we need to save different edge edges(namely node pairs) into separate **Numpy** or **CSV** files.\n",
"\n", "\n",
"**Note**:\n", "Note:\n",
"when saving to file, do not save index and header.\n" "- when saving to **Numpy**, the array requires to be in shape of `(2, N)`. This format is recommended as constructing graph from it is much faster than **CSV** file.\n",
"- when saving to **CSV** file, do not save index and header.\n"
], ],
"metadata": { "metadata": {
"id": "qhNtIn_xhlnl" "id": "qhNtIn_xhlnl"
......
...@@ -103,10 +103,11 @@ ...@@ -103,10 +103,11 @@
"cell_type": "markdown", "cell_type": "markdown",
"source": [ "source": [
"### Generate graph structure data\n", "### Generate graph structure data\n",
"For homogeneous graph, we just need to save edges(namely node pairs) into **CSV** file.\n", "For homogeneous graph, we just need to save edges(namely node pairs) into **Numpy** or **CSV** file.\n",
"\n", "\n",
"Note:\n", "Note:\n",
"when saving to file, do not save index and header.\n" "- when saving to **Numpy**, the array requires to be in shape of `(2, N)`. This format is recommended as constructing graph from it is much faster than **CSV** file.\n",
"- when saving to **CSV** file, do not save index and header.\n"
], ],
"metadata": { "metadata": {
"id": "qhNtIn_xhlnl" "id": "qhNtIn_xhlnl"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment