文件历史

296 次代码提交

作者 SHA1 备注 提交日期
Quan (Andy) Gan e4cc81852d [Windows] fix compilation issues on vs2015 (#1405)
* [Windows] fix compilation issues on vs2015

* fix test
2020-03-30 22:08:26 +08:00
Jinjing Zhou e9440acb06 [TF] TF backend fix and new logic to choose backend (#1393)
* TF backend fix and new logic to choose backend

* fix

* fix

* fix

* fix

* fix backend

* fix

* dlpack alignment

* add flag

* flag

* lint

* lint

* remove unused

* several fixes

Co-authored-by: Minjie Wang <wmjlyjemaine@gmail.com>
2020-03-30 18:45:17 +08:00
Quan (Andy) Gan 4b4186f87d [Sampler] Change argument type of fanout from list to dict (#1403) 2020-03-30 15:52:46 +08:00
Quan (Andy) Gan 97b08fbba5 [BUG] fix crash in neighbor sampling w/ replacement on 0 degree nodes (#1402) 2020-03-30 14:48:23 +08:00
Quan (Andy) Gan e3a9a6bba8 add an optional include_dst_in_src argument (#1401) 2020-03-30 12:06:12 +08:00
Zihao Ye af61e2fbb4 [Feature] Support nn modules for bipartite graphs. (#1392)
* init gat

* fix

* gin

* 7 nn modules

* rename & lint

* upd

* upd

* fix lint

* upd test

* upd

* lint

* shape check

* upd

* lint

* address comments

* update tensorflow

Co-authored-by: Quan Gan <coin2028@hotmail.com>
Co-authored-by: Jinjing Zhou <VoVAllen@users.noreply.github.com>
Co-authored-by: Minjie Wang <wmjlyjemaine@gmail.com>
2020-03-29 16:48:38 +08:00
xiang song(charlie.song) 67cb7a43a0 [Feature] Deprecate multigraph (#1389)
* Deprecate multi-graph

* Handle heterograph and edge_ids

* lint

* Fix

* Remove multigraph in C++ end

* Fix lint

* Add some test and fix something

* Fix

* Fix

* upd

* Fix some test case

* Fix

* Fix

Co-authored-by: Ubuntu <ubuntu@ip-172-31-51-214.ec2.internal>
Co-authored-by: Jinjing Zhou <VoVAllen@users.noreply.github.com>
Co-authored-by: Minjie Wang <wmjlyjemaine@gmail.com>
2020-03-28 21:31:24 +08:00
Minjie Wang 3efb5d8ecf [NN] Add HeteroGraphConv module for cleaner module definition (#1385)
* Add HeteroGraphConv

* add custom aggregator; some docstring

* debugging

* rm print

* fix some acc bugs

* fix initialization problem in weight basis

* passed tests

* lint

* fix graphconv flag; add error message

* add mxnet heteroconv

* more fix for mx

* lint

* fix torch cuda test

* fix mx test_nn

* add exhaust test for graphconv

* add tf heteroconv

* fix comment
2020-03-27 18:47:06 +08:00
Quan (Andy) Gan bbfff8ce76 [Feature] Casting between DGLGraph and DGLHeteroGraph (#1391)
* [Feature] Casting between DGLGraph and DGLHeteroGraph

* lint

* address comments

Co-authored-by: Minjie Wang <wmjlyjemaine@gmail.com>
Co-authored-by: Jinjing Zhou <VoVAllen@users.noreply.github.com>
2020-03-27 13:34:55 +08:00
Jinjing Zhou 1e27e90e4e [MXNet] Patch mxnet unittest (#1395)
* patch

* turn off tf test

* skip test

* fix
2020-03-26 01:05:59 +08:00
Quan (Andy) Gan b9c65e91ef [BUG] Another fix on remove edges when all edges are removed (#1386)
* [BUG] Another fix on remove edges when all edges are removed

* fix mxnet
2020-03-23 19:04:52 +08:00
Quan (Andy) Gan d27b485912 [BUG] Fix remove_edges crashing with empty edge ID tensors (#1384) 2020-03-22 21:09:44 +08:00
Da Zheng 10253a5c07 [BUGFIX] Fix is_multigraph in the construction from scipy coo matrix (#1357)
* fix is_multigraph in from_coo.

* add tests for partition.

* fix.

* Revert "add tests for partition."

This reverts commit cb8c8555da3e0c70a482c2d639adce2943475bfc.

* fix everywhere from_scipy_sparse_matrix is used.
2020-03-22 00:30:27 -07:00
Mufei Li 0f40c6e49c [Hetero] Replace card with num_nodes
Co-authored-by: Minjie Wang <wmjlyjemaine@gmail.com>
2020-03-20 16:56:53 +08:00
Quan (Andy) Gan 4af02022b2 [Bug] Multiple fixes (#1374)
* multiple fixes

* lint

* lint x2
2020-03-19 11:19:44 +08:00
Quan (Andy) Gan 0a51dc5435 [Bug] Fix dsttype in GraphSAGE minibatch model (#1371)
* fix for new ntype API for blocks

* adding two new interfaces
2020-03-18 23:57:03 +08:00
Minjie Wang 6111ea4665 [Model] RGCN mini-batch training; Better bipartite graph support (#1337)
* change the model to use node embedding only

* minibatch training

* add readme

* small fix

* backward-compatible

* backward compatible

* modify to_block; rgcn changed

* fix

* fix transform

* fix bug in unittest script

* docstring

* fix lint

* add tests

* address comments; fix offline eval

* gitignore
2020-03-16 18:58:06 +08:00
Minjie Wang d876680a36 [Model][Perf] Improve sage sampling performance (#1364)
* improve speed

* fix bugs

* upd reg test
2020-03-15 23:20:30 +08:00
xiang song(charlie.song) 5a1ef70fd4 [Optimization] Optimize performance of COOSort (#1349)
* Fix coo_sort

* Add COOSort test

* Fix

* omp

* coo2csr can benefit from sorted coo

* Add more test code

* Add LIBCXX_ENABLE_PARALLEL_ALGORITHMS to Makefile

* upd

* Turn off LIBCXX_ENABLE_PARALLEL_ALGORITHMS by default

Co-authored-by: Ubuntu <ubuntu@ip-172-31-51-214.ec2.internal>
2020-03-13 22:39:36 +08:00
Da Zheng 1a584ced11 [Feature] Improve the speed of to_bidirected (#1327)
* make graph symmetric

* call gklib routine.

* use gklib version except in windows.

* minor errors.

* fix test.

* update doc.

* fix a compile error.

* fix.

* add comments for the new C API.

* fix a bug.

* address comments.

* fix compile error.

* fix comment.
2020-03-10 22:44:32 -07:00
xiang song(charlie.song) 7b3a7b1438 [Optimization] Optimize CompactGraph (#1328)
* compact

* prealloc memory for hashtable

* Fix

* upd

* Reduce memory

* upd

Co-authored-by: Ubuntu <ubuntu@ip-172-31-51-214.ec2.internal>
2020-03-10 12:54:12 +08:00
Jinjing Zhou a0139923ed [Test] Instruction for write regression test (#1341)
* patch

* fix+1

* add readme
2020-03-09 20:26:58 +08:00
Jinjing Zhou 9abe041351 [Test] asv conf fix (#1338)
* patch

* fix+1
2020-03-09 15:33:49 +08:00
Da Zheng 0e153c4baf [Feature] add metis partitioning to DGL (#1308)
* add metis.

* add test.

* construct partition id.

* link to METIS github repo.

* update metis.

* add a tool for partitioning a graph.

* update metis.

* update.

* update.

* fix metis.

* fix lint

* fix indent.

* another way of building metis.

* disable metis in windows.

* test windows

* fix.

* disable metis for windows properly.

* fix for tensorflow.

* skip test for gpu.

* make graph symmetric

* address comments.

* more comments.

* fix compile

* fix a bug.

* add test.

* change the default #hops of HALO nodes.

Co-authored-by: Ubuntu <ubuntu@ip-172-31-26-167.us-east-2.compute.internal>
2020-03-07 23:24:03 -08:00
Quan (Andy) Gan a9520f71ce [Model][Sampler] GraphSAGE model, bipartite graph conversion & remove edges API (#1297)
* remove edge and to bipartite and graphsage with sampling

* fixes

* fixes

* fixes

* reenable multigpu training

* fixes

* compatibility in DGLGraph

* rename to compact_as_bipartite

* bugfix

* lint

* add offline inference

* skip GPU tests

* fix

* addresses comments

* fix

* fix

* fix

* more tests

* more docs and unit tests

* workaround for empty slice on empty data
2020-03-08 02:38:29 +08:00
Quan (Andy) Gan ce6e19f233 [Bugfix] Allows node types with no inbound/outbound edges (#1323)
* add num nodes in ctors

* fix

* lint

* addresses comments

* replace with constexpr

* remove function with rvalue reference

* address comments
2020-03-08 01:11:44 +08:00
Jinjing Zhou 9caff61777 [Feature] More serialization support (#1295)
* fix script

* t

* fix weird bugs

* fix

* fix

* upload

* fix

* fix

* lint

* fix

* tmp

* fix serialization

* fix

* fix lint

* fix message

* fix

* lint

* address comment

* fix

* lint

* fix

* fix

* fix

* Remove duplicate serialization for meta graph

Co-authored-by: Minjie Wang <wmjlyjemaine@gmail.com>
2020-03-06 21:38:56 +08:00
Zihao Ye 09ade2f265 upd (#1321) 2020-03-06 14:17:48 +08:00
Zihao Ye 93ac29ce34 [Refactor] Unify DGLGraph, BatchedDGLGraph and DGLSubGraph (#1216)
* upd

* upd

* upd

* lint

* fix

* fix test

* fix

* fix

* upd

* upd

* upd

* upd

* upd

* upd

* upd

* upd

* upd

* upd

* upd tutorial

* upd

* upd

* fix kg

* upd doc organization

* refresh test

* upd

* refactor doc

* fix lint

Co-authored-by: Minjie Wang <minjie.wang@nyu.edu>
2020-03-05 18:03:57 +08:00
Jinjing Zhou 64174583fe [Test] Regression test script update (#1313)
* regression test

* script
2020-03-05 01:17:02 +08:00
Minjie Wang 5dd35580f7 [Feature] Improve sampling speed; Better pickle/unpickle; other fixes (#1299)
* improve performance of sample_neighbors

* some more improve

* test script

* benchmarks

* multi process

* update more tests

* WIP

* adding two API for state saving

* add create from state

* upd test

* missing file

* wip: pickle/unpickle

* more c apis

* find the problem of empty data array

* add null array; pickling speed is bad

* still bad perf

* still bad perf

* wip

* fix the pickle speed test; now everything looks good

* minor fix

* bugfix

* some lint fix

* address comments

* more fix

* fix lint

* add utest for random.choice

* add utest for dgl.rand_graph

* fix cpp utests

* try fix ci

* fix bug in TF backend

* upd choice docstring

* address comments

* upd

* try fix compile

* add comment
2020-03-02 23:16:05 +08:00
Quan (Andy) Gan c3a33407fe [Feature] PinSAGE sampler (#1249)
* [WIP] PinSAGE operators

* moved the edge remapping mess into C

* some docstrings

* lint

* lint x2

* lint x3

* skip gpu test on topk

* extend pinsage to any metapath

* lint x4

* addresses #1265

* add always_preserve (fixes #1266) and fix a silly bug

* disable gpu test on compaction

* lint

* fix a horrible bug and add more tests

* lint

* addresses comments

* lint

* bugfix

* addresses comments

Co-authored-by: Minjie Wang <minjie.wang@nyu.edu>
2020-02-28 20:46:13 +08:00
Jinjing Zhou 87bca129a4 [CI] Regression Test Configuration (#1157)
* push

* 1111

* 111

* fix

* 222

* 1231231

* 111

* 45458643465

* fix

* fix

* fix

* 4156416

* fix

* path

* 111

* 1231

* 111

* 152554

* fix

* fix

* fix

* fix

* try fix

* change name

* try

* fix

* fix

Co-authored-by: Minjie Wang <minjie.wang@nyu.edu>
2020-02-28 14:43:32 +08:00
Jinjing Zhou ebca1188a9 [Feature] Support serialization for smart pointer (#1291)
* fix script

* t

* fix weird bugs

* fix

* fix

* upload

* fix

* fix

* lint

* fix
2020-02-26 17:29:27 +08:00
Minjie Wang 37d992ecf6 [Bugfix] Fix no attribute num_edges bug in Nodeflow (#1289)
* fix nodeflow bug when using builtin on edge data

* fix
2020-02-26 10:05:38 +08:00
Minjie Wang c7f6cf6282 [Bugfix] Consistent order for cross-type stack reducer (#1267)
* WIP

* fix shape of stack reducer

* apply merge order by edge id for stack reducer
2020-02-18 13:54:11 +08:00
Minjie Wang f8d4264e5b [Feature] Neighbor-hood based sampling APIs (#1251)
* WIP: working on random choices

* light slice

* basic CPU impl

* add python binding; fix CreateFromCOO and CreateFromCSR returning unitgraph

* simple test case works

* fix bug in slicing probability array

* fix bug in getting the correct relation graph

* fix bug in creating placeholder graph

* enable omp

* add cpp test

* sample topk

* add in|out_subgraph

* try fix lint; passed all unittests

* fix lint

* fix msvc compile; add sorted flag and constructors

* fix msvc

* coosort

* COOSort; CSRRowWiseSampling; CSRRowWiseTopk

* WIP: remove DType in CSR and COO; Restrict data array to be IdArray

* fix all CSR ops for missing data array

* compiled

* passed tests

* lint

* test sampling out edge

* test different per-relation fanout/k values

* fix bug in random choice

* finished cpptest

* fix compile

* Add induced edges

* add check

* fixed bug in sampling on hypersparse graph; add tests

* add ascending flag

* in|out_subgraph returns subgraph and induced eid

* address comments

* lint

* fix
2020-02-17 21:25:21 +08:00
Quan (Andy) Gan c7c0fd0e37 [Feature] Accessing node/edge types in UDFs. (#1243)
* typed udf

* docstrings
2020-02-17 16:02:56 +08:00
Jinjing Zhou 032a08cc32 [Test] Fix test script (#1257)
* fix script

* t

* fix weird bugs

* fix

* fix
2020-02-13 18:09:15 +08:00
Jinjing Zhou 23893bb0a8 [Data format] Serialization for Immutable Graph and HeteroGraph (#1254)
* graph format

* fix lint

* lint

* fix

* unit test

* lint

* add magic num

* move serialize out of struct

* lint

* serialize

* trigger CI

* fix lint

* lint

Co-authored-by: zhoujinjing09 <zhoujinjing09@users.noreply.github.com>
2020-02-11 00:14:31 +08:00
xiang song(charlie.song) ffe5898317 [Optimization][KG] Several optimizations on DGL-KG (#1233)
* Several optimizations on DGL-KG:
1. Sorted positive edges for sampling which can reduce random
   memory access during positive sampling
2. Asynchronous node embedding update
3. Balanced Relation Partition that gives balanced number of
   edges in each partition. When there is no cross partition
   relation, relation embedding can be pin into GPU memory
4. tunable neg_sample_size instead of fixed neg_sample_size

* Fix test

* Fix test and eval.py

* Now TransR is OK

* Fix single GPU with mix_cpu_gpu

* Add app tests

* Fix test script

* fix mxnet

* Fix sample

* Add docstrings

* Fix

* Default value for num_workers

* Upd

* upd
2020-02-09 13:01:00 -08:00
Jinjing Zhou f103bbf9ee [Data format] Serialization for UnitGraph (#1242)
* graph format

* fix lint

* lint

* fix

* unit test

* lint

* add magic num

* move serialize out of struct

* lint

Co-authored-by: zhoujinjing09 <zhoujinjing09@users.noreply.github.com>
2020-02-08 20:49:34 +08:00
Quan (Andy) Gan eeeb52f464 [Feature] Preference to COO for "hypersparse" unit graphs & graph compaction (#1238)
* unit graph that prefers coo queries

* auto detect coo preference

* forgot some functions

* disable lint on detect_prefer_coo

* reorg

* change comment

* lint

* fix

* move array_utils.h to src

* compact graph impl

* fix redundant copying in idhashmap

* docstring

* moving preference detection to C

* lint

* fix unit test & address comments

* hypersparse autorestrict

* docstring & fix

* revert copyto and asnumbits

* fix stupid bug

* lint

* leave a TODO for sorted COO

* fixing same node type mapping to different id in different graphs

* addresses comments

* made induced nodes a feautre column

* lint?
2020-02-04 22:39:28 +08:00
Mufei Li 828a5e5bc6 [DGL-LifeSci] Migration and Refactor (#1226)
* First commit

* Update

* Update splitters

* Update

* Update

* Update

* Update

* Update

* Update

* Migrate ACNN

* Fix

* Fix

* Update

* Update

* Update

* Update

* Update

* Update

* Finish classification

* Update

* Fix

* Update

* Update

* Update

* Fix

* Fix

* Fix

* Update

* Update

* Update

* trigger CI

* Fix CI

* Update

* Update

* Update

* Add default values

* Rename

* Update deprecation message
2020-02-04 01:38:09 +08:00
Quan (Andy) Gan a9dabcc769 [Feature] Random Walk for 0.5 (#1209)
* trying to refactor IndexSelect

* partial implementation

* add index select and assign for floats as well

* move to random choice source

* more updates

* fixes

* fixes

* more fixes

* adding python impl

* fixes

* unit test

* lint

* lint x2

* lint x3

* update metapath2vec

* debugging performance

* still debugging for performance

* tuning

* switching to succvec

* redo

* revert non-uniform sampler to use vector

* still not fast

* why does this crash with OpenMP???

* because there was a data race!!!

* add documentations and remove assign op

* lint

* lint x2

* lol what have i done

* lint x3

* fix and disable gpu testing

* bugfix

* generic random walk

* reorg the random walk source code

* Update randomwalks.h

* Update randomwalks_cpu.cc

* rename file

* move internal function to anonymous ns

* reorg & docstrings

* constant restart probability

* docstring fix

* more commit

* random walk with restart, tested

* some fixes

* switch to using NDArray for choice

* massive fix & docstring

* lint x?

* lint x??

* fix

* export symbols

* skip gpu test

* addresses comments

* replaces another VecToIdArray

* add randomwalks.h to include

* replace void * with template
2020-01-31 19:52:08 +08:00
VoVAllen a00636a02b [Tensorflow] Several nn & example (#1191)
* several nn example

* appnp

* fix lint

* lint

* add dgi

* fix

* fix

* fix

* fff

* docs

* 111

* fix

* change init

* change result

* tiaocan+1

* fix

* fix lint

* fix

* fix
2020-01-19 22:48:40 +08:00
xiang song(charlie.song) 31a7d50964 [Bug Fix] Add boundary check for heterograph build with card as input (#1192)
* Add boundary check for heterograph build with card as input

* Fix when u or v is empty

* fix test_kernel.py error print

* Revert "fix test_kernel.py error print"

This reverts commit a71c20292549c0ac62a5326c30669ca4bde8febc.

* Turn op validation check on graph and bipartite by default

* upd

* udp

* upd

* update test
2020-01-18 17:18:40 +08:00
xiang song(charlie.song) c49582c996 [Test] Fix the random seed in test_kernel.py and fix the _print_error (#1194)
* Fix the random seed and fix the _print_error

* Fix check_positive_edge_sampler sample weight.

Co-authored-by: Zihao Ye <zihaoye.cs@gmail.com>
Co-authored-by: VoVAllen <VoVAllen@users.noreply.github.com>
2020-01-17 13:48:47 +08:00
Quan (Andy) Gan 86fe58ebb8 [Bug] Another fix on PyTorch memory leakage issue (#1139)
* another fix

* another try

* fix

* rewriting with kernel functions

* revert mxnet softmax changes

* lint fix

Co-authored-by: Zihao Ye <zihaoye.cs@gmail.com>
2020-01-14 22:54:19 +08:00
xiang song(charlie.song) cd9599ab04 [KG][Optimization] Remove copy from parent in minibatch generation (#1193)
* remote copy from parent

* upd

* make test_sampler easier to pass
2020-01-10 15:59:09 -08:00