(idtype)
| 34 | |
| 35 | |
| 36 | def create_test_heterograph3(idtype): |
| 37 | g = dgl.heterograph( |
| 38 | { |
| 39 | ("user", "plays", "game"): ( |
| 40 | F.tensor([0, 1, 1, 2], dtype=idtype), |
| 41 | F.tensor([0, 0, 1, 1], dtype=idtype), |
| 42 | ), |
| 43 | ("developer", "develops", "game"): ( |
| 44 | F.tensor([0, 1], dtype=idtype), |
| 45 | F.tensor([0, 1], dtype=idtype), |
| 46 | ), |
| 47 | }, |
| 48 | idtype=idtype, |
| 49 | device=F.ctx(), |
| 50 | ) |
| 51 | |
| 52 | g.nodes["user"].data["h"] = F.copy_to( |
| 53 | F.tensor([1, 1, 1], dtype=idtype), ctx=F.ctx() |
| 54 | ) |
| 55 | g.nodes["game"].data["h"] = F.copy_to( |
| 56 | F.tensor([2, 2], dtype=idtype), ctx=F.ctx() |
| 57 | ) |
| 58 | g.nodes["developer"].data["h"] = F.copy_to( |
| 59 | F.tensor([3, 3], dtype=idtype), ctx=F.ctx() |
| 60 | ) |
| 61 | g.edges["plays"].data["h"] = F.copy_to( |
| 62 | F.tensor([1, 1, 1, 1], dtype=idtype), ctx=F.ctx() |
| 63 | ) |
| 64 | return g |
| 65 | |
| 66 | |
| 67 | def create_test_heterograph4(idtype): |
no test coverage detected