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!
浏览代码

Fix regressions in test_input.

master
Stanislaw Adaszewski 4 年前
父节点
当前提交
a72b6b09bc
共有 1 个文件被更改,包括 9 次插入20 次删除
  1. +9
    -20
      tests/icosagon/test_input.py

+ 9
- 20
tests/icosagon/test_input.py 查看文件

@@ -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


正在加载...
取消
保存