MCPcopy
hub / github.com/dmlc/dgl / test_peptides_functional

Function test_peptides_functional

tests/integration/test_data.py:82–90  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

80 dgl.backend.backend_name != "pytorch", reason="only supports pytorch"
81)
82def test_peptides_functional():
83 transform = dgl.AddSelfLoop(allow_duplicate=True)
84 dataset1 = data.PeptidesFunctionalDataset()
85 g1, label = dataset1[0]
86 dataset2 = data.PeptidesFunctionalDataset(transform=transform)
87 g2, _ = dataset2[0]
88
89 assert g2.num_edges() - g1.num_edges() == g1.num_nodes()
90 assert dataset1.num_classes == label.shape[0]
91
92
93@unittest.skipIf(

Callers

nothing calls this directly

Calls 2

num_edgesMethod · 0.45
num_nodesMethod · 0.45

Tested by

no test coverage detected