IF YOU WOULD LIKE TO GET AN ACCOUNT, please write an email to s dot adaszewski at gmail dot com. User accounts are meant only to report issues and/or generate pull requests. This is a purpose-specific Git hosting for ADARED projects. Thank you for your understanding!
Browse Source

Fix regressions in test_input.

master
Stanislaw Adaszewski 3 years ago
parent
commit
a72b6b09bc
1 changed files with 9 additions and 20 deletions
  1. +9
    -20
      tests/icosagon/test_input.py

+ 9
- 20
tests/icosagon/test_input.py View File

@@ -9,28 +9,17 @@ def _some_data():
d = Data()
d.add_node_type('Gene', 1000)
d.add_node_type('Drug', 100)
d.add_relation_type('Target', 1, 0, torch.rand(100, 1000))
d.add_relation_type('Interaction', 0, 0, torch.rand(1000, 1000))
d.add_relation_type('Side Effect: Nausea', 1, 1, torch.rand(100, 100))
d.add_relation_type('Side Effect: Infertility', 1, 1, torch.rand(100, 100))
d.add_relation_type('Side Effect: Death', 1, 1, torch.rand(100, 100))
return d
fam = d.add_relation_family('Drug-Gene', 1, 0, False)
fam.add_relation_type('Target', 1, 0, torch.rand(100, 1000))
def _some_data_with_interactions():
d = Data()
d.add_node_type('Gene', 1000)
d.add_node_type('Drug', 100)
d.add_relation_type('Target', 1, 0,
torch.rand((100, 1000), dtype=torch.float32).round())
d.add_relation_type('Interaction', 0, 0,
torch.rand((1000, 1000), dtype=torch.float32).round())
d.add_relation_type('Side Effect: Nausea', 1, 1,
torch.rand((100, 100), dtype=torch.float32).round())
d.add_relation_type('Side Effect: Infertility', 1, 1,
torch.rand((100, 100), dtype=torch.float32).round())
d.add_relation_type('Side Effect: Death', 1, 1,
torch.rand((100, 100), dtype=torch.float32).round())
fam = d.add_relation_family('Gene-Gene', 0, 0, False)
fam.add_relation_type('Interaction', 0, 0, torch.rand(1000, 1000))
fam = d.add_relation_family('Drug-Drug', 1, 1, False)
fam.add_relation_type('Side Effect: Nausea', 1, 1, torch.rand(100, 100))
fam.add_relation_type('Side Effect: Infertility', 1, 1, torch.rand(100, 100))
fam.add_relation_type('Side Effect: Death', 1, 1, torch.rand(100, 100))
return d


Loading…
Cancel
Save