文件历史

169 次代码提交

作者 SHA1 备注 提交日期
Minjie Wang 4dfe7547e8 Fix num_rows bug in batched_graph (#169) 2018-11-23 02:49:59 +08:00
Zihao Ye 23e2e83b5e [API] change the signature of node/edge filter (#166)
* change the signature of node/edge filter

* upd filter
2018-11-22 13:00:36 -05:00
Lingfan Yu deb653f8dc [Runtime] Scheduler and Executor (#140)
* executor api

* draft executor interface

* WIP

* revert changes to avoid conflict with api change

* core scheduling logic

* WIP: build graph adj

* incidence matrix for in edges

* support incidence matrix for partial recv nodes

* improve

* build adjmat in scheduler

* graph store

* get degree bucketing schedule

* connect to c++ degree bucketing

* conceptual executor creation code

* executor comments

* fix

* more executor comments

* WIP: full send_and_recv schedule

* most schedulers

* simplify scheduler

* executors

* runtime

* builtin function base class

* adj indices and shape

* completely refactor scheduler

* rename and move bundled out to function.py

* use_edge_feature in msg func

* rewrite scheduler

* node edge executor

* connect with graph api

* handle zero degree

* misc

* fix test cases

* fix a good many bugs...

* remove old scheduler

* push and pull

* fix send recv

* c++ lint

* fix batched send recv

* hot fix for mxnet

* typo

* write back executor

* apply node edge

* clean up, doc string

* fix as requested

* refactor

* fix

* WIP

* WIP

* ir draft

* more on ir

* WIP: spmv schedule

* WIP

* recv schedule

* refactor

* WIP

* snr degree bucketing

* snr scheduler

* move prog to graph.py; rename

* unittest for send/recv

* remove some legacy codes

* WIP: update_all

* pass test_basics

* passed all current utests

* more utests; fix mx utest

* WIP: fixing zero deg initial value

* some tests

* fix 0deg problem

* fix mx

* fix mx

* some notes

* fix as requested
2018-11-22 12:15:50 -05:00
Minjie Wang 0ec1a492b3 [Frame] change num rows behavior (#163)
* move initializer to column scheme; change num rows behavior

* poke mx ci

* fix mx utest in append

* fix bug in add edges

* utest for updating partial rows

* fix bug in from_networkx and from_scipy_matrix

* revert per-col initializer change

* fix pickle utest
2018-11-21 11:50:46 -05:00
Da Zheng 5f89cd662e Fix the convergence problem in SSE. (#162)
* add a test.

* move file.

* debug

* add degree normalization.

* it can converge now.

* remove hidden_data.

* use readonly graph index.

* use subgraph loader.

* refactor code and remove intermediate data.

* split inference.

* mix cpu and gpu training.

* fix mxnet sparse_matrix constructor.

* convert tensor context.

* set up the prediction model.

* load mxnet csr directly.

* add timing.

* move test_sse.py to sse_batch.py

* fix the tensor version of SSE.

* update README.
2018-11-20 15:57:52 +08:00
Gan Quan e515f5311b [Frame] supporting partial row on first column and individual column initializers (#160)
addresses issue #156
2018-11-19 18:18:36 -05:00
Gan Quan 79a510252b Pickling support (#155)
* pickling support

* resorting to suggested way of pickling

* custom attribute pickling check

* working around a weird pytorch pickling bug

* including partial frame case

* pickling everything now

* fix as requested
2018-11-16 17:19:20 -05:00
Gan Quan 05f464f824 [Bugfix] fix args with incontiguous node and edge tensor (#153) 2018-11-15 10:55:15 -05:00
Gan Quan ed1854e800 [Bugfix] fix a potential context mismatch (#154) 2018-11-15 09:47:20 -05:00
Da Zheng 2389df8155 [API] Subgraph sampling API. (#138)
* add neighbor sampler.

* fix sampler.

* handle non-existing nodes differently in MapParentIdToSubgraphId.

* fix sampling tests.

* parallelize sampling.

* add more tests.

* fix a bug in subgraph loader.

* get number of sampled nodes directly.

* load mxnet CSR to DGLGraph directly.

* create graph from mxnet csr array directly.

* use subgraph loader in SSE.

* fix a bug in sampling.

* output framework tensor.

* fix.

* remove unnecessary code.

* fix tests.

* add SSE README.

* move to contrib.

* address comments.

* add tests.
2018-11-14 13:51:27 -08:00
Minjie Wang 048f6d7a30 [GraphIndex] refactor graph caching (#150)
* refactor graph caching

* fix mx test

* fix typo
2018-11-13 22:12:38 -05:00
Zihao Ye a9ffb59e66 [DOC][Model] Tree-LSTM example and tutorial (#146)
[DOC][Model] Tree-LSTM example and tutorial
2018-11-13 18:09:14 -05:00
Gan Quan 0452cc3c0c [Bug] Transpose adj is not correctly cached (#148) 2018-11-12 22:15:45 -05:00
Gan Quan d6c80e0cf7 [API] bfs with edges (#132)
* bfs with edges

* dfs toy test case

* clean up

* style fix

* bugfix

* updating docs for bfs_edges and readouts
2018-11-11 17:19:55 -05:00
Gan Quan a36d0841b5 removing 3.6 f-string (#139) 2018-11-11 14:43:15 -05:00
Minjie Wang 6d96a97f17 [Doc] docstring for SST dataset (#133) 2018-11-10 11:59:55 -05:00
Gan Quan 40ca5de450 [API] Readout interfaces (#124)
* fixing builtin src*edge shape mismatch

* bundled function refactor (?)

* fixing names

* readout prototype

* oops

* more fixes

* removing readout prototype

* sum_on() with SPMV, fixing batching with 0 edges

* readouts with segmented sum

* typo (??????)

* fixes NLTK dependency (#125)

* misc fixes including #126 (pushing again)

* sanity check for mxnet

* fixes NLTK dependency (#125) and #126

* reverting to sum_nodes/edges
2018-11-10 11:35:34 -05:00
Minjie Wang 8ea359d125 [API] Message propagation APIs (#127)
* add examples in traversal.py

* message propagate methods

* use the new message propagation for tree-lstm

* update to the new name

* update propagate API doc

* update doc

* add propagate utest
2018-11-09 15:04:57 -05:00
Gan Quan 72efb42718 [Bugfix] fixes NLTK dependency (#125) and #126 (#131) 2018-11-09 14:16:52 -05:00
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