Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
dgl
Commits
8a8d36e9
Unverified
Commit
8a8d36e9
authored
Feb 17, 2022
by
Minjie Wang
Committed by
GitHub
Feb 17, 2022
Browse files
[Doc] add doc for DGLCSVDataset
[Doc] add doc for DGLCSVDataset
parents
39121dfd
6ce3c178
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
592 additions
and
4 deletions
+592
-4
docs/source/api/python/dgl.data.rst
docs/source/api/python/dgl.data.rst
+4
-0
docs/source/guide/data-loadcsv.rst
docs/source/guide/data-loadcsv.rst
+571
-0
docs/source/guide/data.rst
docs/source/guide/data.rst
+3
-1
python/dgl/data/csv_dataset.py
python/dgl/data/csv_dataset.py
+4
-3
tutorials/blitz/6_load_data.py
tutorials/blitz/6_load_data.py
+10
-0
No files found.
docs/source/api/python/dgl.data.rst
View file @
8a8d36e9
...
@@ -18,6 +18,10 @@ Base Dataset Class
...
@@ -18,6 +18,10 @@ Base Dataset Class
.. autoclass:: DGLDataset
.. autoclass:: DGLDataset
:members: download, save, load, process, has_cache, __getitem__, __len__
:members: download, save, load, process, has_cache, __getitem__, __len__
CSV Dataset Class
-----------------
.. autoclass:: CSVDataset
Node Prediction Datasets
Node Prediction Datasets
---------------------------------------
---------------------------------------
...
...
docs/source/guide/data-loadcsv.rst
0 → 100644
View file @
8a8d36e9
This diff is collapsed.
Click to expand it.
docs/source/guide/data.rst
View file @
8a8d36e9
...
@@ -23,6 +23,7 @@ shows how to implement each component of it.
...
@@ -23,6 +23,7 @@ shows how to implement each component of it.
* :ref:`guide-data-pipeline-process`
* :ref:`guide-data-pipeline-process`
* :ref:`guide-data-pipeline-savenload`
* :ref:`guide-data-pipeline-savenload`
* :ref:`guide-data-pipeline-loadogb`
* :ref:`guide-data-pipeline-loadogb`
* :ref:`guide-data-pipeline-loadcsv`
.. toctree::
.. toctree::
:maxdepth: 1
:maxdepth: 1
...
@@ -33,4 +34,5 @@ shows how to implement each component of it.
...
@@ -33,4 +34,5 @@ shows how to implement each component of it.
data-download
data-download
data-process
data-process
data-savenload
data-savenload
data-loadogb
data-loadogb
\ No newline at end of file
data-loadcsv
\ No newline at end of file
python/dgl/data/csv_dataset.py
View file @
8a8d36e9
...
@@ -6,8 +6,7 @@ from ..base import DGLError
...
@@ -6,8 +6,7 @@ from ..base import DGLError
class
CSVDataset
(
DGLDataset
):
class
CSVDataset
(
DGLDataset
):
""" This class aims to parse data from CSV files, construct DGLGraph
"""Dataset class that loads and parses graph data from CSV files.
and behaves as a DGLDataset.
Parameters
Parameters
----------
----------
...
@@ -51,7 +50,9 @@ class CSVDataset(DGLDataset):
...
@@ -51,7 +50,9 @@ class CSVDataset(DGLDataset):
any available graph-level data such as graph-level feature, labels.
any available graph-level data such as graph-level feature, labels.
Examples
Examples
[TODO]: link to a detailed web page.
--------
Please refer to :ref:`guide-data-pipeline-loadcsv`.
"""
"""
META_YAML_NAME
=
'meta.yaml'
META_YAML_NAME
=
'meta.yaml'
...
...
tutorials/blitz/6_load_data.py
View file @
8a8d36e9
...
@@ -222,6 +222,16 @@ dataset = SyntheticDataset()
...
@@ -222,6 +222,16 @@ dataset = SyntheticDataset()
graph
,
label
=
dataset
[
0
]
graph
,
label
=
dataset
[
0
]
print
(
graph
,
label
)
print
(
graph
,
label
)
######################################################################
# Creating Dataset from CSV via :class:`~dgl.data.CSVDataset`
# ------------------------------------------------------------
#
# The previous examples describe how to create a dataset from CSV files
# step-by-step. DGL also provides a utility class :class:`~dgl.data.CSVDataset`
# for reading and parsing data from CSV files. See :ref:`guide-data-pipeline-loadcsv`
# for more details.
#
# Thumbnail credits: (Un)common Use Cases for Graph Databases, Michal Bachman
# Thumbnail credits: (Un)common Use Cases for Graph Databases, Michal Bachman
# sphinx_gallery_thumbnail_path = '_static/blitz_6_load_data.png'
# sphinx_gallery_thumbnail_path = '_static/blitz_6_load_data.png'
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment