Skip to content

Commit

Permalink
merge master
Browse files Browse the repository at this point in the history
  • Loading branch information
Ubuntu committed Jul 8, 2024
2 parents 8669ce4 + 5b320e2 commit 4e0ce22
Show file tree
Hide file tree
Showing 135 changed files with 6,223 additions and 1,009 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,6 @@
[submodule "third_party/cuco"]
path = third_party/cuco
url = https://github.com/NVIDIA/cuCollections.git
[submodule "third_party/GKlib"]
path = third_party/GKlib
url = https://github.com/KarypisLab/GKlib.git
7 changes: 4 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -394,13 +394,14 @@ else(EXTERNAL_METIS_PATH)
target_include_directories(dgl PRIVATE "third_party/METIS/include")
# Compile METIS
if(NOT MSVC)
set(GKLIB_PATH "${CMAKE_CURRENT_SOURCE_DIR}/third_party/METIS/GKlib")
set(GKLIB_PATH "${CMAKE_CURRENT_SOURCE_DIR}/third_party/GKlib")
include(${GKLIB_PATH}/GKlibSystem.cmake)
include_directories(${GKLIB_PATH})
add_library(GKlib ${GKlib_sources})
include_directories("third_party/METIS/include/")
add_subdirectory("third_party/METIS/libmetis/")
list(APPEND DGL_LINKER_LIBS metis)
endif(NOT MSVC)
list(APPEND DGL_LINKER_LIBS metis GKlib)
endif(NOT MSVC)
endif(EXTERNAL_METIS_PATH)


Expand Down
4 changes: 2 additions & 2 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ def is_authorized(name) {
'frozenbugs', 'peizhou001', 'zheng-da', 'czkkkkkk', 'thvasilo',
// Intern:
'keli-wen', 'caojy1998', 'RamonZhou', 'xiangyuzhi', 'Skeleton003', 'yxy235',
'hutiechuan', 'pyynb',
'hutiechuan', 'pyynb', 'az15240',
// Friends:
'nv-dlasalle', 'yaox12', 'chang-l', 'Kh4L', 'VibhuJawa', 'kkranen',
'TristonC', 'mfbalin',
Expand Down Expand Up @@ -575,7 +575,7 @@ pipeline {
docker {
label "dgl-ci-linux-cpu"
image "dgllib/dgl-ci-cpu:v240511_1440"
args "-u root --shm-size=4gb"
args "-u root --shm-size=8gb"
alwaysPull true
}
}
Expand Down
2 changes: 1 addition & 1 deletion conda/dgl/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package:
name: dgl{{ environ.get('DGL_PACKAGE_SUFFIX', '') }}
version: 2.3{{ environ.get('DGL_VERSION_SUFFIX', '') }}
version: 2.4{{ environ.get('DGL_VERSION_SUFFIX', '') }}

source:
git_rev: {{ environ.get('DGL_RELEASE_BRANCH', 'master') }}
Expand Down
3 changes: 2 additions & 1 deletion docs/source/api/python/dgl.graphbolt.rst
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ An item set is an iterable collection of items.
:template: graphbolt_classtemplate.rst

ItemSet
ItemSetDict
HeteroItemSet


ItemSampler
Expand Down Expand Up @@ -141,6 +141,7 @@ A subgraph sampler is for sampling subgraphs from a graph.
SubgraphSampler
SampledSubgraph
NeighborSampler
TemporalNeighborSampler
LayerNeighborSampler
SampledSubgraphImpl
FusedSampledSubgraphImpl
Expand Down
4 changes: 2 additions & 2 deletions docs/source/guide/minibatch-custom-sampler.rst
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ can be used on heterogeneous graphs:
import dgl.graphbolt as gb
hg = gb.FusedCSCSamplingGraph()
train_set = item_set = gb.ItemSetDict(
train_set = item_set = gb.HeteroItemSet(
{
"user": gb.ItemSet(
(torch.arange(0, 5), torch.arange(5, 10)),
Expand Down Expand Up @@ -130,4 +130,4 @@ criteria, you could write your own transform function. Please check the method
for reference.

You could also refer to examples in
`Link Prediction <https://github.com/dmlc/dgl/blob/master/examples/sampling/graphbolt/link_prediction.py>`__.
`Link Prediction <https://github.com/dmlc/dgl/blob/master/examples/graphbolt/link_prediction.py>`__.
4 changes: 2 additions & 2 deletions docs/source/guide/minibatch-edge.rst
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ over the edge types.
Data loader definition is almost identical to that of homogeneous graph. The
only difference is that the train_set is now an instance of
:class:`~dgl.graphbolt.ItemSetDict` instead of :class:`~dgl.graphbolt.ItemSet`.
:class:`~dgl.graphbolt.HeteroItemSet` instead of :class:`~dgl.graphbolt.ItemSet`.

.. code:: python
Expand All @@ -266,7 +266,7 @@ only difference is that the train_set is now an instance of
(seeds, labels), names=("seeds", "labels")
),
}
train_set = gb.ItemSetDict(seeds_labels)
train_set = gb.HeteroItemSet(seeds_labels)
datapipe = gb.ItemSampler(train_set, batch_size=128, shuffle=True)
datapipe = datapipe.sample_neighbor(g, [10, 10]) # 2 layers.
datapipe = datapipe.fetch_feature(
Expand Down
4 changes: 2 additions & 2 deletions docs/source/guide/minibatch-inference.rst
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ of unlabeled data. Neighborhood sampling will work fine for model
selection and validation.

One can see
`GraphSAGE <https://github.com/dmlc/dgl/blob/master/examples/sampling/graphbolt/node_classification.py>`__
`GraphSAGE <https://github.com/dmlc/dgl/blob/master/examples/graphbolt/node_classification.py>`__
and
`RGCN <https://github.com/dmlc/dgl/blob/master/examples/sampling/graphbolt/rgcn/hetero_rgcn.py>`__
`RGCN <https://github.com/dmlc/dgl/blob/master/examples/graphbolt/rgcn/hetero_rgcn.py>`__
for examples of offline inference.
2 changes: 1 addition & 1 deletion docs/source/guide/minibatch-link.rst
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ above.
DGL provides the
`unsupervised learning GraphSAGE <https://github.com/dmlc/dgl/blob/master/examples/sampling/graphbolt/link_prediction.py>`__
`unsupervised learning GraphSAGE <https://github.com/dmlc/dgl/blob/master/examples/graphbolt/link_prediction.py>`__
that shows an example of link prediction on homogeneous graphs.

For heterogeneous graphs
Expand Down
6 changes: 3 additions & 3 deletions docs/source/guide/minibatch-node.rst
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ customized batching iterator. During each iteration that yields
DGL provides an end-to-end stochastic training example `GraphSAGE
implementation <https://github.com/dmlc/dgl/blob/master/examples/sampling/graphbolt/node_classification.py>`__.
implementation <https://github.com/dmlc/dgl/blob/master/examples/graphbolt/node_classification.py>`__.

For heterogeneous graphs
~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down Expand Up @@ -200,7 +200,7 @@ For example, one can still use the provided
:class:`~dgl.graphbolt.NeighborSampler` class and
:class:`~dgl.graphbolt.DataLoader` class for
stochastic training. The only difference is that the itemset is now an
instance of :class:`~dgl.graphbolt.ItemSetDict` which is a dictionary
instance of :class:`~dgl.graphbolt.HeteroItemSet` which is a dictionary
of node types to node IDs.

.. code:: python
Expand Down Expand Up @@ -247,6 +247,6 @@ dictionaries of node types and predictions here.
opt.step()
DGL provides an end-to-end stochastic training example `RGCN
implementation <https://github.com/dmlc/dgl/blob/master/examples/sampling/graphbolt/rgcn/hetero_rgcn.py>`__.
implementation <https://github.com/dmlc/dgl/blob/master/examples/graphbolt/rgcn/hetero_rgcn.py>`__.


2 changes: 1 addition & 1 deletion docs/source/guide/minibatch-sparse.rst
Original file line number Diff line number Diff line change
Expand Up @@ -171,4 +171,4 @@ Launch training:
total_loss += loss.item()
For more details, please refer to the `full example
<https://github.com/dmlc/dgl/blob/master/examples/sampling/graphbolt/sparse/graphsage.py>`__.
<https://github.com/dmlc/dgl/blob/master/examples/graphbolt/sparse/graphsage.py>`__.
2 changes: 1 addition & 1 deletion docs/source/install/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ System requirements
DGL works with the following operating systems:

* Ubuntu 20.04+
* CentOS 8+
* CentOS 8+ (Although gcc 9 is needed)
* RHEL 8+
* macOS X
* Windows 10
Expand Down
13 changes: 13 additions & 0 deletions examples/distributed/graphsage/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,19 @@ python3 ~/workspace/dgl/tools/launch.py \
"python3 node_classification.py --graph_name ogbn-products --ip_config ip_config.txt --num_epochs 30 --batch_size 1000 --num_gpus 4"
```

Unsupervised training(train with link prediction dataloader).

```
python3 ~/workspace/dgl/tools/launch.py \
--workspace ~/workspace/dgl/examples/distributed/graphsage/ \
--num_trainers 1 \
--num_samplers 0 \
--num_servers 1 \
--part_config data/ogbn-products.json \
--ip_config ip_config.txt \
"python3 node_classification_unsupervised.py --graph_name ogbn-products --ip_config ip_config.txt --num_epochs 30 --batch_size 1000 --remove_edge"
```

### Running with GraphBolt

In order to run with `GraphBolt`, we need to partition graph into `GraphBolt` data formats.Please note that both `DGL` and `GraphBolt` partitions are saved together.
Expand Down
Loading

0 comments on commit 4e0ce22

Please sign in to comment.