文件历史

2100 次代码提交

作者 SHA1 备注 提交日期
Minjie Wang 7fe6d0c857 [Doc] Refactor API doc (#128)
* refactor API doc; add markup link in tutorials

* fix readme
2018-11-08 22:57:16 -05:00
Da Zheng bd0e4fa0b3 [MXNet][API] move to the new API (#123)
* move gat to the new api.

* fix gcn.

* update sse.

* fix dgl core.

* update sse.

* fix small bugs in dgl core.

* fix mxnet tests.

* retrigger

* address comments and fix more bugs.

* fix

* fix tests.
2018-11-08 10:00:47 -08:00
GaiYu0 2319167444 [API] Graph traversal (#103)
* bfs, dfs and topological traversal

* dfs and test cases

* Conflicts:
	python/dgl/graph.py
	src/graph/graph.cc
	src/graph/graph_op.cc

* documentation

* requested changes

* Conflicts:
	Jenkinsfile
	examples/pytorch/gcn/gcn.py
	examples/pytorch/gcn/gcn_spmv.py
	python/dgl/graph.py
	python/dgl/graph_index.py
	src/graph/graph.cc
	src/graph/graph_op.cc

* Conflicts:
	Jenkinsfile
	python/dgl/graph_index.py

* fix lint errors

* fix lint errors

* fix lint errors

* fix test cases

* requested changes

* traversal interface

* [Bug] fixed a typo that caused syntax error (#120)

* WIP

* bfs nodes generator works

* topological traversal

* WIP: dfs_edges

* dfs edges

* dfs labeled edges

* utest for traversal

* fix lint

* fix utest

* code clean

* changes as requested
2018-11-08 10:14:19 -05:00
Minjie Wang 7241a9c008 [Backend] backend interface (#109)
* backend interface

* small fix

* more comments to the data type dict

* WIP

* convert_to and narrow

* WIP

* pytorch and numpy backend; WIP on mxnet backend

* mxnet backend

* narrow

* Fix all usages

* fix for mx

* fix for mx

* fix mx

* fix mx

* fix mx

* fix mx

* fix mx

* fix mx

* fix mx

* revert jenkins

* add sparse_matrix api

* sparse matrix api

* some fixme

* Fix as requested
2018-11-04 21:42:39 -05:00
GaiYu0 b420a5b5b3 [Model] Fix broken CDGNN example (#111)
* pretty printer

* Conflicts:
	python/dgl/data/sbm.py

* refined line_graph implementation

* fix broken api calls

* small fix to trigger CI

* requested change
2018-11-05 07:14:01 +08:00
Minjie Wang b355d1eddf [API] Apply nodes & apply edges (#117) 2018-11-04 01:22:53 -04:00
Minjie Wang 1a2b306f55 [Bug] fix bug in nodes() that does not return int64 tensor (#116) 2018-11-03 00:00:29 -04:00
Minjie Wang 68ec624782 [API][Doc] API change & basic tutorials (#113)
* Add SH tutorials

* setup sphinx-gallery; work on graph tutorial

* draft dglgraph tutorial

* update readme to include document url

* rm obsolete file

* Draft the message passing tutorial

* Capsule code (#102)

* add capsule example

* clean code

* better naming

* better naming

* [GCN]tutorial scaffold

* fix capsule example code

* remove previous capsule example code

* graph struc edit

* modified:   2_graph.py

* update doc of capsule

* update capsule docs

* update capsule docs

* add msg passing prime

* GCN-GAT tutorial Section 1 and 2

* comment for API improvement

* section 3

* Tutorial API change (#115)

* change the API as discusses; toy example

* enable the new set/get syntax

* fixed pytorch utest

* fixed gcn example

* fixed gat example

* fixed mx utests

* fix mx utest

* delete apply edges; add utest for update_edges

* small change on toy example

* fix utest

* fix out in degrees bug

* update pagerank example and add it to CI

* add delitem for dataview

* make edges() return form that is compatible with send/update_edges etc

* fix index bug when the given data is one-int-tensor

* fix doc
2018-11-02 17:19:14 -04:00
Gan Quan 2ecd2b23ec [Frame] Support slice type indexing; optimize dgl.batch (#110)
* cherry picking optimization from jtnn

* unbatch by slicing frames

* reduce pack

* oops

* support frame read/write with slices

* reverting to unbatch by splitting; slicing is unfriendly to backward

* replacing lru cache with static object factory

* replacing Scheme object with namedtuple

* remove comment

* forgot the find edges interface

* subclassing namedtuple
2018-11-01 00:03:06 -04:00
Mufei Li 9827e48176 Support for adding nodes/edges after setting representations (#114)
* Fix

1. Fix two typos in gcn.py and gcn_spmv.py
2. Update README

* Fix GCN module

1. Update the outdated graph convolution layer class
2. Fix a bug in the code where dropout never works. Modules like dropout/batch norm depend on whether we are in the training stage or inference stage.

* Fix a bug in dropout

1. dropout depends on nn.Module.training

* Update GCN module

* Fix README

* Fix dropout & remove self.msg_field

* Fix

* Align with TF implementation

* Make g an argument for forward

* Remove features from the argument of GraphConv layer

* Support for create nodes/edges after setting representations

* Remove redundant commit

* Delete test_init_repr.py

* Test case for dynamic addition

* Base 'add_rows' upon 'append'

* Move test function

* Fix

* test by assertion

* changed add_rows to adding blank rows only; adding convert_to to backend

* moving test to basics

* oops mxnet
2018-10-29 23:33:54 -04:00
Mufei Li 2758c24955 [NN] Fix GCN module (#99)
1. Update `examples/pytorch/gcn` and `python/dgl/nn/pytorch` based on the latest APIs
2. Add full support for dropout in `examples/pytorch/gcn` and `python/dgl/nn/pytorch`
3. Rename `GCN` class in `python/dgl/nn/pytorch` to be `GraphConvolutionLayer` class
4. Make node field an argument that can be configured by users in GraphConvolutionLayer

Note that adjacency normalization has not been supported yet in the examples.
2018-10-28 04:35:33 +08:00
Da Zheng 9e9a9488f1 [GraphIndex] Immutable graph index using MXNet CSRArray (#86)
* add immutable graph index.

* update ImmutableGraphIndex.

* add benchmarks of subgraph generation.

* fix node_subgraphs.

* use scipy synthetic data in immutable graph.

* create immutable_graph.

* use spmv in gcn.

* fix immutable graph index.

* update graph index.

* create ImmutableSubgraphIndex.

* return subgraph node and edge mapping.

* fix benchmark.

* add mapping to subgraph nid.

* test in_edges and out_edges.

* update benchmark.

* Fix immutable subgraph.

* complete in_edges and out_edges.

* fix benchmarks.

* add test on node_subgraphs

* add sse.

* construct subgraphs in parallel.

* add in/out degree(s).

* make immutable graph index backend-specific.

* implement has_edge(s) and edge_id(s).

* Revert "use spmv in gcn."

This reverts commit 9cfed5f5fb3dd2ed9b98745348b1c0e9731ed7f7.

* implement node_subgraphs in GraphIndex.

* fix sse.

* address comments.

* address comments.

* Update mxnet docker.
2018-10-26 11:28:25 -07:00
GaiYu0 ff92812609 remove pytorch dependency in sbm.py (#107) 2018-10-25 20:22:41 -04:00
Minjie Wang 2046980231 [DOC] API tutorials (#96)
* setup sphinx-gallery; work on graph tutorial

* draft dglgraph tutorial

* update readme to include document url

* rm obsolete file

* Draft the message passing tutorial
2018-10-23 16:27:15 -04:00
Gan Quan 70d475813c [BUG] Fixing networkx conversion with 0 edges (#94)
* fixing networkx conversion with 0 edges

* fixes as required

* remove obsolete comment
2018-10-21 23:15:45 -04:00
Lingfan Yu dce1f44d46 CI lint check (#93)
* CI for lint check

* init submodule before run lint

* install ubuntu core for lint docker

* remove generator import in dgl
2018-10-18 23:50:24 -04:00
Gan Quan 3683a774d5 Merge branch 'cpp' of github.com:jermainewang/dgl into cpp 2018-10-18 22:49:22 -04:00
Gan Quan f1ede61ffa removing obsolete line_graph() 2018-10-18 22:49:05 -04:00
Minjie Wang 3e76bcc052 remove anonymous repr 2018-10-18 21:43:40 -04:00
Da Zheng fb6be9fbd7 [GraphIndex] Create graph index directly from scipy matrix. (#87)
* create synthetic data with scipy.

* changes as comments
2018-10-18 16:39:45 -04:00
Da Zheng 4af3f8bcc8 update the MXNet backend. (#89)
* update mxnet.

* add get_tvmtype.

* remove undefined test.
2018-10-18 12:49:13 -07:00
Minjie Wang 6cbdf37c37 Merge branch 'master' into cpp 2018-10-18 15:29:20 -04:00
Minjie Wang b9631912db [Frame] Refactor frame. (#85)
* refactor frame codes

* fix unit test

* fix gcn example

* minor doc/message changes

* raise errors for non-exist columns in FrameRef; sanity check when append

* fix unittest; change error msg

* Add warning for none initializer

* fix unittest

* use warnings package
2018-10-18 15:08:21 -04:00
Minjie Wang 66261aee03 [Hotfix] Revert part of the send logic; disable the send twice test case; GCN on GPU works again. (#88) 2018-10-18 14:20:44 -04:00
Gan Quan bc3f852dab [GRAPHINDEX] Multigraph support (#79)
* multigraph support on graph index

* more tests

* multigraph flag, bugfix on clear & copy

* networkx interfaces

* including graph index tests in Jenkins

* node subgraph test

* edge subgraphs

* removing duplicates in pred/succ

* more explicit test and doc

* query source and destination from edge id

* subgraphindex

* renaming has_edge to has_edge_between, apply_edges adding eid

* send_on and send_and_recv_on

* DGLGraph edge subgraph

* merged send_on and send_and_recv_on

* change request

* removing hashmap

* creating multigraph by flag; mingw support

* changes per request

* reverting networkx auto multigraph discovery

* notes on send/send_and_recv on multigraphs

* changing test reducer from sum to max

* added a fixme note in spmv scheduler
2018-10-17 21:46:10 -04:00
Lingfan Yu 750e50372a Efficient send_and_recv (#83)
* python side send_and_recv shortcut

* common util function for c apis

* degree bucketing scheduler

* scheduler c apis

* cmake

* python side logics

* minor

* fix multiple msg/red func cases

* remove shell echo command in Jenkinsfile...

* fuse apply for send_and_recv

* fuse update func for update_all

* typo...

* handle anonymous

* add degree bucketing for entire graph

* degree bucketing executor

* minor

* style

* rename graph_mapping to recv_nodes

* fix some comments
2018-10-17 11:14:52 -04:00
Gan Quan b2c1c4facd node/edge filtering (#80)
* node/edge filtering

* changing to tensor operations (what did i do???)

* ???
2018-10-16 21:37:43 -04:00
Gan Quan 16da76c4b4 fix #81 2018-10-16 10:39:50 -04:00
Da Zheng 5567f4a4d9 [BACKEND] Add MXNet backend. (#77)
* support mxnet.

* add mxnet version of GCN.

* rename mxnet.nd as F.

* add mxnet GAT.

* enable GPU for GCN.

* fix MXNet GCN train.

* Use adam to optimize GAT

* support more operators.

* support sparse arrays.

* update mxnet backend.

* support index_copy.

* remove NN.

* update mxnet backend.

* temp check in.

* fix data conversion.

* add test.

* clean up mxnet backend.

* update mxnet examples.

* Revert "remove NN."

This reverts commit d815d9a0ec619f9ce9099c48cd35db9d8e947483.

* temp disable MXNet version of NN.
2018-10-14 11:15:48 -04:00
GaiYu0 e7679cf2e6 implement requested changes 2018-10-13 14:24:46 +08:00
GaiYu0 eb46dc0018 Merge branch 'line-graph' of https://github.com/jermainewang/dgl into line-graph 2018-10-10 12:43:39 +08:00
GaiYu0 0a6d720c30 fix build failure 2018-10-10 12:43:05 +08:00
GaiYu0 4baed9645c Merge branch 'cpp' into line-graph 2018-10-10 07:53:44 +08:00
Minjie Wang 7603b8c351 Fix dlpack bug; zero copy between dgl.ndarray and user tensor enabled 2018-10-09 11:37:59 -04:00
GaiYu0 885f5e7313 Merge branch 'cpp' of https://github.com/jermainewang/dgl into line-graph 2018-10-09 16:08:18 +08:00
Minjie Wang 3d38c2a93e small fix 2018-10-08 13:30:50 -04:00
GaiYu0 baf5906bab (non)-backtracking line graph 2018-10-08 08:04:25 +08:00
GaiYu0 5119a50475 sparse line graph 2018-10-08 07:38:03 +08:00
Lingfan Yu cdf7334cc6 Dockerfile and CI (#74)
* Test CPP branch CI (#2)

* Fix batching node-only graphs (#62)

* fixing batching with graphs with no edges

* oops forgot test

* fix readme

* Docker and Jenkins (#1)

* docker ci cpu

* install python packages

* docker ci gpu

* add readme

* use dgl cpu image

* run command in container as root

* use python3

* fix test case

* remove nose from docker file

* docker folder readme

* parallelize cpu and gpu

* top level stages

* comment out python2 related installation

* fix

* remove igraph

* building for cpp

* change building order

* export env in test stage

* withEnv

* run docker container as root

* fix test cases

* fix test cases

* minor

* remove old build
2018-10-07 19:18:43 -04:00
GaiYu0 905db29286 cpp lg 2018-10-07 22:25:45 +08:00
Gan Quan ec4216dda8 [MODEL] junction tree vae example (#70)
* junction tree vae example

* added README and moved data to dropbox

* auto download; some fix in python3
2018-10-06 16:59:47 -04:00
GaiYu0 596ca471a5 Merge branch 'cpp' of https://github.com/jermainewang/dgl into line-graph 2018-10-06 23:52:04 +08:00
GaiYu0 8a6d25ae69 Resolve conflicts in python/dgl/graph.py 2018-10-06 16:13:06 +08:00
Minjie Wang 72f6345515 Fix for subgraph test and some docs 2018-10-05 23:58:42 -04:00
Da Zheng b0e02e5b52 Update the subgraph (#73)
* update subgraph.

* update subgraph API.

* keep node embedding.
2018-10-05 22:17:33 -04:00
Minjie Wang 1209978d97 install doc 2018-10-05 16:23:55 -04:00
Minjie Wang 1b06998465 doc for batched graph 2018-10-05 15:07:42 -04:00
Minjie Wang c7b9f06946 Init sphinx doc 2018-10-05 14:57:09 -04:00
Minjie Wang c468e06867 some fix 2018-10-05 10:38:44 -04:00
Minjie Wang 74888fee5c readout signature 2018-10-04 13:20:25 -04:00